Skip to content

[P3] Add tests for high-risk untested modules #654

Description

@itsmiso-ai

Problem

automation-sync.ts (382 lines, sync orchestration logic with error handling), groomer-lock.ts (DB-backed concurrency lock), and resolve-actor.ts (audit attribution) lack test coverage. These are risk areas where a regression would cause data integrity issues.

Evidence

  • src/lib/automation-sync.ts — 382 lines, no test file
  • src/lib/groomer/groomer-lock.ts — DB transaction with concurrent lock acquisition, no test
  • src/lib/resolve-actor.ts — audit trail attribution, no test

Acceptance

Add unit tests covering the main execution paths and error conditions for these three modules.


Decomposed from #648 (Weekly tech debt audit: misospace/dispatch - 2026-07-22).

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditAudit, review, or investigation work.priority/p3Low priority.status/readyReady for Dispatch worker pickup.type/choreRoutine tasks and maintenance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions