Summary
First slice of Chris's "AI to fix still" shim-retirement work (per the linked Slack message + docs/TS_PARITY_PLAN.md §6.A).
The first cluster in hasHarnessModeledExpectedError — comment block "These ES5 destructuring variants only carry the upstream TS5107 target-option deprecation diagnostic" — is exactly the pattern this PR makes generic:
- Add
directiveTargetDeprecated(source)(sibling to the existingdirectiveTargetEs2015OrLater) that returns true when the source's// @target: …directive listses3ores5. - Wire it into
runOneEntry's coarse-modehad_errorsexpression, gated onentry.expects_error(same gate the shim already uses). - Now every
@target: es3/@target: es5fixture whose only upstream error is the TS5107 deprecation satisfies itsexpects_errorwithout needing a named shim entry.
Why the per-fixture entries stay (for now)
The 10 entries on lines 859-868 are kept with a NOTE: comment pointing at the new helper. They're no-ops for the coarse path now, but the use_exact_errors=true baseline-comparison path still relies on them — Home's ts_driver doesn't yet emit a real TS5107 diagnostic whose byte form matches the upstream .errors.txt. The note flags them for deletion once that downstream work lands (Chris's AI can prune them after a clean full-corpus run).
Test plan
zig build test -Dfilter=ts_conformance --summary all— 38/38 (was 36/36, +2 new)zig build test -Dfilter=ts_checker --summary all— 689/689 unchangedzig build test -Dfilter=ts_driver --summary all— 57/57 unchanged- Once Chris's AI finishes the 5700-5800 batch, re-run the bounded slices
START=838 LIMIT=200throughSTART=5838 LIMIT=200to confirm no regression from the new coarse-path helper.
Notes for review
This is intentionally small and additive — single function added, single OR clause in had_errors, no per-fixture entries removed yet. Designed to be the first of many small PRs that whittle the 373-entry shim down by replacing per-name matches with named source-level predicates.
🤖 Generated with Claude Code