Parent
Problem
Expanding #783 provenance to direct diagnosed member-access fallbacks exposes four existing Home-only TS2339 recoveries in the byte-pinned Zod 4.5.2 production graph. TypeScript accepts the graph, but Home narrows valid receivers to never and then substitutes an any-like result:
src/v4/classic/from-json-schema.ts:649—baseSchema.default(...), wherebaseSchemais declared fromconvertBaseSchema(...): ZodTypeand reassigned through composition wrappers.src/v4/classic/from-json-schema.ts:670— subsequentschema.typeandschema.$refreads afterschema.propertyNames !== undefined.src/v4/classic/from-json-schema.ts:671—schema.propertyNamesinside the proven-defined branch.
The first site is an assignment-flow shape. The remaining three are a property-guard shape. They are distinct from #672's already-fixed impossible union constituent after truthy narrowing, although they share the false never symptom.
Evidence
- Frozen archive: Zod 4.5.2, SHA-512
5e46170a8975d3e6daffa17f72e79657e4decd478ea975b485d789b7909d5e34d8780800420e4dd37450749f349a17c513bdbea5b96f60c5b8c32d90a7841bae. - Production graph: 106 TypeScript files.
- Before direct-
neverprovenance, the reviewed HM9002 count is 3. - With the truthful direct-
nevermigration, the count is 7; all four added HM9002 warnings pair with Home-onlyProperty ... does not exist on type 'never'TS2339 diagnostics at the positions above.
Requirements
- Reduce both shapes to small source-independent checker regressions and compare exact diagnostics/types with the pinned TypeScript reference.
- Fix the semantic flow/narrowing root cause; do not special-case Zod names, paths,
default,propertyNames,$ref, or any source text. - Do not suppress TS2339, widen arbitrary
nevervalues, skip control-flow checks, or lower the HM9002 ratchet. - Remove exactly these four Home-only TS2339/HM9002 sites from the unchanged pinned graph without adding diagnostic identities.
- Preserve legitimate
neverproperty diagnostics and TS18031/TS18032 intersection reduction. - Pass focused checker coverage, the complete checker and conformance suites, a stripped ReleaseFast build, and two pinned Zod runs.
Discovered while implementing #783; the provenance migration should land independently so this bug remains measurable.