Add content-addressed filesystem snapshots with labels and reflog#169
Open
r33drichards wants to merge 17 commits into
Open
Add content-addressed filesystem snapshots with labels and reflog#169r33drichards wants to merge 17 commits into
r33drichards wants to merge 17 commits into
Conversation
🦀 mcp-v8-client Built SuccessfullyPackage: Add as dependency[dependencies]
mcp-v8-client = { git = "https://github.com/r33drichards/mcp-js", branch = "claude/dreamy-lovelace-hqfbt4" }CLI (from this branch)cargo install --git https://github.com/r33drichards/mcp-js --branch claude/dreamy-lovelace-hqfbt4 mcp-v8-client |
Add fs_merge: a flat per-path 3-way merge of two snapshot manifests (à la Mercurial manifestmerge, since our manifest is a flat content- addressed map). A clean merge yields a new snapshot CA id; divergent paths are reported as a structured base/ours/theirs conflict list. An optional common base makes it 3-way (only paths both sides changed conflict); without it the merge is 2-way. prefer=ours|theirs opts into auto-resolution. Exposed as the fs_merge MCP tool, POST /api/fs/merge, and mcp-v8-cli fs merge. Renames, chunk-level/line content merge, and CRDT semantics are out of scope (documented), matching how git/Mercurial/Irmin model tree merge.
🦀 mcp-v8-client Built SuccessfullyPackage: Add as dependency[dependencies]
mcp-v8-client = { git = "https://github.com/r33drichards/mcp-js", branch = "claude/dreamy-lovelace-hqfbt4" }CLI (from this branch)cargo install --git https://github.com/r33drichards/mcp-js --branch claude/dreamy-lovelace-hqfbt4 mcp-v8-client |
🦀 mcp-v8-client Built SuccessfullyPackage: Add as dependency[dependencies]
mcp-v8-client = { git = "https://github.com/r33drichards/mcp-js", branch = "claude/dreamy-lovelace-hqfbt4" }CLI (from this branch)cargo install --git https://github.com/r33drichards/mcp-js --branch claude/dreamy-lovelace-hqfbt4 mcp-v8-client |
When a path conflicts structurally, dispatch on detected content type (Irmin-style mergeable types): text files get a line-level 3-way merge via diffy, so edits to different lines of the same file auto-merge cleanly. Genuine same-line clashes are reported with kind, diff3 conflict markers, and unified diff_ours/diff_theirs for line-level resolution. Binary and SQLite content are detected and reported as whole-file conflicts behind a pluggable ContentMerger registry — the extension point where a SQLite changeset driver can later plug in. fs_merge now content-merges conflicts before reporting them; the pure merge core returns (merged, conflicts) so the store-aware pass can reconcile bytes. Surfaces (MCP/HTTP/CLI) and docs updated.
🦀 mcp-v8-client Built SuccessfullyPackage: Add as dependency[dependencies]
mcp-v8-client = { git = "https://github.com/r33drichards/mcp-js", branch = "claude/dreamy-lovelace-hqfbt4" }CLI (from this branch)cargo install --git https://github.com/r33drichards/mcp-js --branch claude/dreamy-lovelace-hqfbt4 mcp-v8-client |
The Nix docs build vendors crates from server/Cargo.lock in offline mode; it lacked the fs-snapshot deps (fastcdc/zstd/blake3/bincode/diffy), failing with 'no matching package named blake3'. Regenerate the standalone lock (also drops the now-unused native-tls/openssl stack, since reqwest uses rustls-tls). Vendor hash is a placeholder pending the real value from CI.
🦀 mcp-v8-client Built SuccessfullyPackage: Add as dependency[dependencies]
mcp-v8-client = { git = "https://github.com/r33drichards/mcp-js", branch = "claude/dreamy-lovelace-hqfbt4" }CLI (from this branch)cargo install --git https://github.com/r33drichards/mcp-js --branch claude/dreamy-lovelace-hqfbt4 mcp-v8-client |
🦀 mcp-v8-client Built SuccessfullyPackage: Add as dependency[dependencies]
mcp-v8-client = { git = "https://github.com/r33drichards/mcp-js", branch = "claude/dreamy-lovelace-hqfbt4" }CLI (from this branch)cargo install --git https://github.com/r33drichards/mcp-js --branch claude/dreamy-lovelace-hqfbt4 mcp-v8-client |
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.
Summary
This PR introduces a complete filesystem snapshot system enabling content-addressed, versioned virtual filesystems mounted by human-readable labels. The system is independent of the heap snapshot mechanism and includes immutable content storage, mutable pointer management with reflog history, and garbage collection.
Key Changes
Core Filesystem Snapshot Infrastructure
fs_store.rs: Content-addressed object store for filesystem snapshots with two object types:fs_labels.rs: Mutable pointer plane managing human-readable labels:heap_tags.rspatternfs_mount.rs: Userspace overlay mount implementation:pull()pins a base CA id at mount time so concurrent label moves don't shift running sessionspush()flushes upper layer over base into new pure manifest, returning its CA idfs_chunker.rs: Content-defined chunking with FastCDC:fs_gc.rs: Mark-and-sweep garbage collection:KeepAllorKeepLast(n)per labelAPI & Integration
HTTP API (
/api/fs/labels,/api/fs/push,/api/fs/reset, etc.):MCP Tools:
fs_ls,fs_pull,fs_label,fs_log,fs_push,fs_resetCLI Commands:
fs ls,fs pull,fs label,fs log,fs push,fs resetExecution Integration:
ExecRequest.fsparameter (label name or 64-hex CA id)ExecutionInfo.fsfield for resulting snapshot CA idExecutionConfig.fs_mountfor session overlay mountFsMountHandleinjected into OpState for fs ops delegationEngine & Storage
engine/mod.rs:fs_chunker,fs_gc,fs_labels,fs_mount,fs_storeparse_ca_hex(),ca_to_hex(),refop_str()FsLabelView,FsRefLogView,FsPushOutcomeheap_storage.rs: Extended trait withlist()anddelete()methods for GC support; addedMemoryHeapStoragefor testsfs.rs: Modified to support overlay mount delegation viaFsMountHandlein OpStateCluster support (
cluster.rs): AddedCasRequest/CasResponsefor linearizable compare-and-set through Raft leaderConfiguration & CLI
--enable-fs-snapshots: Enable the feature--fs-store-dir: Override blob storehttps://claude.ai/code/session_01HBS599o4kykxLfNTWojNVw