mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
chore(cleanup): prune dead code after refactors
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
---
|
||||
id: TASK-100
|
||||
title: Run post-refactor dead code prune and cleanup
|
||||
status: To Do
|
||||
status: Done
|
||||
assignee: []
|
||||
created_date: '2026-02-21 07:15'
|
||||
updated_date: '2026-02-21 07:15'
|
||||
updated_date: '2026-02-22 04:01'
|
||||
labels:
|
||||
- cleanup
|
||||
- maintainability
|
||||
@@ -35,16 +35,33 @@ Major refactors likely left unused exports/helpers and stale compatibility code.
|
||||
|
||||
## Acceptance Criteria
|
||||
<!-- AC:BEGIN -->
|
||||
- [ ] #1 Confirmed dead code removed without behavior regressions.
|
||||
- [ ] #2 Remaining flagged candidates either resolved or documented with justification.
|
||||
- [ ] #3 Build and core/config suites pass after cleanup.
|
||||
- [ ] #4 Import graph complexity reduced (fewer exports/entrypoints where applicable).
|
||||
- [x] #1 Confirmed dead code removed without behavior regressions.
|
||||
- [x] #2 Remaining flagged candidates either resolved or documented with justification.
|
||||
- [x] #3 Build and core/config suites pass after cleanup.
|
||||
- [x] #4 Import graph complexity reduced (fewer exports/entrypoints where applicable).
|
||||
<!-- AC:END -->
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
<!-- SECTION:NOTES:BEGIN -->
|
||||
Added dead-code execution report: `docs/reports/2026-02-22-task-100-dead-code-report.md` (baseline + triage + removals + remaining candidates).
|
||||
|
||||
Confirmed removals include unused imports/helpers in Anki/core/renderer paths plus reduced registry/barrel export surface in `src/tokenizers/index.ts`, `src/token-mergers/index.ts`, and `src/core/utils/index.ts`.
|
||||
|
||||
Verification gates: `bun run build` PASS; `bun run test:core:src` PASS (225 pass/6 skip); `bun run test:config:src` PASS (52 pass); `bun run check:file-budgets` PASS warning mode with no strict hotspot violations.
|
||||
|
||||
Static-analysis evidence: `tsc --noEmit --noUnusedLocals --noUnusedParameters` reduced to 39 remaining diagnostics concentrated in `src/main.ts` and intentional composer type-test aliases; broad `ts-prune` false positives documented in report.
|
||||
<!-- SECTION:NOTES:END -->
|
||||
|
||||
## Final Summary
|
||||
|
||||
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
||||
Completed post-refactor dead-code cleanup with a documented triage report, removing confirmed unused imports/helpers/exports while preserving intentional contract/type seams. Verified no regressions via build + core/config source test suites and maintainability budget checks, with remaining candidate hotspots documented for a dedicated follow-up pass.
|
||||
<!-- SECTION:FINAL_SUMMARY:END -->
|
||||
|
||||
## Definition of Done
|
||||
<!-- DOD:BEGIN -->
|
||||
- [ ] #1 Dead-code report attached in task notes.
|
||||
- [ ] #2 Regression test updates included for risky removals.
|
||||
- [ ] #3 Verification gate commands complete successfully.
|
||||
- [x] #1 Dead-code report attached in task notes.
|
||||
- [x] #2 Regression test updates included for risky removals.
|
||||
- [x] #3 Verification gate commands complete successfully.
|
||||
<!-- DOD:END -->
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
id: TASK-98
|
||||
title: Shift core tests to source level and trim dist coupling
|
||||
status: In Progress
|
||||
status: Done
|
||||
assignee:
|
||||
- opencode
|
||||
created_date: '2026-02-21 07:15'
|
||||
updated_date: '2026-02-21 09:56'
|
||||
updated_date: '2026-02-22 02:35'
|
||||
labels:
|
||||
- testing
|
||||
- maintainability
|
||||
@@ -77,11 +77,33 @@ Execution updates (2026-02-21):
|
||||
- PASS: `bun run test:config:src && bun run test:core:src`
|
||||
- PASS: `bun run test:smoke:dist`
|
||||
- BLOCKED (pre-existing unrelated workspace errors): `bun run build` currently fails in `src/main.ts` and `src/main/runtime/composers/mpv-runtime-composer.test.ts` from in-flight TASK-96/97 changes present in working tree; not introduced by TASK-98 edits.
|
||||
|
||||
2026-02-22 closure verification (current HEAD):
|
||||
|
||||
- PASS: `bun run test:fast` (source lane)
|
||||
|
||||
- PASS: `bun run build`
|
||||
|
||||
- PASS: `bun run test:smoke:dist` (post-build dist smoke lane)
|
||||
|
||||
- Timing repro (current HEAD):
|
||||
|
||||
- `/usr/bin/time -p bun run test:fast` => `real 2.18`
|
||||
|
||||
- `/usr/bin/time -p bun run test:smoke:dist` => `real 0.21`
|
||||
|
||||
- Policy re-check: `package.json` keeps source defaults (`test:config`, `test:core`, `test:fast`) and explicit dist smoke (`test:smoke:dist`); CI/release still run source tests before build and dist smoke after build.
|
||||
<!-- SECTION:NOTES:END -->
|
||||
|
||||
## Final Summary
|
||||
|
||||
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
||||
Closed TASK-98 by validating the source-first/dist-smoke test split on current HEAD. Verified `test:fast`, `build`, and `test:smoke:dist` all pass; confirmed CI/release order remains source tests before build and dist smoke after build; captured reproducible timing evidence for the active lanes.
|
||||
<!-- SECTION:FINAL_SUMMARY:END -->
|
||||
|
||||
## Definition of Done
|
||||
<!-- DOD:BEGIN -->
|
||||
- [x] #1 Test command matrix documented in task notes.
|
||||
- [ ] #2 CI config updated and passing with new source/dist split.
|
||||
- [x] #2 CI config updated and passing with new source/dist split.
|
||||
- [x] #3 Performance delta captured with reproducible timing commands.
|
||||
<!-- DOD:END -->
|
||||
|
||||
Reference in New Issue
Block a user