Skip to content

Design: improve select and regenerate flow#2200

Open
teleaziz wants to merge 3 commits into
mainfrom
fix-select-reprompt
Open

Design: improve select and regenerate flow#2200
teleaziz wants to merge 3 commits into
mainfrom
fix-select-reprompt

Conversation

@teleaziz

Copy link
Copy Markdown
Contributor
  • 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

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@teleaziz
teleaziz force-pushed the fix-select-reprompt branch from 1e5278b to 170b4d4 Compare July 17, 2026 07:23
@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

builder-io-integration[bot]

This comment was marked as outdated.

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants