Phase 2 Testing: uwf thread fork #344

Closed
opened 2026-05-18 16:27:02 +00:00 by xiaoju · 1 comment
Owner

验证目标

能从历史步骤创建分支 thread,并继续执行

前置条件

有一个至少 2 步的 thread,用 uwf thread steps 拿到中间某步的 hash

测试步骤

  • Step 1: fork 一个活跃 thread

    uwf thread steps <thread-id>  # 拿到中间步骤 hash
    uwf thread fork <thread-id> <step-hash>
    

    预期: 返回 { thread: "new-ulid", forkedFrom: { thread: "original-id", step: "step-hash" } }

  • Step 2: 原 thread 不受影响

    uwf thread show <original-thread-id>
    

    预期: head 不变,和 fork 之前一样

  • Step 3: 新 thread 可以继续 step

    uwf thread step <new-thread-id>
    

    预期: 正常执行下一步,从 fork 点继续

  • Step 4: 新 thread 在 list 中可见

    uwf thread list
    

    预期: 新旧两个 thread 都在列表中

  • Step 5: fork 不存在的 step-hash

    uwf thread fork <thread-id> 0000000000000
    

    预期: 报错,提示 step not found in thread

  • Step 6: fork 已归档 thread

    uwf thread fork <archived-thread-id> <step-hash>
    

    预期: 可以 fork(从 history 找到 head,回溯验证 step 属于该 thread)

Ref

Phase 2 of #342

## 验证目标 能从历史步骤创建分支 thread,并继续执行 ## 前置条件 有一个至少 2 步的 thread,用 `uwf thread steps` 拿到中间某步的 hash ## 测试步骤 - [ ] **Step 1: fork 一个活跃 thread** ```bash uwf thread steps <thread-id> # 拿到中间步骤 hash uwf thread fork <thread-id> <step-hash> ``` **预期:** 返回 `{ thread: "new-ulid", forkedFrom: { thread: "original-id", step: "step-hash" } }` - [ ] **Step 2: 原 thread 不受影响** ```bash uwf thread show <original-thread-id> ``` **预期:** head 不变,和 fork 之前一样 - [ ] **Step 3: 新 thread 可以继续 step** ```bash uwf thread step <new-thread-id> ``` **预期:** 正常执行下一步,从 fork 点继续 - [ ] **Step 4: 新 thread 在 list 中可见** ```bash uwf thread list ``` **预期:** 新旧两个 thread 都在列表中 - [ ] **Step 5: fork 不存在的 step-hash** ```bash uwf thread fork <thread-id> 0000000000000 ``` **预期:** 报错,提示 step not found in thread - [ ] **Step 6: fork 已归档 thread** ```bash uwf thread fork <archived-thread-id> <step-hash> ``` **预期:** 可以 fork(从 history 找到 head,回溯验证 step 属于该 thread) ## Ref Phase 2 of #342
Owner

验证通过 — build 成功,113 tests all pass。

— 小墨 🖊️

验证通过 ✅ — build 成功,113 tests all pass。 — 小墨 🖊️
This repo is archived. You cannot comment on issues.
No Label
2 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#344