ReviewOS

home-lang/home

TypeScript exact parity: close parserharness diagnostics

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

Parent: #67

Scope

Close the remaining byte-for-byte diagnostic mismatches in the upstream parserharness conformance fixture by implementing the corresponding checker, resolver, flow, and diagnostic semantics.

Verified progress

The callable/default-parameter wave now:

  • Distinguishes required unannotated TypeScript parameters from untyped JavaScript signatures.
  • Recognizes { (): R } object call signatures through the shared signature lookup path.
  • Preserves contextual typing for f = benchmark.bench.
  • Rejects subBenchmark(name, f) where () => void is required.
  • Renders parserharness line 637 exactly as TypeScript: Argument of type '(name: any, f: any) => void' is not assignable to parameter of type '() => void'.

This flips 1 exact diagnostic row from mismatched to common. The fixture itself remains open because broader existing mismatches remain.

Reproduction

HOME_TS_CONFORMANCE_ROOT=~/Code/typescript-go \
HOME_TS_CONFORMANCE_FULL=1 \
HOME_TS_CONFORMANCE_EXACT=1 \
HOME_TS_CONFORMANCE_FILTER=parserharness \
HOME_TS_CONFORMANCE_TRACE=1 \
./pantry/.bin/zig build test \
  -Dfilter=ts_conformance \
  '-Dts-conformance-test-filter=opt-in full local TypeScript corpus survey' \
  --summary failures

Remaining clusters visible in the current diff

  • Namespace/value resolution and missing imported harness dependencies.
  • Flow analysis for nullable and evolving-array locals.
  • Exact name suggestions and declaration merging.
  • Object/index access and structural argument diagnostics.
  • Optional comparison/baseline parameter flow near the end of the fixture.

Completion gate

  • Focused exact run reports parserharness as 1 / 1 with no diagnostic diff.
  • No regressions in ts_checker or adjacent exact fixtures.
10 days ago

Progress landed in 26f794917.

Verified delta:

  • parserharness.ts(637,31) is now a common exact-baseline row; 1 mismatch flipped.
  • Focused callback diagnostic test: 2/2 pass.
  • Focused template-diagnostic non-regression: 2/2 pass.
  • Full ts_checker: 2,974/3,006 pass, 30 fail, 2 crash, improving from 31 failures; the two conditional-distribution crashes are unchanged.
  • Focused exact parserharness still reports 0/1 because the broader mismatch clusters listed in this issue remain.

The fix is semantic: unannotated TS parameters retain required arity, untyped JS signatures retain zero minimum arity, and object type call signatures ({ (): R }) now participate in shared first-signature lookup. No fixture-specific diagnostic hardcoding was added.

10 days ago

The authoritative no-filter exact survey at 7effc2613 completed with 5,907/5,907 passed, 0 failed, 0 skipped against tsgo 89d5d5b2849a0db0957065889ca58536fa6d2e4a. The full checker gate is 4,185/4,185, and the remaining ts_* package umbrella is green.

This proves the focused parserharness completion gate inside the authoritative full corpus: its byte-for-byte diagnostic baseline now matches with no fixture-specific bypass. Closing this child as completed; parent tracker: #67.

Sign in to comment on this issue.