parallel-code icon indicating copy to clipboard operation
parallel-code copied to clipboard

[Quality audit] Consolidate test harnesses and repository hygiene

Open johannesjo opened this issue 6 months ago • 0 comments

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.ts and related coordinator sequence tests.
    • Fix direction: extract a Vitest-aware coordinator harness returning mocks plus dynamically imported Coordinator; add helpers such as mockNextTask, registerDefaultCoordinator, and getSubtaskConfigWrites.
  • [ ] Finding 37: store tests repeat harness setup.
    • Evidence: repeated store mutation helpers, produce passthroughs, core-store proxies, and reset logic across store tests.
    • Fix direction: add a colocated src/store/test-helpers.ts factory for mock store/proxy/setStore with per-test overrides.
  • [ ] 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.
  • [ ] Finding 42: steps watcher has noisy debug-looking warnings.
    • Evidence: electron/ipc/steps.ts emits console.warn on regular send/watch events.
    • Fix direction: remove the logs or route through structured debug logging.

Acceptance checks

  • coordinator test suite
  • affected store tests
  • README media still renders after screen asset cleanup
  • no tests depend on the removed warning strings

johannesjo avatar May 30 '26 16:05 johannesjo