已开启
fix(orchestrator): Add reopen_phase action and empty-return handling clause #581
fix(orchestrator): Add reopen_phase action and empty-return handling clause #581
已开启
lizixuan创建于 2 天前
lizixuan
lizixuan
2 天前

Closes #120

问题

两个相互独立的缺口:

  1. 状态机无"重新验证"出口:phase 一旦 verified 就锁死,无法重新验证(如修了签名/接口问题),且 verified 拒绝报错不告诉下一步。
  2. 子代理空返回无应对条款:classic 版 AGENTS.md 缺 "空返回→原样重派" 条款(pro 版已有),编排者只能猜着放行。

修改

  • hooks/opencode/lib/state-transition-core.ts:新增 reopen_phase 动作(verified → in_progress,reason 必填,reopen_reason/reopened_at 审计留痕,保留 verified_at);start_phase/submit_for_verify 对 verified 拒绝报错追加 reopen_phase 指引。
  • hooks/opencode/pypto-state-transition.ts:ALLOWED_ACTIONS + buildTransitionInput 支持 reopen_phase(转发 phase/reason)。
  • hooks/opencode/__tests__/state-transition-core.test.ts:新增 5 个 reopen_phase 测试。
  • AGENTS.md:新增"子代理空返回处理"小节(含升级路径:重派一次 → fresh 会话 → 上报用户);action 表登记 reopen_phase,状态机图补 verified→in_progress 边。

验证

hooks 目录 61 个测试全部通过(bun test)。

likedislike
合并受阻
lizixuanlizixuan
2 天前 创建了 pull request,commit 01d32f84
lizixuanlizixuan
2 天前 关联了issue:[Bug-Report|缺陷反馈]: [断裂点]phase 一旦"已验证"就被状态机锁死(无重验入口、报错不告诉下一步)+ planner 子代理两次"秒回空白"无任何诊断
CANN-robotCANN-robot成员
2 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
2 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)

Module Approval Details

module lgtm status approve status
repo-cann/pypto-gym ❌ (0/2)(You can also ask: ym-HW, wangzheng97, tsungl4, foundea, gaoxingwang) ❌ (0/1)(You can also ask: 周若愚, codehjp423, DCGDDD, xinweiliu, 孙文博)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
CANN-robot
CANN-robot成员
2 天前 评论:

CLA Signature Pass

lizixuan1020, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike