62 new tests across 6 files covering the modules introduced in the v2
single-writer discipline layer that had no test coverage:
- write-intercept.test.ts (15): isBlockedStateFile path matching for
STATE.md (blocked) vs other .gsd/ files (allowed), BLOCKED_WRITE_ERROR
- sync-lock.test.ts (7): acquireSyncLock/releaseSyncLock including
lock file creation, round-trip, and stale lock override
- workflow-events.test.ts (15): appendEvent (creates dir, valid JSONL,
deterministic hash), readEvents (empty, parse, skip corrupted),
findForkPoint (edge cases), compactMilestoneEvents (archive/truncate)
- workflow-manifest.test.ts (8): snapshotState, writeManifest,
readManifest (null/parse/version guard), bootstrapFromManifest
round-trip restore
- workflow-projections.test.ts (17): renderPlanContent pure function —
H1/Goal/Demo/Tasks structure, [x]/[ ] checkboxes, Estimate/Files/
Verify/Duration sublines, task ordering
- post-mutation-hook.test.ts (5): regression — verifies that after
handleCompleteTask, event-log.jsonl and state-manifest.json are
both written by the post-mutation hook; also confirms hook failures
are non-fatal (handler still returns success)
All 62 tests pass. Zero regressions introduced.