Skip to content

feat(server): integrate Riftri worktree storage - #3

Draft
Kinfe123 wants to merge 2 commits into
verify/upstream-a6ec88f7from
feat/riftri-integration-clean
Draft

Kinfe123 wants to merge 2 commits into
verify/upstream-a6ec88f7from
feat/riftri-integration-clean

Conversation

@Kinfe123

@Kinfe123 Kinfe123 commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Problem

T3 creates ordinary Git linked worktrees, which duplicate checked-out file storage. This draft adds a native copy-on-write storage path while retaining real Git worktrees and recovery safeguards.

Integration

  • Bundle released Riftri 0.6.4 in desktop and standalone CLI artifacts; no global Git replacement or user installation is required.
  • Route supported worktree lifecycle operations through the storage adapter. The fork defaults to auto mode; explicit Git mode remains available. Auto fallback is limited to pre-mutation policy refusals; operational failures remain errors.
  • Recover managed storage at startup and guard file, terminal, and provider access when recovery fails.
  • Cover lifecycle behavior, private-write isolation, allocation, packaging, and creation latency in CI.

Fork-only scope

This remains a draft in farming-labs/t3code, not a submission to pingdotgg/t3code. Fork PR #2 is unchanged. Any upstream proposal should first seek maintainer agreement on an opt-in scope; this fork's auto default is not a proposed upstream default.

The base verify/upstream-a6ec88f7 contains upstream a6ec88f7a716fc421bd22c2484881c44110f9375 plus a separate hosted-runner substitution commit. Those runner changes are shared by base and head and are not in this PR diff. The integration commits can be applied independently; the fork CI base is not intended for upstream. This upgrade does not rebase onto later upstream changes.

Verification — Riftri 0.6.4

  • All 19 CI jobs passed on upgrade commit b4c3d65be933751c99dff232d95136c4256fe64d: complete run and measurement artifacts. This includes all six server shards, web and other workspace tests, typecheck, lint, native APFS/OverlayFS storage tests, the complete desktop archive's bundled native runtime, and standalone CLI startup.

  • The upgrade commit changes only the dependency pin, nine-package lock graph, exact-version release-age exceptions, and dependency test fixture.

  • All nine package integrity hashes match the npm registry; provenance receipts were verified.

  • Local targeted formatting, frozen-lockfile validation, 20 CLI external-dependency tests, and the isolated bundled Node adapter test passed.

  • Broader local suites could not load new upstream dependencies in the lightweight local dependency fixture. They are not claimed as passing locally; CI uses the complete dependency installation.

Measured storage and creation time

The real GitVcsDriverCore fixture creates three worktrees of the same tree on an isolated volume: 32 MiB incompressible data plus 257 text files. Allocation includes the initial immutable base and all three views, measured with filesystem free-space deltas rather than summed du.

Backend Git allocation Riftri allocation Saving Git create Riftri cold create Riftri cached create
macOS APFS 107.47 MB 36.22 MB 66.30% 128–369 ms 735 ms 447–519 ms
Linux OverlayFS 107.22 MB 36.04 MB 66.39% 67–87 ms 357 ms 194–286 ms

MB above is decimal. Reports are attached to the current CI run as riftri-performance-macos-15 and riftri-performance-ubuntu-24.04, and identify riftri 0.6.4.

Creation is slower than Git in this fixture. Each backend has one cold and two cached observations, not a latency distribution or evidence of a speedup over 0.6.3. Dependencies, ignored files, and build outputs are not cloned or shared. These results demonstrate tracked-checkout storage savings, not a 66% reduction in total user workspace storage.

The fixture also verifies clean Git status, matching HEAD, exact-base reuse, private-write isolation, and managed cleanup. Integrity checks, journals, and recovery are not skipped to improve timing.

Model: GPT-5. Harness: Codex.

Kinfe123 and others added 2 commits October 8, 2026 11:08
Use native copy-on-write worktrees with fail-closed lifecycle handling, workspace-scoped Linux recovery, published Riftri packaging, and real-filesystem and artifact verification.
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