3 months ago
518c460* fix: enforce durable task review fingerprints Persist independent review verdicts as first-class task state, bind completion checks to a deterministic material task/artifact fingerprint, and reject stale passes after feedback or delivery mutations. Add persistence, pruning, restart, artifact mutation, material task mutation, optional failure, and race-safety regressions for task review completion gates. * fix: bind task reviews to live artifacts Hash every registered artifact's current workspace file in the centralized task review material snapshot, fail closed for missing/non-file/outside artifact targets, and recheck completion material after the awaiting-review transition so stale passes cannot authorize raced byte changes. Return durable persisted review rows in task directive results, including idempotent replays, so reviewTask no longer depends on pruned activity rows for recorded-review confirmation. * fix: bind reviews to observed task material Capture the task review material fingerprint before launching independent reviewers and require record_review to match that state before persisting a verdict. Revalidate fresh review fingerprints at task accept, keep stale reviewed tasks from completing after material changes, and avoid nested task-tail acquisition for directive-owned review/completion mutations. * fix: avoid directive task-tail reentry Route directive-owned lifecycle transitions, blockers, and active artifact revision completion through locked coordinator internals so applyDirective does not enqueue on the per-task mutation tail while holding the session DB directive lock. Add a deterministic concurrent API transition versus update_plan directive regression that settles under timeout instead of deadlocking. * fix: recheck live artifacts during task accept Compare the reviewed live-artifact evidence immediately before and after bulk task acceptance so external file edits during finalization cannot complete bytes that lack a fresh PASS. If the post-accept evidence changed, recover the task back to working and reject until the current delivery state receives a new independent PASS and proposal. * fix: roll back stale task artifact acceptance Run reviewed task acceptance through a validated SessionDb transaction so final live-artifact checks can abort before accepted artifact rows or Task accepted activity commit. Add deterministic regressions for in-transaction artifact mutation during accept and directive/API transition lock ordering. * fix: validate task proposal status atomically Revalidate reviewed live artifact evidence inside the same SessionDb status transaction that moves a reviewed task to awaiting_review so stale direct filesystem mutations cannot persist or notify awaiting_review. Add deterministic rewrite, delete, and symlink path-swap regressions for the final proposal hash-to-status gap, including restart persistence and fresh-current-byte positives.
Parent64f1cfd