Skip to content

Complete noUncheckedIndexedAccess adoption: phases 2 through base-flag flip #104600

Description

@steipete

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

  1. Phase 2: extend the ratchet lane to all eleven remaining packages (only ai + agent-core need fixes; nine are already clean); complete packages/.
  2. Phases 3a/3b: burn down src/ in reviewable chunks (ungated, regression-checked per PR).
  3. 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.
  4. Phase 4: extensions-own errors, flip tsconfig.extensions.json.
  5. Phase 5: scripts-own errors, flip tsconfig.scripts.json.
  6. Phase 6: re-probe test lanes with prod clean; fix or take a documented per-lane opt-out decision.
  7. 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.

Metadata

Metadata

Assignees

Labels

P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PR

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions