feat(dactyl): complete atomic transaction/batch contract (#24) - #43
Merged
Conversation
Close remaining #24 proof gaps after PR #31: - Document nesting (unsupported), retry (caller-owned), timeout (none on public surface), and idempotency (not provided) for `transaction`. - Neon adapter: decode batch error bodies without requiring success shape. - Conformance mock `/batch` is snapshot-atomic with insert/select/count. - Tests: Neon failure-injection rollback; event-plus-state fixture on SQLite and Neon mock; empty-batch no-op. Links DecapodLabs/decapod#1111 and #1120 as consumers of this contract.
This was referenced Aug 2, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the remaining proof obligations for dactyl#24 after the partial implementation in PR #31.
Contract docs
Ok([])Adapter
execute_batchreads response bytes first so non-2xx error bodies surface asAdaptererrors without a success-shaped decode.Proof
/batchis snapshot-atomic (apply statements, rollback snapshot on any error).atomic_transaction_rollback_neon_mock— mid-batch duplicate key leaves no partial row.atomic_event_plus_state_sqlite/_neon_mock— state + event in one unit; failure leaves neither side.Test plan
cargo fmt --all -- --checkcargo clippy --all-targets --features "sqlite neon" -- -D warningscargo test --features "sqlite neon"(15 conformance + 7 unit + 5 release)Closes #24