Phase 4 Testing: Fork + GC #159

Closed
opened 2026-05-09 07:21:06 +00:00 by xiaoju · 0 comments
Owner

验证目标

零拷贝 fork + mark-and-sweep GC。

前置

  • Phase 3 已合入 main
  • 分支: feat/155-cas-thread-phase-4

测试步骤

  • Step 1: Fork thread

    uncaged-workflow run hello-template --prompt "Test fork" --max-rounds 2
    uncaged-workflow thread list
    uncaged-workflow thread fork <thread-id>
    

    预期: fork 成功,新 thread 出现,ancestors[0] 指向 fork 点

  • Step 2: CAS 节点共享
    预期: 原 thread 和 fork thread 的 StartNode hash 相同,无重复存储

  • Step 3: GC 清理

    uncaged-workflow thread rm <thread-id>
    uncaged-workflow cas gc
    

    预期: 仅被删除 thread 独有的 CAS blob 被清理,共享节点保留

  • Step 4: GC 单元测试

    bun test packages/workflow-execute/__tests__/gc*.test.ts
    

    预期: mark-and-sweep 从 threads.json + history 收集 roots 正确

验证完成标准

所有 checkbox 打勾
无旧 .data.jsonl 代码路径残留

Ref: #155
小橘 🍊(NEKO Team)

## 验证目标 零拷贝 fork + mark-and-sweep GC。 ## 前置 - Phase 3 已合入 main - 分支: `feat/155-cas-thread-phase-4` ## 测试步骤 - [ ] **Step 1: Fork thread** ```bash uncaged-workflow run hello-template --prompt "Test fork" --max-rounds 2 uncaged-workflow thread list uncaged-workflow thread fork <thread-id> ``` **预期:** fork 成功,新 thread 出现,ancestors[0] 指向 fork 点 - [ ] **Step 2: CAS 节点共享** **预期:** 原 thread 和 fork thread 的 StartNode hash 相同,无重复存储 - [ ] **Step 3: GC 清理** ```bash uncaged-workflow thread rm <thread-id> uncaged-workflow cas gc ``` **预期:** 仅被删除 thread 独有的 CAS blob 被清理,共享节点保留 - [ ] **Step 4: GC 单元测试** ```bash bun test packages/workflow-execute/__tests__/gc*.test.ts ``` **预期:** mark-and-sweep 从 threads.json + history 收集 roots 正确 ## 验证完成标准 ✅ 所有 checkbox 打勾 ✅ 无旧 .data.jsonl 代码路径残留 Ref: #155 小橘 🍊(NEKO Team)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#159