Skip to content

[Paper/M3][P0] Integrate immutable snapshot lifecycle with Libra/Orion and add a tree correctness oracle #53

Description

@Ivanbeethoven

Parent research epic: #39

背景

ScorpioFS 只负责 projection、lower 和 upper;Libra 负责 refs、HEAD、index、commit 和 conflict stages。论文需要证明两者的状态不会漂移,并提供真实 Agent/Build 使用路径。

目标工作流

Attach

Libra resolves commit/tree
→ ScorpioFS creates snapshot-pinned workspace
→ readiness
→ process access enabled

Status

ScorpioFS delta manifest
→ Libra compares only candidate paths against index

Clean checkout/fast-forward

Libra resolves target
→ refresh preflight
→ transactional lower-generation switch
→ update HEAD/index

Commit

Libra builds commit C
→ ScorpioFS prepares snapshot C
→ transactional switch
→ selectively clear committed delta entries

Tasks

  • version control protocol 增加 SnapshotId/generation;
  • Libra/Orion 创建 mount 时传递 immutable revision;
  • 使用实际 refresh API,不再只调用 plan;
  • 处理 generation mismatch;
  • commit 成功后选择性清理 manifest;
  • crash 后由唯一 state owner 进行 reconciliation;
  • 外部 state ownership 模式不允许 ScorpioFS 与 Libra 双写 desired state;
  • 增加 capability negotiation;
  • 建立 reference-tree oracle;
  • oracle 可从 Git/Libra object tree materialize 期望文件树;
  • 对可见 path、type、mode、content digest 做比较;
  • 添加 attach/status/checkout/commit/unmount E2E;
  • 添加多个 Agent 基于同一 revision 的并行工作区;
  • CL build view 与 Libra worktree 模式继续保持语义隔离;
  • 记录 scripted Agent workload trace。

Acceptance Criteria

  • ScorpioFS active SnapshotId 与 Libra HEAD/index metadata 可验证一致;
  • reference oracle 在每次 attach/refresh/commit 后通过;
  • dirty workspace 不会被静默切换;
  • commit/refresh 任一阶段失败都不丢失 upper 修改;
  • restart 后可由 state owner 恢复或明确拒绝不一致状态;
  • 32 个并行 worktree 可独立修改和运行测试;
  • status 不需要扫描完整 monorepo;
  • E2E 测试能够在公开仓库/fixture 上运行。

Dependencies

Issue 3–8。Issue 6 对高效 status 和安全 cleanup 必需。


Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions