Problem
Phase 1 (#104558, landed as e68669373280) established the noUncheckedIndexedAccess ratchet lane over seven leaf packages. Fresh full-inventory probes show the remaining scope, with heavy transitive overlap because TypeScript applies the flag to every file in a program:
| Surface |
Errors (incl. transitive src) |
Own errors (approx) |
| packages/ai + agent-core |
196 |
196 |
| src/ (core lane) |
1,186 |
1,186 |
| ui lane |
1,580 |
~306 |
| extensions lane |
2,142 |
TBD after src |
| scripts lane |
1,610 |
TBD after src |
| test lanes (core/ext/root) |
~9,200 |
TBD after prod |
Structural facts: only leaf packages can gate via the ratchet lane; ui/, extensions/, scripts/, and memory-host-sdk all pull src/** transitively, so their lanes can only flip after src/ is clean.
Plan
- Phase 2: extend the ratchet lane to all eleven remaining packages (only ai + agent-core need fixes; nine are already clean); complete
packages/.
- Phases 3a/3b: burn down
src/ in reviewable chunks (ungated, regression-checked per PR).
- Phase 3c: fix ui-own errors, then flip
noUncheckedIndexedAccess: true in tsconfig.core.json + tsconfig.ui.json; memory-host-sdk becomes gated by the core flag.
- Phase 4: extensions-own errors, flip
tsconfig.extensions.json.
- Phase 5: scripts-own errors, flip
tsconfig.scripts.json.
- Phase 6: re-probe test lanes with prod clean; fix or take a documented per-lane opt-out decision.
- Endgame: move the flag to base
tsconfig.json, remove per-lane flags, delete the ratchet lane and its routing.
Each phase also carries a bounded cleanup mandate in touched files (latent bugs, dead paths, closed-union tightening), with per-change rationale and net-LOC discipline.
Problem
Phase 1 (#104558, landed as
e68669373280) established thenoUncheckedIndexedAccessratchet lane over seven leaf packages. Fresh full-inventory probes show the remaining scope, with heavy transitive overlap because TypeScript applies the flag to every file in a program:Structural facts: only leaf packages can gate via the ratchet lane;
ui/,extensions/,scripts/, andmemory-host-sdkall pullsrc/**transitively, so their lanes can only flip aftersrc/is clean.Plan
packages/.src/in reviewable chunks (ungated, regression-checked per PR).noUncheckedIndexedAccess: trueintsconfig.core.json+tsconfig.ui.json; memory-host-sdk becomes gated by the core flag.tsconfig.extensions.json.tsconfig.scripts.json.tsconfig.json, remove per-lane flags, delete the ratchet lane and its routing.Each phase also carries a bounded cleanup mandate in touched files (latent bugs, dead paths, closed-union tightening), with per-change rationale and net-LOC discipline.