parallel-code
parallel-code copied to clipboard
[Quality audit] Consolidate test harnesses and repository hygiene
Derived from the local audit report CODE_QUALITY_FINDINGS.md created on 2026-05-30.
Scope
This issue tracks test-maintenance and repo-hygiene cleanup from the quality audit.
Findings
- [ ] Finding 36: coordinator tests need a fixture layer.
- Evidence: repeated fs, child_process, pty, git, task, channel mocks and setup in
electron/mcp/coordinator.test.tsand related coordinator sequence tests. - Fix direction: extract a Vitest-aware coordinator harness returning mocks plus dynamically imported
Coordinator; add helpers such asmockNextTask,registerDefaultCoordinator, andgetSubtaskConfigWrites.
- Evidence: repeated fs, child_process, pty, git, task, channel mocks and setup in
- [ ] Finding 37: store tests repeat harness setup.
- Evidence: repeated store mutation helpers,
producepassthroughs, core-store proxies, and reset logic across store tests. - Fix direction: add a colocated
src/store/test-helpers.tsfactory for mock store/proxy/setStore with per-test overrides.
- Evidence: repeated store mutation helpers,
- [ ] Finding 40: versioned screen artifacts bloat the repo.
- Evidence:
screens/is about 54 MB; several raw or alternate captures appear unreferenced. - Fix direction: keep only README assets in git and move alternates/raw captures to release assets or Git LFS.
- Evidence:
- [ ] Finding 42: steps watcher has noisy debug-looking warnings.
- Evidence:
electron/ipc/steps.tsemitsconsole.warnon regular send/watch events. - Fix direction: remove the logs or route through structured debug logging.
- Evidence:
Acceptance checks
- coordinator test suite
- affected store tests
- README media still renders after screen asset cleanup
- no tests depend on the removed warning strings