feat(voyage/voyage_10254b28b467): implementation milestone#160
Draft
Hazzng wants to merge 5 commits into
Draft
Conversation
added 5 commits
July 10, 2026 21:09
…rite optimistic fencing
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Trek Voyage
voyage_10254b28b467Ticket: 131
Base ref:
mainCheckpoint commit:
cab17ec5eb6bf5ff2b03a50d1a009aab4877c0d6Repair rounds: 0
Implementation summary
Passed assertions (evidence)
A4/workspace/artifacts/logs/cmd_56b62bdd-cf7f-46f6-946c-7d24a83d3f3e.outA5/workspace/artifacts/logs/cmd_3f5cc939-0073-4151-a4da-6be505ac1211.outFiles changed
src/sql-fs/tests/unit/sql-fs.script-fencing.test.tsChecks executed
pip install -e . 2>/dev/nullpip install . 2>/dev/nullpip install -q pytest ruff mypypytest --versionpython -m pytest src/sql-fs/tests/unit/sql-fs.script-fencing.test.ts -x -qnode -vpnpm -vnpm -vnpx vitest --versiongit diff --checkpython -c from pathlib import Path; p=Path('src/sql-fs/tests/unit/sql-fs.script-fencing.test.ts'); text=p.read_text(); assert "fails A's commit after lease expiry before first write, while B's append survives" in text; assert "transaction pooling by reusing the opened script tx" in text; assert "state.currentVersion = 42;" in text; assert "await expect(writerA.endScriptScope()).rejects.toMatchObject({ code: \"ECOHERENCE\" });" in text; print('fenced-path regression coverage present')Known limitations
none
Unresolved non-blocking findings
none
Rollback
To revert this change:
git revertthe commits onvoyage/voyage_10254b28b467, ordelete the branch — no merge has occurred (draft PR only).
Summary by cubic
Add sandbox version epoch fencing to
sql-fs(Postgres). We pin the sandbox version at script-open and suppress stale writes withECOHERENCE, improving cross-session consistency (Ticket 131).New Features
sandboxes.version BIGINT(default 0) and read it at open time.SessionManagercapturesversionfrom PG and exposessession.sandboxVersion; plumbed viacreatePostgresSandboxFs.SqlFsthreads the pinned version into script transactions and composite writes;PostgresDialectchecks the version under advisory lock and throwsECOHERENCEon mismatch.SqlDialectsignatures to accept optionalsandboxVersionforsetSandboxContextWithLock,mkdirComposite,rmComposite,writeFileComposite, andmvComposite.Migration
src/sql-fs/migrations/postgres/0007_add_sandbox_version.sqlbefore deploy. Existing sandboxes start at 0; no client-side changes needed.Written for commit cab17ec. Summary will update on new commits.