Repository navigation
build(repo): generate the site's route tree before mutation testing - #74
Merged
Merged
Conversation
Stryker's TypeScript checker compiles apps/site, whose router imports src/routeTree.gen.ts. The site's generate task (tsr generate) writes that file. The typecheck task depends on generate and the mutation task did not, so the Release gate's checker failed with TS2307 on ./routeTree.gen. The mutation task now depends on generate the same way Conductor ruling, cycle 109
Contributor
There was a problem hiding this comment.
Verified: 9/9 green on f8f60c3, one turbo dependsOn edge, sandbox compile exit 0 with route tree, 0 threads, hunt clean.
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.
After #73 the Release gate's dry run passes. The TypeScript checker's first compile then failed (run 37709038743, job "mutation · @endgame/site"):
This makes the
mutationtask generate the route tree first, the same waytypecheckdoes.Cause
apps/site/src/routeTree.gen.tsis generated by TanStack Router and git-ignored (.gitignore:15). The site'sgeneratescript (tsr generate) writes it. Turbo'sgeneratetask declares it as its output (turbo.json:16-26).pnpm typecheck. In turbo,typecheckdepends ongenerate(turbo.json:52-55), so the file exists beforetscruns. The site's owntypecheckscript also starts withtsr generate.turbo run mutation --filter=<package>(release-gate.yml:59).mutationdepended only on^build(turbo.json:107-109), so nothing wrote the route tree. Stryker's checker compiles the package'stsconfig.json, which includessrc.Change
turbo.json: themutationtask depends ongenerateas well as^build. That's the same edgetypecheckhas. Nothing else changes: no generated file is committed, there's no new tool, the checker stays on, themutateglobs are unchanged, andbreakstays at 100.Proof
--dryRunOnlystops before the checker's compile. In a checkout with no route tree it exits 0 and the log ends atphase mutation-test. So the proof shows the task graph, then the compile itself.Bootstrapped worktree at
f8f60c3, Linux, sandboxed, starting with noapps/site/src/routeTree.gen.ts:The checker compiles that sandbox. The two mutated files in the kept sandbox hold Stryker's instrumented code, so I put the original two files back in place of the instrumented copies before compiling. That gives the sandbox before any mutant:
tsc -p tsconfig.json --noEmitin the sandbox exits 0 with no output.src/routeTree.gen.tsout of the sandbox brings back the same three errors as CI.Also run on this head:
pnpm check:ciexits 0. All 25@systemfsoftware/*packages resolve from our flakes, 9/9 tasks pass, and dist and the sandbox proofs pass.Mutants weren't run, because the engine's guard allows that only on main CI. Done means the next Release gate on
mainproduces the@endgame/sitereport at break 100.Conductor ruling, cycle 109.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.