Repository navigation
Share repository receipt attempt locking - #5541
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. What this changesThis PR combines attempt locking and admission validation in one shared helper and extends PostgreSQL recovery coverage. Example: A recovery request overlaps an attempt's invalidation transaction.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open for maintainer triage: it preserves transaction-scoped locking, adds meaningful concurrent-recovery coverage, and has no identified blocking defect. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe worker-owned receipt listener receives broker requests over a private socket, validates persisted attempt ownership, and reads or updates receipt evidence inside State transactions. flowchart LR
A[Repository Driver] --> B[Broker control]
B --> C[Private receipt listener]
C --> D[Receipt store]
D --> E[State transaction]
E --> F[PostgreSQL attempts and receipts]
Technical reviewBest possible solution: Retain the shared helper and focused contention coverage while preserving the existing transaction and receipt contracts. Do we have a high-confidence way to reproduce the issue? This PR preserves existing behavior rather than fixing a reported bug; source inspection confirms the same lock, validation, and transaction sequence before and after. Is this the best way to solve the issue? Combining the existing lock and guard in one private helper is a proportionate simplification, and the added test checks a distinct persistence-ordering invariant. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4ecdd59c5a64. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 14, 2026, 12:03 PM ET / 17:03 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What changed
Receipt admission, bind, fence, and dispose now share the attempt lock and admission check. Each operation awaits the helper inside its transaction before reading or writing a receipt. Status still uses the read-only view.
Validation