mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-27 18:22:41 -08:00
chore(task-85): finalize closure tracking and launcher path enforcement
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
---
|
||||
id: TASK-85
|
||||
title: Refactor large files for maintainability and readability
|
||||
status: In Progress
|
||||
status: Done
|
||||
assignee: []
|
||||
created_date: '2026-02-19 09:46'
|
||||
updated_date: '2026-02-21 03:29'
|
||||
updated_date: '2026-02-21 07:11'
|
||||
labels:
|
||||
- architecture
|
||||
- refactor
|
||||
@@ -16,7 +16,7 @@ priority: medium
|
||||
## Description
|
||||
|
||||
<!-- SECTION:DESCRIPTION:BEGIN -->
|
||||
Several core files are oversized and high-coupling (`src/main.ts`, `src/anki-integration.ts`, `src/config/service.ts`, `src/core/services/immersion-tracker-service.ts`). This task tracks phased, behavior-preserving decomposition plus guardrails and generated-launcher workflow cleanup.
|
||||
This task tracked decomposition of historically oversized/high-coupling core files (`src/main.ts`, `src/anki-integration.ts`, `src/config/service.ts`, `src/core/services/immersion-tracker-service.ts`) plus launcher generated-artifact workflow guardrails and verification.
|
||||
<!-- SECTION:DESCRIPTION:END -->
|
||||
|
||||
## Suggestions
|
||||
@@ -54,28 +54,58 @@ Several core files are oversized and high-coupling (`src/main.ts`, `src/anki-int
|
||||
|
||||
## Acceptance Criteria
|
||||
<!-- AC:BEGIN -->
|
||||
- [ ] #1 `src/main.ts` reduced to orchestration-focused module with extracted runtime domains
|
||||
- [x] #1 `src/main.ts` reduced to orchestration-focused module with extracted runtime domains
|
||||
- [x] #2 `src/anki-integration.ts` reduced to facade with helper collaborators
|
||||
- [x] #3 Config and immersion tracker services decomposed without behavior regressions
|
||||
- [ ] #4 `subminer` generated artifact ownership/workflow documented and enforced
|
||||
- [x] #4 `subminer` generated artifact ownership/workflow documented and enforced
|
||||
- [x] #5 Full build + config/core tests pass after refactor
|
||||
<!-- AC:END -->
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
<!-- SECTION:NOTES:BEGIN -->
|
||||
TASK-95 completion slice evidence: decomposed hotspot collaborators and reduced LOC across all remaining core hotspots.
|
||||
TASK-95 completion slice evidence: decomposed three non-main hotspots and reduced LOC in each targeted file.
|
||||
|
||||
TASK-95 LOC deltas: `src/anki-integration.ts` -407 (1722 -> 1315), `src/config/service.ts` -1492 (1591 -> 99), `src/core/services/immersion-tracker-service.ts` -361 (1470 -> 1109).
|
||||
|
||||
TASK-95 extracted collaborators: `src/anki-integration/field-grouping-merge.ts`, `src/config/{load.ts,parse.ts,warnings.ts,resolve.ts}`, `src/core/services/immersion-tracker/{types.ts,reducer.ts,queue.ts,maintenance.ts,query.ts}`.
|
||||
|
||||
TASK-95 verification evidence: `bun run build`, `bun run test:config:dist`, `bun run test:core:dist`, `bun run check:file-budgets` completed with no failing tests.
|
||||
|
||||
2026-02-21 finalization evidence: `src/main.ts` currently 2878 LOC; runtime fan-in guard passes at 85 import lines / 10 unique runtime paths (`bun run check:main-fanin`).
|
||||
|
||||
Main-entrypoint scope validation for this task is fan-in/orchestration behavior, not absolute LOC target.
|
||||
|
||||
Launcher generated artifact workflow now strictly enforced end-to-end: `scripts/verify-generated-launcher.sh` fails on stale repo-root `./subminer`; CI and release workflows verify `dist/launcher/subminer` and run the verifier script; release checksum/upload paths updated to `dist/launcher/subminer`.
|
||||
|
||||
Docs policy updated in `docs/development.md` and `docs/installation.md` to state repo-root `./subminer` is stale/unsupported and generated path must be `dist/launcher/subminer`.
|
||||
|
||||
Final verification gate passed: `bun run build && bun run test:config:dist && bun run test:core:dist && bun run check:file-budgets && bun run check:main-fanin`.
|
||||
|
||||
TASK-85 AC/DoD ownership map:
|
||||
- AC#1 (`src/main.ts` orchestration-focused runtime domains): `TASK-94` (primary), `TASK-71` (supporting predecessor)
|
||||
- AC#2 (`src/anki-integration.ts` facade + collaborators): `TASK-95`
|
||||
- AC#3 (config + immersion decomposition with no regressions): `TASK-95`
|
||||
- AC#4 (generated launcher ownership/workflow documented + enforced): `TASK-85` parent finalization evidence
|
||||
- AC#5 (full build + config/core tests pass): shared verification evidence in `TASK-95`, `TASK-94`, and final TASK-85 gate
|
||||
- DoD#1 (plan executed/decomposed): `TASK-94` + `TASK-95`
|
||||
- DoD#2 (regression coverage for extracted seams): `TASK-94` + `TASK-95`
|
||||
- DoD#3 (docs updated): `TASK-71` architecture docs + `TASK-85` launcher workflow docs
|
||||
|
||||
Remaining Scope (ordered):
|
||||
1. Execution scope: none (all TASK-85 AC/DoD complete).
|
||||
2. Process hygiene: TASK-93 closure synchronization and provenance note alignment.
|
||||
<!-- SECTION:NOTES:END -->
|
||||
|
||||
## Final Summary
|
||||
|
||||
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
||||
Closed remaining TASK-85 scope by enforcing generated launcher ownership (`dist/launcher/subminer`) across local verification, CI, release packaging/checksums, and contributor docs. Revalidated refactor integrity with full build + config/core test gates plus maintainability guardrails (`check:file-budgets`, `check:main-fanin`) and marked parent AC/DoD complete.
|
||||
<!-- SECTION:FINAL_SUMMARY:END -->
|
||||
|
||||
## Definition of Done
|
||||
<!-- DOD:BEGIN -->
|
||||
- [ ] #1 Plan at `docs/plans/2026-02-19-repo-maintainability-refactor-plan.md` executed or decomposed into child tasks
|
||||
- [x] #1 Plan at `docs/plans/2026-02-19-repo-maintainability-refactor-plan.md` executed or decomposed into child tasks
|
||||
- [x] #2 Regression coverage added for extracted seams
|
||||
- [ ] #3 Docs updated for architecture and contributor workflow changes
|
||||
- [x] #3 Docs updated for architecture and contributor workflow changes
|
||||
<!-- DOD:END -->
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
id: TASK-93
|
||||
title: Synchronize TASK-85 closure tracking and child-task status
|
||||
status: To Do
|
||||
status: Done
|
||||
assignee: []
|
||||
created_date: '2026-02-20 12:06'
|
||||
updated_date: '2026-02-20 12:06'
|
||||
updated_date: '2026-02-21 07:11'
|
||||
labels:
|
||||
- process
|
||||
- refactor
|
||||
@@ -33,14 +33,37 @@ priority: high
|
||||
|
||||
## Acceptance Criteria
|
||||
<!-- AC:BEGIN -->
|
||||
- [ ] #1 `TASK-85` status metadata and updated date reflect latest reality.
|
||||
- [ ] #2 Each unresolved `TASK-85` AC/DoD item has explicit owning child ticket(s).
|
||||
- [ ] #3 `TASK-85` has a clear, ordered “Remaining Scope” list with next execution order.
|
||||
- [ ] #4 No stale or contradictory progress statements remain in `TASK-85`.
|
||||
- [x] #1 `TASK-85` status metadata and updated date reflect latest reality.
|
||||
- [x] #2 Each unresolved `TASK-85` AC/DoD item has explicit owning child ticket(s).
|
||||
- [x] #3 `TASK-85` has a clear, ordered “Remaining Scope” list with next execution order.
|
||||
- [x] #4 No stale or contradictory progress statements remain in `TASK-85`.
|
||||
<!-- AC:END -->
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
<!-- SECTION:NOTES:BEGIN -->
|
||||
Synchronized TASK-85 closure tracking against current child-task outcomes and finalization evidence.
|
||||
|
||||
Updates applied to TASK-85:
|
||||
- Normalized description wording to historical/closure framing so parent status and narrative are aligned.
|
||||
- Added explicit AC/DoD ownership map linking completed slices to child tasks (`TASK-94`, `TASK-95`) and supporting context (`TASK-71`) plus parent-owned closure evidence.
|
||||
- Added clear ordered Remaining Scope list showing execution scope is complete and only process-hygiene tracking remained.
|
||||
- Clarified `src/main.ts` closure signal for TASK-85 (fan-in/orchestration validation) to avoid LOC-only ambiguity.
|
||||
|
||||
Post-update validation:
|
||||
- TASK-85 metadata shows `Status: Done` with updated timestamp.
|
||||
- No stale contradictory progress statements observed in TASK-85 notes.
|
||||
- Child-ticket mapping for pending/remaining items is explicit (execution: none remaining).
|
||||
<!-- SECTION:NOTES:END -->
|
||||
|
||||
## Final Summary
|
||||
|
||||
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
||||
Completed TASK-93 by normalizing TASK-85 closure metadata and progress narrative, adding explicit AC/DoD child-task ownership mapping, and recording an ordered remaining-scope list with no execution scope left. TASK-85 now reads as a consistent source-of-truth for completed vs pending work, and TASK-93 is closed.
|
||||
<!-- SECTION:FINAL_SUMMARY:END -->
|
||||
|
||||
## Definition of Done
|
||||
<!-- DOD:BEGIN -->
|
||||
- [ ] #1 `TASK-85` reads as a reliable source-of-truth for what is done vs pending.
|
||||
- [ ] #2 Child-ticket mapping for pending work is complete and unambiguous.
|
||||
- [x] #1 `TASK-85` reads as a reliable source-of-truth for what is done vs pending.
|
||||
- [x] #2 Child-ticket mapping for pending work is complete and unambiguous.
|
||||
<!-- DOD:END -->
|
||||
|
||||
Reference in New Issue
Block a user