Design: improve select and regenerate flow#2200
Conversation
teleaziz
commented
Jul 17, 2026
- Reserve pending node rewrites before accepting candidates
- Use transactional multi-key compare-and-set for proposal publication and cleanup
- Prevent new regeneration requests from overwriting an active acceptance
- Atomically clean up superseded and cancelled proposals
- Add regression coverage for accept, reject, refinement, and cancellation races
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1e5278b to
170b4d4
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Here's a visual recap of what changed: Open the full interactive recap |
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Code Review Summary
The latest PR update addresses the previously reported D1 transaction issue by adding a dialect-specific atomicBatch execution path and routing D1 multi-key CAS operations through guard statements plus atomic mutations. The non-D1 transaction path remains intact, and the added tests cover D1 batch wiring, mixed update/insert/delete transitions, mismatch rollback, and error propagation.
The guard statements intentionally insert the shared guard key only when a CAS precondition fails; because the guard row is inserted first, that path produces a unique-constraint failure and causes D1's batch to roll back. Successful mutations are then checked for exactly one affected row before events are emitted. The design action changes and race-focused tests continue to provide good coverage for acceptance reservations and superseding requests.
No new high-confidence issues were found. The previously open D1 compatibility comment was verified as fixed and resolved before this review.
🧪 Browser testing: Skipped — browser testing infrastructure is unavailable (Chrome MCP tools were absent); all 11 grounded UI cases were couldnt_verify due to environment limitations.
