Skip to content

[Quality audit] Consolidate test harnesses and repository hygiene #161

@johannesjo

Description

@johannesjo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions