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).
Problem
automation-sync.ts(382 lines, sync orchestration logic with error handling),groomer-lock.ts(DB-backed concurrency lock), andresolve-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 filesrc/lib/groomer/groomer-lock.ts— DB transaction with concurrent lock acquisition, no testsrc/lib/resolve-actor.ts— audit trail attribution, no testAcceptance
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).