ReviewOS

home-lang/home

fix(ts): retain mapped-key binder identity through substitution

#777
Closed glennmichael123 opened this 8 days ago ·
8 days ago

The current main commit 5d6e7cb regresses the ts_program suite in two mapped-prototype controls. Exact origin/main reproduces 218/220: a false TS2345 rejects a valid ProtoOf<schema> object, while four required TS2322 return checks disappear from mapped prototype methods. The mapped substitution rebuilds the key parameter and template in separate walks, so nested conditional/indexed templates can stop referring to the mapped type's authoritative key binder. Restore one shared rebuilt binder, retain the new deferred mapped behavior, and require the full checker and Program suites plus the pinned Zod differential gate.

8 days ago

Implemented in f9548c2 and documented in 54ad7e8.

Exact origin/main control 5d6e7cb reproduced 218/220 Program tests. The final candidate passes 222/222, including both previously failing mapped-prototype controls and a new full recursive-issue positive/negative oracle. The full checker suite also passes.

The unchanged Zod 4.5.2 core gate remains exactly 6 diagnostics / 6 identities relative to post-#775/#776, byte-identical at SHA-256 64abd7817175b2885f805e3580a8ed0b74727e15f456dde3d85ba9ee3c528d19. The stripped ReleaseSafe build passed at 2,603 MB and the Zod gate at 1,248 MB under the fixed 3,840 MB guard.

A broader Record materialization candidate was rejected because it expanded 6 identities to 25 (+19). The landed fix keeps one authoritative mapped-key binder, composes outer + concrete substitutions, and makes empty signature substitutions true identities; it contains no Zod or diagnostic special case.

Sign in to comment on this issue.