diff --git a/backlog/tasks/task-87 - Codebase-health-harden-verification-and-retire-dead-architecture-identified-in-the-March-2026-review.md b/backlog/tasks/task-87 - Codebase-health-harden-verification-and-retire-dead-architecture-identified-in-the-March-2026-review.md index 14e5284..00cdcdd 100644 --- a/backlog/tasks/task-87 - Codebase-health-harden-verification-and-retire-dead-architecture-identified-in-the-March-2026-review.md +++ b/backlog/tasks/task-87 - Codebase-health-harden-verification-and-retire-dead-architecture-identified-in-the-March-2026-review.md @@ -3,10 +3,10 @@ id: TASK-87 title: >- Codebase health: harden verification and retire dead architecture identified in the March 2026 review -status: To Do +status: In Progress assignee: [] created_date: '2026-03-06 03:19' -updated_date: '2026-03-06 03:20' +updated_date: '2026-03-06 11:11' labels: - tech-debt - tests @@ -19,9 +19,10 @@ references: - src/main.ts - src/anki-integration.ts - src/core/services/immersion-tracker-service.test.ts - - src/translators/index.ts - - src/subsync/engines.ts - - src/subtitle/pipeline.ts +- src/translators/index.ts +- src/subsync/engines.ts +- src/subtitle/pipeline.ts + - backlog/tasks/task-87.5 - Dead-architecture-cleanup-delete-unused-registry-and-pipeline-modules-that-are-off-the-live-path.md documentation: - docs/reports/2026-02-22-task-100-dead-code-report.md priority: high @@ -69,3 +70,10 @@ Shared review context to restate in child tasks: - src/main.ts trips many noUnusedLocals/noUnusedParameters diagnostics. - src/translators/index.ts, src/subsync/engines.ts, src/subtitle/pipeline.ts, src/tokenizers/index.ts, and src/token-mergers/index.ts appeared unreferenced during review and must be re-verified before deletion. + +## Progress Notes + +- `TASK-87.5` is complete. The isolated dead registry/pipeline modules were re-verified as off the maintained runtime path and removed. +- Live subtitle tokenization now owns the zero-width separator normalization that previously only existed in the dead subtitle pipeline path, so the cleanup did not drop that behavior. +- Verification completed for the cleanup slice with `bun test src/core/services/tokenizer.test.ts`, `bun test src/dead-architecture-cleanup.test.ts`, `bun test src/core/services/subsync.test.ts src/subsync/utils.test.ts`, `bun run tsc`, and `bun run test:src`. +- Remaining parent-task scope still includes the broader verification hardening, `src/main.ts` dead-symbol cleanup, and `src/anki-integration.ts` decomposition work tracked by the other child tasks. diff --git a/backlog/tasks/task-87.4 - Runtime-composition-root-remove-dead-symbols-and-tighten-module-boundaries-in-src-main.ts.md b/backlog/tasks/task-87.4 - Runtime-composition-root-remove-dead-symbols-and-tighten-module-boundaries-in-src-main.ts.md index a5c4ef7..1a552f8 100644 --- a/backlog/tasks/task-87.4 - Runtime-composition-root-remove-dead-symbols-and-tighten-module-boundaries-in-src-main.ts.md +++ b/backlog/tasks/task-87.4 - Runtime-composition-root-remove-dead-symbols-and-tighten-module-boundaries-in-src-main.ts.md @@ -3,10 +3,10 @@ id: TASK-87.4 title: >- Runtime composition root: remove dead symbols and tighten module boundaries in src/main.ts -status: To Do +status: Done assignee: [] created_date: '2026-03-06 03:19' -updated_date: '2026-03-06 03:21' +updated_date: '2026-03-06 18:10' labels: - tech-debt - runtime @@ -36,10 +36,10 @@ A noUnusedLocals/noUnusedParameters compile pass reports a large concentration o -- [ ] #1 src/main.ts no longer emits dead-symbol diagnostics under a noUnusedLocals/noUnusedParameters compile pass for the areas touched by this cleanup. -- [ ] #2 Unused imports, destructured values, and stale locals identified in the current composition root are removed or relocated without behavior changes. -- [ ] #3 The resulting composition root has clearer ownership boundaries for at least one runtime slice that is currently buried in the monolith. -- [ ] #4 Relevant runtime and startup verification commands pass after the cleanup, and any command changes are documented if needed. +- [x] #1 src/main.ts no longer emits dead-symbol diagnostics under a noUnusedLocals/noUnusedParameters compile pass for the areas touched by this cleanup. +- [x] #2 Unused imports, destructured values, and stale locals identified in the current composition root are removed or relocated without behavior changes. +- [x] #3 The resulting composition root has clearer ownership boundaries for at least one runtime slice that is currently buried in the monolith. +- [x] #4 Relevant runtime and startup verification commands pass after the cleanup, and any command changes are documented if needed. ## Implementation Plan @@ -51,3 +51,13 @@ A noUnusedLocals/noUnusedParameters compile pass reports a large concentration o 3. Keep changes behavior-preserving and avoid mixing unrelated cleanup outside src/main.ts unless required to compile. 4. Verify with the updated runtime/startup test commands from TASK-87.1 plus a noUnused compile pass. + +## Completion Notes + +- Removed the dead import/destructure backlog from `src/main.ts` and deleted stale wrapper seams that no longer owned runtime behavior after the composer/runtime extractions. +- Tightened module boundaries so the composition root depends on the composed/public runtime surfaces it actually uses instead of retaining unused lower-level domain factory symbols. +- Cleared the remaining strict `noUnusedLocals`/`noUnusedParameters` failures in nearby touched files required for a clean repo-wide pass: `launcher/commands/playback-command.ts`, `src/anki-integration.ts`, `src/anki-integration/field-grouping-workflow.ts`, `src/core/services/tokenizer/yomitan-parser-runtime.test.ts`, and `src/main/runtime/composers/composer-contracts.type-test.ts`. +- Verification: + - `bunx tsc --noEmit -p tsconfig.typecheck.json --noUnusedLocals --noUnusedParameters --pretty false` + - `bun run test:fast` +- Commit: `e659b5d` (`refactor(runtime): remove dead symbols from composition roots`)