Skip to content

docs(dsql): update SELECT FOR UPDATE guidance and evals - #271

Merged
anwesham-lab merged 2 commits into
awslabs:mainfrom
mchenjh:fix/dsql-select-for-update
Sep 14, 2026
Merged

anwesham-lab merged 2 commits into
awslabs:mainfrom
mchenjh:fix/dsql-select-for-update

Conversation

@mchenjh

@mchenjh mchenjh commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Related

Part of a coordinated Aurora DSQL SELECT FOR UPDATE rollout. Sibling PR links will be added after all PRs are opened.

Changes

  • Remove the obsolete all-primary-key equality and single-table restrictions from DSQL guidance.
  • Document commit-time OCC behavior, supported lock clauses, SQLSTATE 40001 retries, and 10 MiB locked-primary-key accounting.
  • Correct framework-specific guidance, including Rails transaction locking.
  • Add a joined/non-key SELECT FOR UPDATE functional eval and precise row-modification matcher coverage.
  • Bump the databases-on-aws plugin version to 1.9.0.

Validation: 60 deterministic eval-runner tests passed; canonical guidance matches the MCP steering mirror; 22 eval prompts contain 93 assertions. A full model eval run was attempted, but the subject runner timed out after 180 seconds with zero turns on the first eval, so no model-quality result was produced.

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

Related rollout PRs

@mchenjh

mchenjh commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Review pass 1

Reviewed the rollout diff finalized in commit e453c9b with 16+ independent review roles covering correctness, framework behavior, documentation, security, tests, and scope. Findings addressed included Rails transaction boundaries, Hibernate inner-join wording, Tortoise outer-join behavior, supported lock-clause guidance, SQLSTATE 40001 retry scope, and 10 MiB locked-primary-key accounting. The Flyway change was intentionally kept as compatibility cleanup; migration-wide coordination remains out of scope.

Validation after fixes: deterministic eval-runner tests passed and the canonical guidance matched the MCP mirror.

@mchenjh

mchenjh commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Review pass 2

A fresh 16-reviewer convergence pass was run against the post-fix rollout, followed by direct current-file verification of every reported issue. No unresolved behavioral or CI-blocking findings remain in commit e453c9b.

Final validation: 60 deterministic eval-runner tests passed; 22 prompts / 93 assertions validate; canonical and MCP steering files are byte-identical; all five diffs pass git diff --check. A full 22-prompt model eval was attempted, but the subject runner timed out after 180 seconds with zero turns on eval 1, so no model-quality result was produced.

@mchenjh mchenjh changed the title Update Aurora DSQL SELECT FOR UPDATE guidance and evals docs(dsql): update SELECT FOR UPDATE guidance and evals Sep 9, 2026
@anwesham-lab
anwesham-lab force-pushed the fix/dsql-select-for-update branch from e453c9b to 6708515 Compare September 14, 2026 16:15
anwesham-lab
anwesham-lab previously approved these changes Sep 14, 2026
@anwesham-lab

Copy link
Copy Markdown
Member

LGTM, ran new fleet of reviewers and found no blocking issues or risks. Language audit was clean. Was able to reproduce evals!

auto-merge was automatically disabled September 14, 2026 17:42

Head branch was pushed to by a user without write access

anwesham-lab pushed a commit to awslabs/aurora-dsql-orms that referenced this pull request Sep 14, 2026
## Summary

Update Aurora DSQL ORM adapters and guidance for the GA SELECT FOR
UPDATE behavior. Part of a coordinated rollout; sibling PR links will be
added after all PRs are opened.

## Changes

- Update Hibernate guidance and add coverage for non-key predicates with
an inner join.
- Preserve Hibernate's outer-join limitation.
- Enable Tortoise `select_for_update()` while disabling unsupported `FOR
NO KEY UPDATE`.
- Add Tortoise coverage for non-key filters and both
`update_or_create()` paths.
- Document commit-time OCC behavior, SQLSTATE 40001 retries, and 10 MiB
locked-primary-key accounting.
- Document Tortoise's outer-join query-builder limitation for joined
locking queries.

## Validation

- Hibernate: `./gradlew test` passed.
- Tortoise: Ruff format/lint passed; 124 unit tests and 6 subtests
passed.
- Live Aurora DSQL integration tests were not run locally.

## Related rollout PRs

- Canonical agent guidance: awslabs/agent-plugins#271
- Kiro Power mirror: awslabs/mcp#4607
- Flyway compatibility cleanup: flyway/flyway-community-db-support#149
- ORM adapters: #626
- Samples: aws-samples/aurora-dsql-samples#1821
@anwesham-lab
anwesham-lab added this pull request to the merge queue Sep 14, 2026
Merged via the queue into awslabs:main with commit 097fe8a Sep 14, 2026
39 of 41 checks passed
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.

3 participants