Skip to content

feat(voyage/voyage_10254b28b467): implementation milestone#160

Draft
Hazzng wants to merge 5 commits into
mainfrom
voyage/voyage_10254b28b467
Draft

feat(voyage/voyage_10254b28b467): implementation milestone#160
Hazzng wants to merge 5 commits into
mainfrom
voyage/voyage_10254b28b467

Conversation

@Hazzng

@Hazzng Hazzng commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Trek Voyage voyage_10254b28b467

Ticket: 131
Base ref: main
Checkpoint commit: cab17ec5eb6bf5ff2b03a50d1a009aab4877c0d6
Repair rounds: 0

Implementation summary

  • A4
  • A5

Passed assertions (evidence)

Assertion Status Evidence
A4 passed /workspace/artifacts/logs/cmd_56b62bdd-cf7f-46f6-946c-7d24a83d3f3e.out
A5 passed /workspace/artifacts/logs/cmd_3f5cc939-0073-4151-a4da-6be505ac1211.out

Files changed

  • src/sql-fs/tests/unit/sql-fs.script-fencing.test.ts

Checks executed

  • pip install -e . 2>/dev/null
  • pip install . 2>/dev/null
  • pip install -q pytest ruff mypy
  • pytest --version
  • python -m pytest src/sql-fs/tests/unit/sql-fs.script-fencing.test.ts -x -q
  • node -v
  • pnpm -v
  • npm -v
  • npx vitest --version
  • git diff --check
  • python -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 revert the commits on voyage/voyage_10254b28b467, or
delete the branch — no merge has occurred (draft PR only).


Draft PR created by Trek. Do not merge — human review required.


Summary by cubic

Add sandbox version epoch fencing to sql-fs (Postgres). We pin the sandbox version at script-open and suppress stale writes with ECOHERENCE, improving cross-session consistency (Ticket 131).

  • New Features

    • Add sandboxes.version BIGINT (default 0) and read it at open time.
    • SessionManager captures version from PG and exposes session.sandboxVersion; plumbed via createPostgresSandboxFs.
    • SqlFs threads the pinned version into script transactions and composite writes; PostgresDialect checks the version under advisory lock and throws ECOHERENCE on mismatch.
    • Update SqlDialect signatures to accept optional sandboxVersion for setSandboxContextWithLock, mkdirComposite, rmComposite, writeFileComposite, and mvComposite.
    • Add tests for script fencing, transaction pooling compatibility, advisory-lock SQL, and session rehydration pinning.
  • Migration

    • Run src/sql-fs/migrations/postgres/0007_add_sandbox_version.sql before deploy. Existing sandboxes start at 0; no client-side changes needed.

Written for commit cab17ec. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 46a607af-22b3-4b9b-a785-4125666bb8d8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch voyage/voyage_10254b28b467

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant