storage: serialize validation in write transactions - #63
Merged
Conversation
TusanHomichi
marked this pull request as ready for review
September 5, 2026 18:09
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
4 tasks
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.
Concurrent writes in the older services could validate a deferred SQLite snapshot and fail on promotion with an internal error. All application-owned multi-statement write transactions now reserve the writer through
storage::write_txbefore transactional validation. Competing overlapping-session requests return one 201 and one 409 withinterval_overlap.programs/content.rsand persistence intoprograms/persistence.rs; retain policy and transaction orchestration inprograms.rswith compatible exports. The move/new-owner/impact/proof plan was recorded in this draft PR before broad edits. This completes refactor(rust): separate program and draft workspace ownership #58's programs slice; its draft-workspace slice remains open.Validated at
b1e8d45484108cf8faa730b4c8e211899d3903b5:npm ci,npm run check, andnpm run buildin web.cargo fmt --checkandcargo clippy --workspace --all-targets -- -D warnings.cargo test --workspace: 155 passed, including all 21 new concurrency tests and existing program/API, enrollment/lifecycle, authentication, draft/review, finalization, and export suites.cargo build -p consolebook-server,npx playwright install chromium, andnpm run e2e -- --workers=2 --trace retain-on-failure: 8 passed.Heavy local suites ran sequentially, with
CARGO_BUILD_JOBS=2andRUST_TEST_THREADS=2on the full Rust run. The concurrency tests cover each retrofitted write path, legitimate pairs of successes, the HTTP conflict response, cancellation versus draft coverage, and zero-wait probes after refusals. A negative control temporarily restored session creation's deferred transaction: the overlap regression failed in 0.06s because the writers returned before the held reservation was released; the immediate implementation was restored before final validation. Extracted content/validation and persistence bodies were also compared with main and match apart from formatting and sibling visibility.The existing low-severity npm advisory chain remains tracked in #54. Live preview was not deployed.
Closes #27. Refs #58.