Skip to content

feat(workbench): restore checkpoints to COW forks#403

Closed
wchwawa wants to merge 1 commit into
fix/fuse-snapshot-root-adapterfrom
feat/workbench-restore-to-fork
Closed

feat(workbench): restore checkpoints to COW forks#403
wchwawa wants to merge 1 commit into
fix/fuse-snapshot-root-adapterfrom
feat/workbench-restore-to-fork

Conversation

@wchwawa

@wchwawa wchwawa commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add deterministic and idempotent Workbench restore-to-fork
  • materialize checkpoint state as a writable COW fork while leaving the source unchanged
  • persist restore operations, staging cleanup, restore_manifest.json, and paged durable base references
  • retain borrowed objects after source deletion or snapshot retirement, then release them after destination deletion
  • expose the typed workbench_restore MCP tool and structured restore errors
  • refresh and fully restage client uploads after a stale object-GC claim
  • check in the real RustFS and LingTai acceptance harness

Stack and scope

Depends on #402.

The Workbench restore call chain is LingTai Agent to Workbench MCP to MetadataClient to restore_subtree_path_to_fork_initialized to COW fork and restore manifest. It does not traverse nokv-fuse.

The diff from the PR base under crates/nokv-fuse is empty.

Explicitly excluded:

  • operator rollback journal and in-place swap implementation
  • global mutation fence
  • FUSE writeback fencing or journal v3
  • SubtreeReplaced and whole-mount invalidation
  • remote WatchSubtree or ReplayWatch support
  • FUSE object-GC restage or replay
  • new FUSE invalidation metrics

The small baseline rollback change is only a safety boundary: it makes the raw inode API private and refuses rollback of fork-backed or borrowed targets so restore-to-fork base references cannot be corrupted. It adds no journal, fence, swap, or watch behavior.

Validation

  • cargo test --workspace --no-fail-fast: passed
  • cargo test --workspace --all-targets --no-run: passed
  • cargo clippy --workspace --all-targets -- -D warnings: passed
  • cargo fmt --all -- --check
  • git diff --check
  • checkpoint_restore_live_e2e_test.py: 12 passed
  • LingTai capability and skill tests: 58 passed

Checked-in full live E2E with real RustFS, nokv serve, Workbench MCP, and current LingTai main: 11 of 11 passed.

Coverage includes:

  • 200 concurrent renew calls with final expiry equal to the maximum promised expiry
  • 200 deterministic short-lease renew and reaper races
  • root mismatch checks before and after restart
  • 101 current and historical entries paged at limit 7 without gaps or duplicates
  • acknowledged metadata surviving SIGKILL
  • restore-to-fork source preservation and deterministic operation id
  • idempotent retry after restart
  • destination readability after source deletion and snapshot retirement
  • durable base-reference release and shared-object reclamation after destination deletion

@wchwawa

wchwawa commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

Companion LingTai Workbench skill PR: Lingtai-AI/lingtai-kernel#857

Signed-off-by: wchwawa <wch19961116@gmail.com>
@wchwawa
wchwawa force-pushed the fix/fuse-snapshot-root-adapter branch from 899e727 to c376e72 Compare July 11, 2026 04:55
@wchwawa
wchwawa force-pushed the feat/workbench-restore-to-fork branch from 2ed2106 to 8d0a6ec Compare July 11, 2026 04:55
@wchwawa wchwawa closed this Jul 13, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in NoKV Delivery Jul 13, 2026
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.

2 participants