Skip to content

feat(worktree): ScorpioFS backend — attach, fork and sync over Worktree v2 - #2

Open
Ivanbeethoven wants to merge 1 commit into
mainfrom
feat/scorpiofs-worktree-v2
Open

Ivanbeethoven wants to merge 1 commit into
mainfrom
feat/scorpiofs-worktree-v2

Conversation

@Ivanbeethoven

Copy link
Copy Markdown
Owner

Summary

Adds the Libra side of the Worktree Control Protocol v2 (companion to gitmono-dev/scorpiofs#65):

  • libra worktree add --backend scorpiofs [-b <branch>] <path> — registers a host-side worktree whose working tree is a ScorpioFS FUSE mount; attaches the mount via POST /antares/worktrees (pinning the lower to the trunk tip) and writes the .libra pointer (symlink into the main gitdir's worktrees/<id>/) plus scorpiofs_mount_id.
  • libra fork <path> [-b <branch>] — forks the current ScorpioFS-backed worktree via the daemon (chain mode by default: sealed shared lower layer, zero copy); the child is born on its own branch.
  • libra sync [-m <message>]add -A, one commit, push to the configured upstream, then commit-finalize: the daemon pins its lower to the pushed revision and clears exactly the committed upper entries. Only a ready finalize counts as a completed sync; push alone is never enough.
  • Sync/fork drive the v2 endpoints with LIBRA_SCORPIOFS_ENDPOINT (default http://127.0.0.1:2725/antares). The ScorpioFS mount is the data plane; Libra never writes VCS metadata into it.

ScorpioFS side: gitmono-dev/scorpiofs#65.

Test plan

  • End-to-end against real mega2 (docker) + ScorpioFS FUSE in WSL2: deploy → seed mega/rk8s into the monorepo → worktree add --backend scorpiofs → edit → libra sync → clone-back content verification → refresh_lower; two consecutive rounds green
  • libra status through the .libra symlink resolves correctly before and after finalize/refresh; effective diff reports zero fake modifications
  • ScorpioFS-side unit tests (124) and E2E harness green (scorpiofs#65)
  • CI

…ee v2

Adds the Libra side of the Worktree Control Protocol v2 (companion to the
ScorpioFS PR):

- `libra worktree add --backend scorpiofs [-b <branch>] <path>`: registers a
  host-side worktree whose working tree is a ScorpioFS FUSE mount, attaches
  the mount via `POST /antares/worktrees` (which pins the lower to the
  trunk tip) and writes the `.libra` pointer (symlink into the main
  gitdir's `worktrees/<id>/`) plus `scorpiofs_mount_id`.
- `libra fork <path> [-b <branch>]`: forks the current ScorpioFS-backed
  worktree via the daemon (`chain` mode by default: sealed shared lower
  layer, zero copy); the child is born on its own branch.
- `libra sync [-m <message>]`: add -A, one commit, push to the configured
  upstream, then `commit-finalize` — the daemon pins its lower to the
  pushed revision and clears exactly the committed upper entries. Only a
  `ready` finalize counts as a completed sync; push alone is never enough.
- sync/fork drive the v2 endpoints with `LIBRA_SCORPIOFS_ENDPOINT`
  (default `http://127.0.0.1:2725/antares`); the ScorpioFS mount is
  treated as the data plane and Libra never writes VCS metadata into it.

 ScorpioFS-side: gitmono-dev/scorpiofs#65.
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