Repository navigation
fix(tasks): task list fails when metadata overlaps completion - #153371
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 19, 2026, 10:58 PM ET / September 20, 2026, 02:58 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR lets task lists return completed tasks when metadata publication overlaps completion, while suppressing superseded notifications and adding regression coverage. Merge readiness✅ Ready for maintainer review The fix remains necessary on current main. No blocking correctness or security findings were identified, including in the callback amendment. Priority: P2 Review scores
Verification
How this fits togetherThe task registry records agent progress and completion in SQLite and maintains an in-memory view. Gateway task-list requests wait for accepted updates before returning that view, while publication guards prevent stale notifications. flowchart LR
A[Agent progress events] --> B[SQLite task writes]
C[Task completion] --> B
B --> D[Publication reconciliation]
D --> E[Current task view]
D --> F[Suppress superseded notifications]
G[Gateway task-list request] --> E
E --> H[Completed task response]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +8, Tests +204. Total +212 across 5 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep successful metadata settlement independent of stale notification eligibility, while preserving strict recovery checks and current-state reconciliation. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the path: hold a committed metadata receipt, start tasks.list, complete the task, then release the receipt. The added registered-request regression encodes this ordering; this review did not execute it. Is this the best way to solve the issue? Yes. The patch repairs the existing publication owner and carries forward write invalidation without adding another state owner, configuration option, or storage migration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d5eed044d23f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…aw#153371) * fix(tasks): task list fails when metadata overlaps completion * fix(tasks): bind publication recovery callback
What Problem This Solves
A task-list request can fail when a successful metadata write overlaps task completion.
User Impact
Return the current completed task after accepted metadata settles. Superseded notifications remain suppressed, including when a row changes and later returns to the same value. No schema, migration, or configuration changes.
Why This Change Was Made
Apply the strict expected-row guard only to recovered publications. Carry the existing write witness into publication invalidation before receipt claim and through later writes, preserving admission, rollback, and observer ownership.
Evidence
Before the callback declaration amendment, focused qualification passed 101 cases: 19 read, 36 publication, 39 event, and 7 lineage tests, with no skipped cases, unhandled errors, or suite errors. This includes the registered Gateway tasks.list regression, three existing stale-notification cases, and three SQLite recovery controls. The read regression failed on the original code; the queued-readback regression failed on the preceding candidate and passes with this fix. The queued-readback test uses the production publication owner with the existing in-memory store; event tests supply SQLite coverage.
The focused run used 137f4ba. All five patch preimages match observed main 1a51b55; its landed retry-budget change is included in the reviewed supporting context. The original five-file change passed formatting and patch checks, and independent automatic review completed both evidence batches without P0-P2 findings. These results predate the callback declaration amendment.
CI on 8e20640 flagged the extracted recovery callback under the unbound-method rule. The amendment changes its factory method declaration to an arrow property while preserving its closure behavior. Amendment formatting and patch checks passed. Local type-aware lint was not run because no suitable idle source and dependency checkout was available within the allocated memory limit. The narrow amendment review completed without P0-P2 findings. Fresh amended-head CI, including type-aware lint, must pass before landing.
The broader 32-agent/1,000-session live campaign remains outstanding. This change makes no throughput, latency, or startup-speed claim.