Phase 2 Testing: kill/pause/resume 合并 + worker control 提取 #95

Closed
opened 2026-05-07 16:23:00 +00:00 by xingyue · 0 comments
Owner

验证目标

三个克隆文件合并为 commands/thread/control.tsreadWorkerCtl 提取到 worker-spawn.ts

测试步骤

  • Step 1: 旧文件已删除

    ls packages/cli-workflow/src/commands/thread/kill.ts packages/cli-workflow/src/commands/thread/pause.ts packages/cli-workflow/src/commands/thread/resume.ts 2>&1
    

    预期: No such file(三个文件合并为 control.ts)

  • Step 2: control.ts 存在且导出三个函数

    grep 'export function' packages/cli-workflow/src/commands/thread/control.ts
    

    预期: 导出 cmdKill, cmdPause, cmdResume(或统一的 cmdThreadControl)

  • Step 3: readWorkerCtl 在 worker-spawn.ts 中

    grep 'export.*readWorkerCtl' packages/cli-workflow/src/worker-spawn.ts
    

    预期: 找到 export

  • Step 4: Biome + build + test 通过

    cd packages/cli-workflow && bun run check && bun run build && bun test
    

    预期: 全部 pass

  • Step 5: kill/pause/resume 命令功能正常

    bun run packages/cli-workflow/src/cli.ts thread kill --help 2>&1
    bun run packages/cli-workflow/src/cli.ts thread pause --help 2>&1
    bun run packages/cli-workflow/src/cli.ts thread resume --help 2>&1
    

    预期: 正确的 usage 输出

验证完成标准

所有 checkbox 打勾
代码行数明显减少

Ref

RFC #93, Phase 2

## 验证目标 三个克隆文件合并为 `commands/thread/control.ts`,`readWorkerCtl` 提取到 `worker-spawn.ts`。 ## 测试步骤 - [ ] **Step 1: 旧文件已删除** ```bash ls packages/cli-workflow/src/commands/thread/kill.ts packages/cli-workflow/src/commands/thread/pause.ts packages/cli-workflow/src/commands/thread/resume.ts 2>&1 ``` **预期:** No such file(三个文件合并为 control.ts) - [ ] **Step 2: control.ts 存在且导出三个函数** ```bash grep 'export function' packages/cli-workflow/src/commands/thread/control.ts ``` **预期:** 导出 cmdKill, cmdPause, cmdResume(或统一的 cmdThreadControl) - [ ] **Step 3: readWorkerCtl 在 worker-spawn.ts 中** ```bash grep 'export.*readWorkerCtl' packages/cli-workflow/src/worker-spawn.ts ``` **预期:** 找到 export - [ ] **Step 4: Biome + build + test 通过** ```bash cd packages/cli-workflow && bun run check && bun run build && bun test ``` **预期:** 全部 pass - [ ] **Step 5: kill/pause/resume 命令功能正常** ```bash bun run packages/cli-workflow/src/cli.ts thread kill --help 2>&1 bun run packages/cli-workflow/src/cli.ts thread pause --help 2>&1 bun run packages/cli-workflow/src/cli.ts thread resume --help 2>&1 ``` **预期:** 正确的 usage 输出 ## 验证完成标准 ✅ 所有 checkbox 打勾 ✅ 代码行数明显减少 ## Ref RFC #93, Phase 2
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#95