ReviewOS

home-lang/home

TypeScript parity: reach 100% exact conformance and a green TS suite

#67
Closed chris opened this 10 days ago ·
10 days ago

Objective

Reach full logical parity with the TypeScript reference implementation in ~/Code/typescript-go: every TypeScript unit, integration, compiler, and exact conformance test passes without fixture-specific hardcoding.

Authoritative gates

  • ts_checker is fully green with zero failures or crashes.
  • ts_conformance coarse mode remains 5,907 / 5,907.
  • ts_conformance exact mode reaches 5,907 / 5,907 byte-for-byte baselines.
  • Remaining TypeScript package tests (ts_parser, ts_program, ts_driver, ts_resolver, emit/declaration tests) are green.
  • Full repo test gate has no TypeScript-related failures.
  • README, capability matrix, and parity plan report one consistent verified count.

Current verified state

As documented at HEAD before this tracking issue was opened:

  • Coarse conformance: 5,907 / 5,907 (100%).
  • Exact conformance dashboard: 4,220 / 5,907 (~71.4%), with 1,687 fixtures remaining.
  • ts_checker: 2,974 / 3,006 pass, 30 fail, 2 crash after the callable-object/arity parity wave; the two crashes are existing conditional-distribution invalid-TypeId failures.

Exact parity is the completion criterion. Diagnostic-code reachability alone is not proof of parity.

Working rules

  • Port semantics from TypeScript/tsgo, not fixture names or expected text tables.
  • Land small conventional commits with focused regressions and exact-corpus evidence.
  • Record each verified fixture/window delta in linked issues and comments.
  • Keep child issues linked here and close them only when their stated gate is proven.

References

  • docs/TS_PARITY_PLAN.md
  • docs/TS_DIAGNOSTIC_REACHABILITY.md
  • docs/TS_DIAGNOSTIC_CODE_STATUS.md
  • packages/ts_conformance/
10 days ago

Opened parserharness workstream #68 and landed the first tracked exact-parity chunk in 26f794917.

Dashboard movement for this chunk: one exact diagnostic row fixed; ts_checker moves from 31 to 30 known failures at 2,974/3,006 pass, with the two existing conditional-distribution crashes still open. Exact fixture totals remain 4,220/5,907 because parserharness still has other mismatches and therefore has not flipped from failing to passing.

10 days ago

Opened checker workstream #69 and pushed 5ed86afd3.

ts_checker is now crash-free at 2,976/3,006 pass, 30 fail, 0 crash. This flips the two existing conditional-distribution crashes to passes by fixing union-member slice ownership during recursive interning.

10 days ago

Enum assignment parity is now exact across the focused cluster: 9f04059c0 flips enumAssignmentCompat5, moving enumAssignmentCompat* from 6/7 to 7/7. Full checker: 2,978/3,007 passing, 29 known failures, zero crashes.

10 days ago

Verified exact-conformance frontier (2026-07-17, HEAD @ 38a9e1c + in-tree JSDoc wave)

Full windowed exact sweep (HOME_TS_CONFORMANCE_FULL=1 HOME_TS_CONFORMANCE_EXACT=1, 9 windows × ≤800 fixtures, run directly against the ts_conformance binary to avoid run-step cache conflation):

  • 5,130 / 5,907 pass (86.8%) — up from the 4,220 / 5,907 (71.4%) recorded when this tracker opened.
  • 777 fixtures still have byte-for-byte diagnostic diffs. All 777 are @@ diagnostic mismatch (zero crashes, zero timeouts, zero missing-baseline skips).

Failure clusters by upstream directory (≥ 3 fixtures)

