Skip to content

feat(cli): add first-class session adoption - #8

Merged
factory-ain3sh merged 2 commits into
mainfrom
adopt-verb
Jul 28, 2026
Merged

feat(cli): add first-class session adoption#8
factory-ain3sh merged 2 commits into
mainfrom
adopt-verb

Conversation

@factory-ain3sh

Copy link
Copy Markdown
Collaborator

What

vfs adopt <session-id> --db <path> --base <path> [--pin <rev>] [--json]: installs a received session database into the local store as one atomic operation, replacing the hand-written materialization contract receivers previously assembled under ~/.vfs/run (write delta.db + base_path by hand, hope the layout never changes).

  • seed now records the base checkout's pin in fs_session_metadata.seed_pin, so provenance travels inside the artifact.
  • adopt verifies the provided base checkout against the recorded seed pin and refuses on mismatch; --pin overrides the expectation explicitly.
  • Staged install with atomic rename: a failed adopt leaves no partial session.
  • Exit-code contract preserved; MANUAL regenerated.

Why

The droid handoff receiver (factory-mono AC-768 stack) needs to materialize a transferred session without reimplementing vfs store internals. A first-class verb keeps the store layout private to vfs and gives the receiver a stable, versionable contract.

Testing

fmt / clippy / unit tests green. Full gate.sh on the stacked tip: 24 PASS / 0 FAIL / 1 SKIP (FUSE-over-io_uring, host kernel lacks support; not code).

@factory-ain3sh
factory-ain3sh merged commit 6861d31 into main Jul 28, 2026
10 checks passed
@factory-ain3sh
factory-ain3sh deleted the adopt-verb branch July 28, 2026 23:54
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