参考 · 难度:参考

状态枚举

每个可被编排器调用的技能所返回的状态值的全集。这些是字符串判别符 —— 调用方按严格相等匹配对其进行分发。重命名一个值会破坏每一条流水线。

将它们视为契约

本页列出的每个状态值都由 bun run test 校验。编排器(lfgce-babysit-pr)按精确字符串解析它们。在改动每个基于它分发的调用方之前,请勿重命名、缩写或扩展某个状态集合。

ce-debug mode:pipeline 返回值

状态含义调用方动作
fixed-and-pushed 收敛式修复已应用,测试通过,已提交,push 成功。head_sha 即为该提交。 继续。重新快照并推进。
fixed-not-pushed 修复已应用并在本地提交,但 push 未发生(无远程 / 无权限 / 作用域排除 push / push 被拒)。 呈现剩余事项;绝不可将其报告为 fixed-and-pushed(调用方会重新快照到一个尚未移动的远程 head),也不可报告为 diagnosed-no-fix(修复其实已应用)。
diagnosed-no-fix 已找到根因,但本次运行没有安全的收敛式修复。residuals[] 列出仍待解决的事项。 暂停;呈现剩余事项;用户可安排一次发散式修复。
flaky-infra 出现 flake 或基础设施失败,非代码缺陷。 在下一 tick 通过 gh run rerun --failed 重试。
needs-human 失败需要一个发散式 / 产品层面的决策;未做任何应用。residuals[] 枚举带 sources、decision_context、thread_urls 的强类型契约。 渲染为 ## Needs Needs your decision。线索保持开启。结构化负载不得被摘要掉。

ce-debug mode:return-to-caller 返回值

状态含义
fixed修复已提交到特性分支;未推送。
diagnosed-no-fix含义与 pipeline 相同;未应用修复。
needs-human形态与 pipeline 相同。
blocked根本无法运行(缺少 reference、前置条件缺失)。

ce-work mode:return-to-caller 返回值

状态含义
complete范围内每项任务已完成;验证证据已记录;standalone_shipping_skipped: true
blocked无法运行;已设置 blockers[]recovery_path。已变更的状态予以保留。
failed运行以意外方式失败;blockers[] 已填入。

return-to-caller 结果中的必填字段:

status, plan_path, changed_files, u_ids_attempted,
u_ids_completed, verification_results, verification_evidence,
implementation_engine_binding, requested_route, actual_route,
requested_model, actual_model, fallback_reason, run_id,
source_kind, source_digest, unit_receipts, plan_checkpoint,
,
recovery_path,
settled_decision_conflicts, behavior_change,
standalone_shipping_skipped: true

ce-babysit-pr 流水线返回值

babysit 交给其调用方(lfg 第 10 步)的结构化返回:

  { status, fixes_applied, residuals }

外加 human_decisions 中的规范化决策集。调用方在 ## Needs Needs your decision 下原样渲染 residuals。

流水线停止条件

状态何时
successneeds_human_residuals 为空 AND all_checks_ok AND mergeability_certain AND merge_state_status == "CLEAN" AND base_ref_blocker == null AND stack_blocker == null AND branch_currency_blocker == null AND unrequested_base_merge == null
needs-humanneeds_human_residuals 非空且已无剩余可自主完成的工作。

ce-babysit-pr 交互报告(首行 Emoji)

Emoji状态何时
Looks merge-ready已结算 + 7 项条件均满足 + review 仍在进行也清晰
🟡Cautiously looks ready看似就绪但带有读者应知悉的提醒事项
🎉MergedPR 已合并(通常经由 stack-land)
🚫ClosedPR 已关闭,未合并
Blocked存在无法消除的常驻剩余事项
⏱️Budget达到活跃预算(默认 8h)或 3 天兜底
⏸️Pausedcheckpoint 模式已暂停
绝不可使用以下措辞
  • "Safe to merge" —— babysit 报告(references/report.md)明文禁止。
  • "Looks ready — merge at will" —— 同上。
  • 请使用 Looks merge-ready — <evidence>. Your call to merge.

ce-code-review mode:agent 返回值

状态含义
complete所有评审者已返回;发现项已合并。
failed在完成之前失败(调度、范围等)。已填入 reason
degraded所有评审者失败;若有部分输出则一并返回。
skipped触发 PR 跳过规则(已关闭 / 已合并 / 琐碎)。

verdict 字段使用三个精确字符串:

"Ready to merge" | "Ready with fixes" | "Not ready"

ce-compound mode:non-interactive 终结信号

非交互式运行以以下终结字符串之一退出:

信号含义
Documentation complete已写入一条合格的学习。
Documentation skipped没有学习达到合格门槛(反事实不成立)或输入阻塞了本次运行。会附带原因。

若出现多个 depth: 令牌,或 depth: 出现但缺少 mode:non-interactive,则本次运行输出 Documentation skipped 并附带解析原因 —— 编排器应将其视为配置错误的调用。

needs-human 强类型契约

多个技能以如下精确形态发出 needs-human 决策对象:

type: "needs-human"
sources:
  - id: "<thread-stable-id|comment-id|review-id|check-key|currency-key>"
    kind: "thread | comment | | check | currency"
decision_context:
  quoted_feedback: "<the specific ask, quoted>"
  investigation: "<what was inspected, with file:line>"
  decision_reason: "<why autonomous action is unsafe or ambiguous>"
  options:
    - option: "<concrete choice>"
      tradeoff: "<what it gains/loses>"
  recommendation: "<lean + why | null>"
thread_urls:
  - "<URL for every owned open thread covered>"

规则:

source-kind 归属:

kind由谁发出
threadce-resolve-pr-feedback
commentce-resolve-pr-feedback
reviewce-resolve-pr-feedback
checkce-debug, ce-babysit-pr
currencyce-babysit-pr(branch-currency 观测键)