Repository navigation
Conversation
… mutation testing Covers lost restrictions carried through allOf, anyOf, properties, not and oneOf; propertyNames and unevaluatedProperties edge cases; contentMediaType in an anyOf branch; contentEncoding "binary"; enum [null, "a"]; and a 3.2 to 3.1 response $ref staying as written. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EjMyAKtd1J94kr1PfQeQza
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Test-only PR covering gaps Stryker found in the downgrader; no source changes.
v3.1-to-v3.0.test.ts— lost-restriction coverage:{ enum: [null, 'a'] }with notypestays as written;contentEncoding: 'binary'maps toformat: 'binary'; ananyOfwith a non-media-type-onlycontentMediaTypebranch keeps itsanyOf; and new cases assertpropertyNameswith apatterncounts as lost whilepropertyNames: truedoes not,unevaluatedPropertiesbeside an in-place applicator (allOf) counts as lost while besideadditionalPropertiesit does not, and looseness propagates throughallOf/anyOf/properties/not/oneOf.v3.2-to-v3.1.test.ts— response$ref: a response reference stays as written alongside thesummary→descriptionhandling.
Verified both files pass plus uncheck (oxlint/oxfmt/tsc). To confirm the new cases aren't theater, I mutated losesRestriction's propertyNames branch to return false — three tests failed as expected, then restored the source (tree clean). Assertions match the converter's documented contract.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
…st and examples gaps expectValidDowngrade now checks the output holds only what JSON keeps, so a key holding undefined fails. Adds a typed const, an empty examples list, and a oneOf branch with an undefined-valued keyword. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EjMyAKtd1J94kr1PfQeQza
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-review of the delta since the previous pullfrog review (d9d6459); all new content is test-only, no source changes.
- Added a typed-
constcase:{ type: 'number', const: 5 }keeps its written type, yielding{ type: 'number', enum: [5] }rather than falling back to the integer typevalueTypewould infer. - Added
{ examples: [] }→ exactly{}, asserted withtoStrictEqualso a survivingexamples: undefinedkey would fail. - Added an
undefined-valued keyword case:oneOf: [{ type: 'object', if: undefined }, { type: 'string' }]keeps itsoneOf, pinning theschema[key] !== undefinedguard that stopsif: undefinedfrom marking the branch loose. expectValidDowngradenow assertsoutputequalsJSON.parse(JSON.stringify(output)), so the helper rejects any key holdingundefinedand any non-JSON value.
Verified each new assertion against shared.ts and v3.1-to-v3.0.ts; the full suite passes (265 tests, 5 files). The prior review left no open threads.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Requested by dinwwwh · project thread
Test-only. Closes gaps that Stryker found in the downgrader. No source changes.
3.1 to 3.0, "a schema that lost a restriction" (3 new cases):
allOf,anyOf,properties,notandoneOf.propertyNameswith apatterncounts as lost (as zod emits forz.recordwith a key pattern);propertyNames: truedoesn't.unevaluatedPropertiesbesideallOfcounts as lost; besideadditionalPropertiesit doesn't.Extra expects in existing tests:
{ enum: [null, 'a'] }keeps'a'.contentEncoding: 'binary'getsformat: 'binary'.anyOfbranch withcontentMediaTypekeeps theanyOf.{ type: 'number', const: 5 }(Zodz.literal(5)) keeps its written type:{ type: 'number', enum: [5] }.{ examples: [] }becomes exactly{}.oneOfbranch with anundefined-valued keyword (if: undefined) keeps theoneOf.$refstays as written next to thesummaryhandling.expectValidDowngradenow also checks the output holds only what JSON keeps (toStrictEqual(JSON.parse(JSON.stringify(output)))), so a key holdingundefined(e.g. a tag, info or example written asundefined) fails.All 265 tests and
pnpm run checkpass.🤖 Generated with Claude Code
https://claude.ai/code/session_01EjMyAKtd1J94kr1PfQeQza