feat(cli): add first-class session adoption - #8
Merged
Conversation
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.
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).seednow records the base checkout's pin infs_session_metadata.seed_pin, so provenance travels inside the artifact.adoptverifies the provided base checkout against the recorded seed pin and refuses on mismatch;--pinoverrides the expectation explicitly.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.shon the stacked tip: 24 PASS / 0 FAIL / 1 SKIP (FUSE-over-io_uring, host kernel lacks support; not code).