ClusterFailingClusterFailing
jsx (incl. jsx/inline, jsx/jsxs)114es6/yieldExpressions9
jsdoc (incl. jsdoc/declarations)74types/typeParameters/*16
expressions/typeGuards34types/mapped10
salsa25types/typeRelationships/*21
es6/templates21types/union / types/members / types/rest / types/import25
es6/destructuring18interfaces/* (merging, extending classes, declarations)23
externalModules/typeOnly19classes/* (members, abstract, static block, ctor)~25
externalModules (other)14controlFlow17
parser/ecmascript5 (+Generics, +scanner)23statements/VariableStatements/usingDeclarations16
statements/for-ofStatements13dynamicImport / importAttributes12
esDecorators/classDeclaration11long tail (< 3 per dir)remainder

Work split (to avoid agent collisions)

  • JSDoc / CheckJS / salsa (~99 fixtures) — actively being worked (current fix(ts-checker): jsdoc … wave). Leaving alone.
  • Claiming next (this worker): jsx (114) → child issue to be opened and linked as sub-issue of this tracker, then es6/*, externalModules/typeOnly, parser/ecmascript5.
  • Remaining types/*, classes/*, interfaces/*, controlFlow, statements/* clusters are unclaimed backlog; will file child issues as they get picked up.

Method note: windowed runs of the compiled suite binary (START/LIMIT env) at ~0.3 s/fixture; failure names cross-mapped to tests/cases/conformance paths for clustering. Child issues will carry per-fixture lists and root-cause notes as they are mined.

10 days ago

Parity checkpoint linked to #69: four commits through bec109c46 flipped 7 known exact compiler fixtures across parser, checker, driver, resolver, and tsconfig behavior.

The targeted exact gate is 9/9; package gates are parser 897/897, driver 166/166, resolver 119/119, and tsconfig 145/145. The changes total 350 insertions and 64 deletions and are split into four pushed conventional commits, all authored/committed as Chris with no coauthor trailers.

I am not updating the global 5,907 denominator yet: the next complete windowed census will assign accumulated movement and avoid compounding the stale tracked total.

10 days ago

Checker parity checkpoint

Pushed 4d5ef39e3 and b9c74ce86. This closes five additional exact tsgo fixtures and repairs the checker harness so the complete suite compiles.

Current verification for this slice: 5/5 exact fixtures, 18/18 focused checker tests, and 4,161/4,174 full checker tests. A parent-commit comparison produced the identical 13 failures, so the parity batch introduces zero full-suite regressions. ts_program remains at its prior 93/94 baseline.

The next checker slice will work through the 13 baseline failures, prioritizing the connected reverse-mapped and mapped/indexed-access cluster.

10 days ago

Parity update: 677214a29 is now on main. Indexed-access lowering now preserves resolvable aliases and generic binders, bringing the mapped checker slice from the original 82/91 to 91/91 and clearing 9 of the 13 previously isolated full-checker failures. Remaining work is narrowed to four independent checker behaviors before the next full-suite confirmation.

10 days ago

Final parity audit

TypeScript/tsgo parity is complete on main.

Authoritative gates

  • Exact conformance: 5,907/5,907 passed, 0 failed, 0 skipped in the no-filter HOME_TS_CONFORMANCE_FULL=1 HOME_TS_CONFORMANCE_EXACT=1 survey.
  • Coarse conformance remains 5,907/5,907.
  • Full checker: 4,185/4,185 passed, including eleven final-wave regressions.
  • Remaining TypeScript package umbrella is green across parser, program, driver, resolver, emit/declaration, config, CLI, LSP, cache, query, and watch targets.
  • The repo's TS-scoped gates have no TypeScript failures.

Final semantic wave

  • e8032e1ea: flipped the final six known exact fixtures across generic callbacks, mapped projections, explicit-this, checked JS, and JSX weak-type relations.
  • 4f0d75749: preserved conditional generic callback inference exposed by the full checker.
  • 21124e862: closed the three residual fixtures found by a fresh unbounded survey.
  • 588c47403: preserved established trailing-rest inference while retaining the new tuple-prefix path.
  • 7effc2613: updated 8 current status surfaces with 28 insertions / 29 deletions.

Upstream and tracking

.gitmodules tracks https://github.com/microsoft/typescript-go.git on branch = main with a shallow checkout. The tracked gitlink, local checkout, and upstream main all resolve to 89d5d5b2849a0db0957065889ca58536fa6d2e4a.

Native sub-issues #68, #69, and #70 are all linked and closed with completion evidence. All final commits were authored and committed as Chris with no coauthor trailers.

Sign in to comment on this issue.