ReviewOS

home-lang/home

fix(ts): model Generator, ErrorConstructor, and base64 globals

#768
Closed chris opened this 9 days ago ·
9 days ago

Parent tracking: #66 Real-project benchmark: #548

Pinned Zod v4.5.2 core compilation currently reports four false missing-standard-library diagnostics:

  • Generator in packages/zod/src/v4/core/util.ts:146
  • atob in packages/zod/src/v4/core/util.ts:1013
  • btoa in packages/zod/src/v4/core/util.ts:1026
  • ErrorConstructor in packages/zod/src/v4/core/core.ts:27

The implementation must model the real standard-library types and values, preserve generic defaults and Program cross-file transport, and honor compilerOptions.lib, noLib, and target-derived availability. DOM and WebWorker both provide atob/btoa; Generator begins in ES2015 and AsyncGenerator in ES2018.

Acceptance evidence:

  • TypeScript 6.0.2 and Home agree on DOM, ES-only, WebWorker, explicit ES5-lib, and ES2017-target focused projects.
  • Checker and Program suites remain fully green.
  • Pinned Zod diagnostics fall from 43 to 39 by removing exactly the four entries above, with zero additions.
  • No fixture edits, suppressed diagnostics, weakened assertions, or skips.
9 days ago

Landed on main in a1ce400a9.

Implemented canonical standard-library handling for bare and parameterized Generator / AsyncGenerator, type-side ErrorConstructor, and the atob / btoa value signatures. Program schemas now transport generator identities and arguments across files, and the driver passes effective lib, noLib, and target tiers into each checker.

Validation:

  • ts_checker: 4,382/4,382
  • ts_program: 218/218
  • ts_driver: 189/189
  • ReleaseFast home-tsc: passed
  • TypeScript 6.0.2 focused oracles: exact DOM, ES-only, WebWorker, explicit ES5-lib, and ES2017-target diagnostic parity
  • pinned Zod v4.5.2 core: 43 → 39, removing exactly Generator, ErrorConstructor, atob, and btoa; 0 additions
  • Zig format, git diff --check, and focused Pickier: passed

No fixture, assertion, deadline, skip, TODO, or expected result changed.

Sign in to comment on this issue.