refactor(main): extract jellyfin and anilist runtime composers

This commit is contained in:
2026-02-20 19:33:44 -08:00
parent b271a3b1a9
commit 8ad8ff1671
12 changed files with 643 additions and 266 deletions

View File

@@ -0,0 +1,40 @@
# Agent: codex-task94-thin-root-20260221T031320Z-q3n7
- alias: codex-task94-thin-root
- mission: Execute TASK-94 end-to-end by moving main deps-builder clusters into runtime composer modules and shrinking main.ts fan-in
- status: handoff
- branch: main
- started_at: 2026-02-21T03:13:20Z
- heartbeat_minutes: 5
## Current Work (newest first)
- [2026-02-21T03:41:10Z] handoff: completed TASK-94 slice extraction for jellyfin/anilist composer modules; `main.ts` now consumes `composeJellyfinRemoteHandlers` + `composeAnilistSetupHandlers`; added composer tests; tightened fan-in guard to `<=110` import lines and `<=11` unique runtime paths.
- [2026-02-21T03:41:10Z] test: `bun run build`, `node --test dist/main/runtime/composers/anilist-setup-composer.test.js dist/main/runtime/composers/jellyfin-remote-composer.test.js`, `bun run test:config:dist`, `bun run test:core:dist`, `bun run check:main-fanin`, `bun run check:main-fanin:strict`, `bun run check:file-budgets`.
- [2026-02-21T03:24:30Z] intent: execute TASK-94 with batch extraction (startup, overlay, jellyfin/anilist, ipc/shortcuts), tests, fan-in threshold tighten, backlog updates.
- [2026-02-21T03:24:30Z] planned files: `src/main.ts`, `src/main/runtime/composers/*`, `src/main/runtime/registry.ts`, `src/main/runtime/*composer*.test.ts`, `scripts/check-main-runtime-fanin.ts`, `backlog/tasks/task-94 - Reduce-main.ts-to-thin-composition-root.md`, `backlog/tasks/task-71 - Split-main.ts-into-domain-runtime-modules-round-2.md`.
- [2026-02-21T03:24:30Z] assumptions: prior TASK-71 domain barrels + registry already landed in working tree; continue from current dirty state without reverting unrelated edits.
## Files Touched
- `docs/subagents/agents/codex-task94-thin-root-20260221T031320Z-q3n7.md`
- `docs/subagents/INDEX.md`
- `docs/subagents/collaboration.md`
- `src/main.ts`
- `src/main/runtime/composers/jellyfin-remote-composer.ts`
- `src/main/runtime/composers/anilist-setup-composer.ts`
- `src/main/runtime/composers/jellyfin-remote-composer.test.ts`
- `src/main/runtime/composers/anilist-setup-composer.test.ts`
- `scripts/check-main-runtime-fanin.ts`
- `docs/file-size-budgets.md`
- `backlog/tasks/task-94 - Reduce-main.ts-to-thin-composition-root.md`
- `backlog/tasks/task-71 - Split-main.ts-into-domain-runtime-modules-round-2.md`
- `backlog/tasks/task-85 - Refactor-large-files-for-maintainability-and-readability.md`
## Assumptions
- `TASK-94` scope is single-ticket execution from existing branch state; no new worktree requested by user.
- Existing uncommitted edits are intentional and should remain.
## Open Questions / Blockers
- none
## Next Step
- Continue TASK-94 by extracting startup/overlay/ipc/shortcuts deps-builder clusters into composer modules to finish thin composition-root target.