Repository navigation
feat(ci,scripts): add TypeScript support to unified mutation-diff - #1267
Merged
Merged
Conversation
kyasbal
requested review from
K53,
RyuSA,
jyane,
kkuchima and
renamoo
as code owners
November 12, 2026 08:05
kyasbal
enabled auto-merge
November 12, 2026 08:07
Contributor
There was a problem hiding this comment.
Code Review
This pull request extends the monorepo's differential testing and mutation testing framework (mutation-diff) to support TypeScript and Angular frontend code alongside Go. It introduces AST-based mutation extraction for TypeScript (via mutate_ts.js), Istanbul coverage parsing, dependency-graph-based test planning, a custom Karma mutation plugin for orchestrating multi-mutant runs, and Jasmine spec redundancy detection. Additionally, it updates the CLI, Makefile, and documentation to support language-specific targets (go, ts, or all) and containerized execution. I have reviewed the changes and have no feedback to provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the unified
scripts/mutation-diff(make mutation-diff) to support Angular/TypeScript (web/src/**/*.tsandweb/src/**/*.spec.ts) alongside Go, bringing differential line coverage, Super-Mutant evaluation in Headless Chromium, and redundant Jasmine spec detection under the same unified report and CI workflow.Key Changes
scripts/gotestutil/tscoverage.go,scripts/mutation-diff/ts_linecov.go,zero_hit_ts.js):coverage-final.jsonspans (statementMap,fnMap,branchMap) onto changed TypeScript lines (PATCH COV,UNCOVERED LINES,Uncovered Changed Code) and adds{ type: 'json' }+KARMA_COVERAGE_DIRsupport toweb/karma.conf.js.ts.transpileModule+istanbul-lib-instrument+istanbul-lib-source-mapsfor changed production.tsfiles not imported by any executed Karma spec bundle, while skipping pureinterface/type-only files..spec.tstargets (scripts/gotestutil/tsgraph.go) so localmake mutation-diff/make mutation-diff-webruns only affected Karma specs.mutate_ts.js,karma_mutation_plugin.js,ts_runner.go):web/node_modules/typescriptCompiler API (zero new npm dependencies) to extractROR,LCR,BCR,AOR,UOI,BLR, andSBRsites while excluding type/enum/literal-const declarations, Angular decorators & DI/Signal initializers (inject,input,output,model,viewChild,contentChild),console.*/new Error(...)diagnostics, and lifecycle teardown boilerplate (destroyRef.destroyed,onDestroy,onCleanup,takeUntilDestroyed,unsubscribe, timer/RAF cleanup).// NOMUTANTS(<category>[, <operator>...]): <reason>(equivalent,perf,observability,external, withinvariantrejected) across Go and TypeScript (ParseSuppressionsFromComments).--grep-filteredcontext.htmlreloads with automatic Headless Chromium restart on infinite-loop timeouts.redundancy.go,mutate_ts.js,ts_runner.go):describe/itand table-driven (for...of/.forEach) spec locations and flagsSAME PATHduplicate specs as well asNO OUTPUT CHECKsmoke specs (e.g.expect(component).toBeTruthy()-onlyshould createspecs when behavioral specs already cover the subject), using Pass 0:T/:F/:Spolarities and unchanged-branch probes (P<id>:T/F).main.go,testing.mk,pullrequest.yaml,docs/):--lang=all|go|ts(defaultall) and--ts-coverage,make mutation-diff-go/make mutation-diff-web(USE_CONTAINER=truesupported), and theReport Frontend Differential Coverage & Mutation Testingstep in.github/workflows/pullrequest.yaml.Verification
make pre-commit(addlicense,prettier,ng lint,stylelint,golangci-lint,markdownlint-cli2):0 issuesgo test -race ./scripts/...&make test-go: passedmake mutation-diff-web USE_CONTAINER=true(verified against real frontend PR commits): unifiedPATCH COV,MUTATION,Surviving Mutants,Uncovered Changed Code, andRedundant Tests Summaryrendered cleanly with 0 false-positive redundant specs