Phase 2 Testing: findLastRoleIndex 替代 null 判断 (RFC #405) #407

Closed
opened 2026-05-23 04:22:17 +00:00 by xiaoju · 0 comments
Owner

验证目标

Agent 侧用 findLastRoleIndex 判断首次/re-entry,不再依赖 edgePrompt === null。

测试步骤

  • Step 1: 单元测试通过

    bun run test
    

    预期: 所有测试通过

  • Step 2: 首次进入 role — 无 session 缓存
    启动新 thread,第一步进入某 role
    预期: Agent 收到完整上下文(无 continuation),因为 history 中无该 role 记录

  • Step 3: Re-entry — 有 session 缓存
    继续 step 直到同一个 role 被再次调度
    预期: Agent 使用 continuation 模式(因为 history 中有该 role 之前的记录)

验证完成标准

所有 checkbox 打勾
CI 构建成功

Ref: #405, #404

## 验证目标 Agent 侧用 findLastRoleIndex 判断首次/re-entry,不再依赖 edgePrompt === null。 ## 测试步骤 - [ ] **Step 1: 单元测试通过** ```bash bun run test ``` **预期:** 所有测试通过 - [ ] **Step 2: 首次进入 role — 无 session 缓存** 启动新 thread,第一步进入某 role **预期:** Agent 收到完整上下文(无 continuation),因为 history 中无该 role 记录 - [ ] **Step 3: Re-entry — 有 session 缓存** 继续 step 直到同一个 role 被再次调度 **预期:** Agent 使用 continuation 模式(因为 history 中有该 role 之前的记录) ## 验证完成标准 ✅ 所有 checkbox 打勾 ✅ CI 构建成功 Ref: #405, #404
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#407