test: kill generator/param-metadata mutation survivors; reframe mutation guidance#122
Merged
Conversation
…ion guidance Recovers and completes the interrupted survivor-killing pass on the tRPC generators and param metadata: - param-metadata: a test proving an undefined propertyKey does not attach metadata to a property literally named "undefined" (the guard the mutant removed). Plus constants / decorators / schema-generator / zod-serializer / module specs closing coverage-blind survivors. - Behavior-neutral simplifications of three equivalent-mutant branches: a redundant 'utf-8' write encoding and an unused indent var in the schema generator, and folding the any/lazy/nativeEnum cases into the shared z.any() fallback in the zod serializer. 213 passing, 100% coverage on the touched files, complexity gate green. Also reframes the mutation-testing guidance (guidelines + CLAUDE.md) as an occasional, scoped audit rather than a per-PR gate.
📊
|
| Metric | PR | Base | Diff | |
|---|---|---|---|---|
| Statements | ████████████████████ |
660/660 (100%) |
664/664 (100%) |
⚪ 0% |
| Branches | ████████████████████ |
280/280 (100%) |
283/283 (100%) |
⚪ 0% |
| Functions | ████████████████████ |
122/122 (100%) |
122/122 (100%) |
⚪ 0% |
| Lines | ████████████████████ |
635/635 (100%) |
639/639 (100%) |
⚪ 0% |
Updated for 49930bd | Compared against base branch
⏱️ Performance Report
🐢 Slowest test suites
🐌 Slowest individual tests
Updated for |
🧠 Cognitive Complexity Report
🧩 Most complex functions
Updated for |
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.
Completes the survivor-killing pass on the tRPC generators + param metadata.
Tests (kill coverage-blind survivors). A
param-metadatatest pins thepropertyKeyguard — anundefinedkey must not coerce to the string"undefined"and attach metadata to a property of that name. Plusconstants,decorators,schema-generator(a full 140-line spec),zod-serializer, andmodulespecs closing survivors the coverage bar didn't catch.Simplifications (equivalent mutants → delete the dead branch). Dropped a redundant
'utf-8'write encoding (Node's default) and an unused indent variable in the schema generator; folded theany/lazy/nativeEnumcases into the sharedz.any()fallback in the zod serializer (all three returnedz.any(), so the per-case branches were equivalent mutants). Behavior-neutral.213 passing, 100% coverage on the touched files, complexity gate green locally (the Angular showcase
ng buildstep needs Node ≥22.22.3 and is validated by GitHub CI, per the repo's known toolchain note).Docs. Reframed the mutation-testing guidance (guidelines §11 + CLAUDE.md) as an occasional, targeted audit — not a per-PR gate (scope to one file,
--concurrency 2, verify kills by hand-applying the mutant + running the fast mocha suite). No behavior or API change; no release.