Conversation
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
…odes Signed-off-by: song <22676124+songoow@users.noreply.github.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
Signed-off-by: song <22676124+songoow@users.noreply.github.com>
…get-dedup Signed-off-by: song <22676124+songoow@users.noreply.github.com>
…pair-pr4786-ci Signed-off-by: song <22676124+songoow@users.noreply.github.com>
songoow
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
Discussion #4738 PR-10 要求把 lark_inbox_reply_due 与 operator_inbox_material_review_due 的重复六项许可构造合并,同时保留 source action/reason、工作对象和 reply-first 优先级。exact head 272cd8f6faeff24416a75108f704d1a4919a29c3 完成这一局部减法,没有扩大为 inbox 领域重构。
改动思路
resolve_quota_run_decision 仍是唯一 owner。它先派生 inbox_priority_due,一次性关闭 recovery/repair/replan 并开启 normal delivery,再按 reply 优先选择已有 EffectiveAction 与 reason。
具体改动
- reply/material/both、terminal 与 automation upgrade 的 12 组 characterization 固定优先级。
- task orchestration 仍只覆盖
normal_run,不会把 inbox 动作提升为 coordinator work。 - 没有新 helper、schema、持久状态或 wire value;现有 typed enum 继续拥有分类。
- 2,048 组完整 base/head decision 相等,其中 1,536 个 inbox-active case 通过独立 oracle。
对主干的风险
最强反例是同时 due 时优先级漂移,或统一分支误开 repair/replan/coordinator 权限。完整 parity 与独立 oracle 覆盖 reply-first、terminal/upgrade 顺序、五项 repair 清零和 orchestration isolation;关联 suite、semantic smoke、Ruff 和最终 CI 均通过。共享 #4793 ancestry 也已独立审查。
我的整体评价
APPROVE。 生产改动净减少,位于原 owner 内,完成“一份共同授权构造”而不制造新抽象。
English verdict: APPROVE — exact head 272cd8f preserves all 2,048 decisions and independent inbox priority/permission invariants while deleting duplicate construction.
huangruiteng
left a comment
There was a problem hiding this comment.
动机
这次评审按 272cd8f6faeff24416a75108f704d1a4919a29c3 精确 head 展开。PR 的实际目标是消除 quota decision 中两个相邻 inbox 分支的重复构造:reply due 与 material-review due 除 source action/reason 外,delivery scope、effect flags、continuation 与 admission 语义完全一致。保留两份会让未来修改容易只更新其中一边,从而无意改变 repair、replan 或 normal-run 权限。
我以当前主干 merge-base b28af169f271eb9997b07730c1f034d58cccb827 为基线判断本 PR 的唯一增量。GitHub/packet 里较早的 base snapshot 还显示了 #4793 的祖先文件,但该依赖已经进入 main;它们不应被误算为 #4786 当前独有范围。
改动思路
实现没有抽新 helper 或增加第二套决策源,而是继续让 resolve_quota_run_decision 做唯一 admission owner:先计算 inbox_priority_due,然后在同一个分支里保持 reply-first 的 source action/reason 选择,复用原来的 flags 与返回结构。
周围的优先级不动:terminal no-followup 的处理仍在前;非 terminal 的 automation-prompt upgrade 仍可先命中;inbox admission 仍然压过 replan/self-repair fallback。也就是说这是控制流去重,不是新的调度策略。
具体改动
decision_summary.py将两个等价的elif块合并成一个 inbox priority 分支,净减少生产重复代码。- focused quota test 扩展 reply/material 的组合以及 terminal、prompt-upgrade、replan、repair 的交叉条件。
- 当前主干相对精确 head 的唯一 diff 只有上述两个文件;没有 schema、CLI、持久化 state、action vocabulary 或默认行为变化。
关键代码讲解
关键不只是两个 happy path 返回相同,而是重叠条件时的 branch ordering 必须完全保持。新的本地布尔只表示 reply_due || material_review_due;当两者同时为真时仍显式选择 reply action。这个共享分支仍位于 terminal / 非 terminal prompt-upgrade 之后、replan 与 repair 之前,所以 inbox 工作继续抑制 replan/repair,并保留 allow_normal_run=true。EffectiveAction 与 AdmissionDecision 仍是 typed contract,没有 substring/prose 分类或新的 authority 含义。
对主干的风险
这类小重构最大的风险是“现有测试都绿,但某个重叠布尔组合的优先级悄悄漂移”。因此我没有只看新增参数化 case,而是另外用同一 harness 在 merge-base 与精确 head 上枚举了 11 个相关布尔量的全部 2,048 种组合,其中 1,536 种包含 inbox due,并用独立 oracle 检查 reply-first、terminal/prompt-upgrade 顺序、replan suppression 与所有 repair/normal flags。
结果:
- base/head 规范化输出均为 1,003,179 bytes,SHA-256 完全一致:
de73aea2f6fb41076250b9ee741fdbc40f36e1d8aa08a5f133580a3da2f4db5f; - 1,536 个 inbox-active 组合的独立语义 oracle 全部通过;
- quota、chat/Lark 相关 focused suites 共 219 passed;补跑 effect-turn/material-review 两组为 23 passed;
examples/control_plane/lark-inbox-priority-smoke.py公共入口 smoke 通过;- Ruff、
git diff --check与两个唯一改动路径的loopx check通过;后者只有两个无关的既有 Goal-state warning; - remote CI 按本轮 capability 的
wait_for_ci=false未被查询。
改动不涉及状态迁移或外部副作用,若需要回滚只需还原局部分支。残余风险仅是未来输入 schema 新增字段后,等价性矩阵也要相应扩展;本次现有输入空间已经完整覆盖。
我的整体评价
我批准这个精确 head。它在正确的 quota owner 内删除重复知识,没有把一个局部去重升级成新的抽象或公共协议;更重要的是,behavior-preserving 的声明得到了全组合 base/head 对照和真实 consumer smoke 支持,而不是只依赖代码相似或作者自审。未来向 pass 的结论也是保持 inline 最合适:目前抽 helper 反而会把关键 precedence 藏起来,维护收益更低。
English verdict: APPROVE - head 272cd8f
The merge-base changed after approval.
huangruiteng
left a comment
There was a problem hiding this comment.
动机
这次评审按 272cd8f6faeff24416a75108f704d1a4919a29c3 精确 head 展开。PR 的实际目标是消除 quota decision 中两个相邻 inbox 分支的重复构造:reply due 与 material-review due 除 source action/reason 外,delivery scope、effect flags、continuation 与 admission 语义完全一致。保留两份会让未来修改容易只更新其中一边,从而无意改变 repair、replan 或 normal-run 权限。
我以当前主干 merge-base b28af169f271eb9997b07730c1f034d58cccb827 为基线判断本 PR 的唯一增量。GitHub/packet 里较早的 base snapshot 还显示了 #4793 的祖先文件,但该依赖已经进入 main;它们不应被误算为 #4786 当前独有范围。
改动思路
实现没有抽新 helper 或增加第二套决策源,而是继续让 resolve_quota_run_decision 做唯一 admission owner:先计算 inbox_priority_due,然后在同一个分支里保持 reply-first 的 source action/reason 选择,复用原来的 flags 与返回结构。
周围的优先级不动:terminal no-followup 的处理仍在前;非 terminal 的 automation-prompt upgrade 仍可先命中;inbox admission 仍然压过 replan/self-repair fallback。也就是说这是控制流去重,不是新的调度策略。
具体改动
decision_summary.py将两个等价的elif块合并成一个 inbox priority 分支,净减少生产重复代码。- focused quota test 扩展 reply/material 的组合以及 terminal、prompt-upgrade、replan、repair 的交叉条件。
- 当前主干相对精确 head 的唯一 diff 只有上述两个文件;没有 schema、CLI、持久化 state、action vocabulary 或默认行为变化。
关键代码讲解
关键不只是两个 happy path 返回相同,而是重叠条件时的 branch ordering 必须完全保持。新的本地布尔只表示 reply_due || material_review_due;当两者同时为真时仍显式选择 reply action。这个共享分支仍位于 terminal / 非 terminal prompt-upgrade 之后、replan 与 repair 之前,所以 inbox 工作继续抑制 replan/repair,并保留 allow_normal_run=true。EffectiveAction 与 AdmissionDecision 仍是 typed contract,没有 substring/prose 分类或新的 authority 含义。
对主干的风险
这类小重构最大的风险是“现有测试都绿,但某个重叠布尔组合的优先级悄悄漂移”。因此我没有只看新增参数化 case,而是另外用同一 harness 在 merge-base 与精确 head 上枚举了 11 个相关布尔量的全部 2,048 种组合,其中 1,536 种包含 inbox due,并用独立 oracle 检查 reply-first、terminal/prompt-upgrade 顺序、replan suppression 与所有 repair/normal flags。
结果:
- base/head 规范化输出均为 1,003,179 bytes,SHA-256 完全一致:
de73aea2f6fb41076250b9ee741fdbc40f36e1d8aa08a5f133580a3da2f4db5f; - 1,536 个 inbox-active 组合的独立语义 oracle 全部通过;
- quota、chat/Lark 相关 focused suites 共 219 passed;补跑 effect-turn/material-review 两组为 23 passed;
examples/control_plane/lark-inbox-priority-smoke.py公共入口 smoke 通过;- Ruff、
git diff --check与两个唯一改动路径的loopx check通过;后者只有两个无关的既有 Goal-state warning; - remote CI 按本轮 capability 的
wait_for_ci=false未被查询。
改动不涉及状态迁移或外部副作用,若需要回滚只需还原局部分支。残余风险仅是未来输入 schema 新增字段后,等价性矩阵也要相应扩展;本次现有输入空间已经完整覆盖。
我的整体评价
我批准这个精确 head。它在正确的 quota owner 内删除重复知识,没有把一个局部去重升级成新的抽象或公共协议;更重要的是,behavior-preserving 的声明得到了全组合 base/head 对照和真实 consumer smoke 支持,而不是只依赖代码相似或作者自审。未来向 pass 的结论也是保持 inline 最合适:目前抽 helper 反而会把关键 precedence 藏起来,维护收益更低。
发布首个 approval 的同时,main 推进到 0ef7ebd749ec97a698a8fc7f2a29844dd368689b,仓库规则以 “merge-base changed after approval” 自动撤销了该记录。我重新 fetch 并核验:精确 head 未变,merge-base 仍为 b28af169f271eb9997b07730c1f034d58cccb827,唯一 diff 仍是上述两个文件且内容未变;因此这条新 review 是基线推进后的重新确认,不继承已撤销结论。
English verdict: APPROVE - head 272cd8f
The merge-base changed after approval.
huangruiteng
left a comment
There was a problem hiding this comment.
动机
这次评审按 272cd8f6faeff24416a75108f704d1a4919a29c3 精确 head 展开。PR 的实际目标是消除 quota decision 中两个相邻 inbox 分支的重复构造:reply due 与 material-review due 除 source action/reason 外,delivery scope、effect flags、continuation 与 admission 语义完全一致。保留两份会让未来修改容易只更新其中一边,从而无意改变 repair、replan 或 normal-run 权限。
我以当前主干 merge-base b28af169f271eb9997b07730c1f034d58cccb827 为基线判断本 PR 的唯一增量。GitHub/packet 里较早的 base snapshot 还显示了 #4793 的祖先文件,但该依赖已经进入 main;它们不应被误算为 #4786 当前独有范围。
改动思路
实现没有抽新 helper 或增加第二套决策源,而是继续让 resolve_quota_run_decision 做唯一 admission owner:先计算 inbox_priority_due,然后在同一个分支里保持 reply-first 的 source action/reason 选择,复用原来的 flags 与返回结构。
周围的优先级不动:terminal no-followup 的处理仍在前;非 terminal 的 automation-prompt upgrade 仍可先命中;inbox admission 仍然压过 replan/self-repair fallback。也就是说这是控制流去重,不是新的调度策略。
具体改动
decision_summary.py将两个等价的elif块合并成一个 inbox priority 分支,净减少生产重复代码。- focused quota test 扩展 reply/material 的组合以及 terminal、prompt-upgrade、replan、repair 的交叉条件。
- 当前主干相对精确 head 的唯一 diff 只有上述两个文件;没有 schema、CLI、持久化 state、action vocabulary 或默认行为变化。
关键代码讲解
关键不只是两个 happy path 返回相同,而是重叠条件时的 branch ordering 必须完全保持。新的本地布尔只表示 reply_due || material_review_due;当两者同时为真时仍显式选择 reply action。这个共享分支仍位于 terminal / 非 terminal prompt-upgrade 之后、replan 与 repair 之前,所以 inbox 工作继续抑制 replan/repair,并保留 allow_normal_run=true。EffectiveAction 与 AdmissionDecision 仍是 typed contract,没有 substring/prose 分类或新的 authority 含义。
对主干的风险
这类小重构最大的风险是“现有测试都绿,但某个重叠布尔组合的优先级悄悄漂移”。因此我没有只看新增参数化 case,而是另外用同一 harness 在 merge-base 与精确 head 上枚举了 11 个相关布尔量的全部 2,048 种组合,其中 1,536 种包含 inbox due,并用独立 oracle 检查 reply-first、terminal/prompt-upgrade 顺序、replan suppression 与所有 repair/normal flags。
结果:
- base/head 规范化输出均为 1,003,179 bytes,SHA-256 完全一致:
de73aea2f6fb41076250b9ee741fdbc40f36e1d8aa08a5f133580a3da2f4db5f; - 1,536 个 inbox-active 组合的独立语义 oracle 全部通过;
- quota、chat/Lark 相关 focused suites 共 219 passed;补跑 effect-turn/material-review 两组为 23 passed;
examples/control_plane/lark-inbox-priority-smoke.py公共入口 smoke 通过;- Ruff、
git diff --check与两个唯一改动路径的loopx check通过;后者只有两个无关的既有 Goal-state warning; - remote CI 按本轮 capability 的
wait_for_ci=false未被查询。
改动不涉及状态迁移或外部副作用,若需要回滚只需还原局部分支。残余风险仅是未来输入 schema 新增字段后,等价性矩阵也要相应扩展;本次现有输入空间已经完整覆盖。
我的整体评价
我批准这个精确 head。它在正确的 quota owner 内删除重复知识,没有把一个局部去重升级成新的抽象或公共协议;更重要的是,behavior-preserving 的声明得到了全组合 base/head 对照和真实 consumer smoke 支持,而不是只依赖代码相似或作者自审。未来向 pass 的结论也是保持 inline 最合适:目前抽 helper 反而会把关键 precedence 藏起来,维护收益更低。
此前的 approval 因 main 推进而被仓库规则自动撤销。本次重新 fetch 到 09f10c4e37b89c6ed25f2f2354f89d641662e83c 后,我重新做了失效检查:精确 head 与 merge-base b28af169f271eb9997b07730c1f034d58cccb827 均未变化;主干自上次证据基线以来只改动 tests/test_steward_team_plan_apply.py,没有触及 quota owner、输入 schema、消费者或本 PR 的两个独有文件;当前三方 merge tree 063e0a2ba511a97c4e7edba80fffb832ef9c52b1 无冲突,git diff --check 也通过。因此本结论是对当前基线的独立重新确认,不继承已撤销的 formal state。
English verdict: APPROVE - head 272cd8f
The merge-base changed after approval.
huangruiteng
left a comment
There was a problem hiding this comment.
动机
本次按 exact head 272cd8f6faeff24416a75108f704d1a4919a29c3 复核 #4786。目标来自 discussion #4738 PR-10:lark_inbox_reply_due 与 operator_inbox_material_review_due 原本各自重复构造同一组六项 run permission,长期风险不是当前输出错误,而是未来只改一边后让 repair、replan 或 normal-delivery 权限悄然分叉。
当前 origin/main 为 09f10c4e37b89c6ed25f2f2354f89d641662e83c,三方 merge 结果相对主干只改 decision_summary.py 与 focused quota test;PR 历史中的 chat/Lark 祖先改动不属于当前独有增量。这个范围与“在既有 owner 内删除重复知识”的目标一致。
改动思路
实现继续让 resolve_quota_run_decision 做唯一 admission owner。它先用已有两个 typed boolean 派生私有的 inbox_priority_due,在一个共享分支内统一设置 should_run、normal delivery 与四类 repair permission;随后仅用一个显式 if inbox_reply_due 保留 reply-first 的 action/reason 选择。
我重点核对了几个容易在“小重构”里漏掉的顺序:terminal no-followup 的 inbox 例外仍存在;nonterminal automation-prompt upgrade 仍优先;任一 inbox source 仍抑制 autonomous replan;_task_orchestration_effective_action 只改写 normal_run,不会把 typed inbox action 扩张成 coordinator authority。没有新增 helper、schema、state、provider 或公共 vocabulary,这比抽一个只有单一 caller 的新层更合适。
具体改动
关键代码讲解
loopx/control_plane/quota/decision_summary.py:333的共享 admission branch 删除第二份相同权限赋值;当两个 source 同时 due 时仍先选LARK_INBOX_REPLY_DUE,否则选OPERATOR_INBOX_MATERIAL_REVIEW_DUE,两条原 reason 文本保持不变。tests/control_plane/test_quota_run_decision.py:166的 12 组参数矩阵把 reply-only、material-only、both-due 与 terminal/upgrade 交叉起来,并故意预置 recovery、self/capability/workspace repair、replan 和 adaptive orchestration,验证共享分支会关闭所有竞争 lane 且不会被重标为 coordinator work。
正向路径中,material-only 进入共享权限构造后仍返回 material-review action/reason;both-due 仍返回 direct-reply。负向/竞争路径中,nonterminal upgrade 阻止 inbox 执行,terminal inbox work 保留原例外,replan 与 repair lanes 被明确清零。
对主干的风险
最强反例是“单独 reply/material case 都通过,但 both-due 或 terminal+upgrade 时优先级/权限漂移”。这一点不能只靠代码相似判断。本 exact head 先前已经用独立 oracle 枚举 11 个相关 boolean 的全部 2,048 组 base/head 输出,其中 1,536 组 inbox-active;当前 head、merge-base 与 origin/main 均与最近证据基线一致,因此该证据没有被代码或基线变化失效。
我又在当前 exact head 重新执行:
tests/control_plane/test_quota_run_decision.py:20 passed;examples/control_plane/lark-inbox-priority-smoke.py:通过;- focused Ruff 与
git diff --check:通过; - 当前三方 merge tree
063e0a2ba511a97c4e7edba80fffb832ef9c52b1无冲突,合入结果仅上述两个文件; - exact-head required checks 当前均成功,deploy/publish/presentation 为预期 skip。Goal 配置为
wait_for_ci=false,因此我没有等待或轮询 CI,只把已完成 rollup 作为旁证。
没有 live Lark send;但这里改的是纯 decision owner,public inbox smoke 已覆盖真实 consumer boundary,外部发送不会增加对 permission vector 的证明。分支当前 BEHIND,更新分支会产生新 head,必须重新按 exact head 审阅,不能继承这条批准。
语义与 CI 对齐
本 PR 复用既有 EffectiveAction 与 QuotaRunDecision,没有 substring/prose 分类、默认行为变化或新的 authority 名称。测试断言的是 action、reason、全部 permission、replan flag、state 与 quota,而不是只看一个 decision code,因此能捕捉细微语义漂移。
我的整体评价
APPROVE。 这是位于正确 owner 内的局部减法:删除重复权限构造,但把 source precedence 明确留在眼前;当前 focused 运行、public smoke 与未失效的全组合 parity/oracle 共同支持 behavior-preserving 结论。未来向检查也不建议再抽象一层,inline 分支更容易看清 guard precedence。
此前的 maintainer approval 因目标分支推进被自动撤销;本次不继承结论,而是核验了 head、main、merge-base、merge tree、完整当前增量与证据前提后重新批准。
English verdict: APPROVE - Exact head 272cd8f preserves reply-first inbox admission, all repair/replan/upgrade/terminal invariants, and the existing typed authority boundary; focused tests, public smoke, static checks, and still-valid exhaustive parity evidence pass.
The merge-base changed after approval.
huangruiteng
left a comment
There was a problem hiding this comment.
动机
本次按 exact head 272cd8f6faeff24416a75108f704d1a4919a29c3 复核 #4786。目标来自 discussion #4738 PR-10:lark_inbox_reply_due 与 operator_inbox_material_review_due 原本各自重复构造同一组六项 run permission,长期风险不是当前输出错误,而是未来只改一边后让 repair、replan 或 normal-delivery 权限悄然分叉。
当前 origin/main 为 09f10c4e37b89c6ed25f2f2354f89d641662e83c,三方 merge 结果相对主干只改 decision_summary.py 与 focused quota test;PR 历史中的 chat/Lark 祖先改动不属于当前独有增量。这个范围与“在既有 owner 内删除重复知识”的目标一致。
改动思路
实现继续让 resolve_quota_run_decision 做唯一 admission owner。它先用已有两个 typed boolean 派生私有的 inbox_priority_due,在一个共享分支内统一设置 should_run、normal delivery 与四类 repair permission;随后仅用一个显式 if inbox_reply_due 保留 reply-first 的 action/reason 选择。
我重点核对了几个容易在“小重构”里漏掉的顺序:terminal no-followup 的 inbox 例外仍存在;nonterminal automation-prompt upgrade 仍优先;任一 inbox source 仍抑制 autonomous replan;_task_orchestration_effective_action 只改写 normal_run,不会把 typed inbox action 扩张成 coordinator authority。没有新增 helper、schema、state、provider 或公共 vocabulary,这比抽一个只有单一 caller 的新层更合适。
具体改动
关键代码讲解
loopx/control_plane/quota/decision_summary.py:333的共享 admission branch 删除第二份相同权限赋值;当两个 source 同时 due 时仍先选LARK_INBOX_REPLY_DUE,否则选OPERATOR_INBOX_MATERIAL_REVIEW_DUE,两条原 reason 文本保持不变。tests/control_plane/test_quota_run_decision.py:166的 12 组参数矩阵把 reply-only、material-only、both-due 与 terminal/upgrade 交叉起来,并故意预置 recovery、self/capability/workspace repair、replan 和 adaptive orchestration,验证共享分支会关闭所有竞争 lane 且不会被重标为 coordinator work。
正向路径中,material-only 进入共享权限构造后仍返回 material-review action/reason;both-due 仍返回 direct-reply。负向/竞争路径中,nonterminal upgrade 阻止 inbox 执行,terminal inbox work 保留原例外,replan 与 repair lanes 被明确清零。
对主干的风险
最强反例是“单独 reply/material case 都通过,但 both-due 或 terminal+upgrade 时优先级/权限漂移”。这一点不能只靠代码相似判断。本 exact head 先前已经用独立 oracle 枚举 11 个相关 boolean 的全部 2,048 组 base/head 输出,其中 1,536 组 inbox-active;当前 head、merge-base 与 origin/main 均与最近证据基线一致,因此该证据没有被代码或基线变化失效。
我又在当前 exact head 重新执行:
tests/control_plane/test_quota_run_decision.py:20 passed;examples/control_plane/lark-inbox-priority-smoke.py:通过;- focused Ruff 与
git diff --check:通过; - 当前三方 merge tree
063e0a2ba511a97c4e7edba80fffb832ef9c52b1无冲突,合入结果仅上述两个文件; - exact-head required checks 当前均成功,deploy/publish/presentation 为预期 skip。Goal 配置为
wait_for_ci=false,因此我没有等待或轮询 CI,只把已完成 rollup 作为旁证。
没有 live Lark send;但这里改的是纯 decision owner,public inbox smoke 已覆盖真实 consumer boundary,外部发送不会增加对 permission vector 的证明。分支当前 BEHIND,更新分支会产生新 head,必须重新按 exact head 审阅,不能继承这条批准。
语义与 CI 对齐
本 PR 复用既有 EffectiveAction 与 QuotaRunDecision,没有 substring/prose 分类、默认行为变化或新的 authority 名称。测试断言的是 action、reason、全部 permission、replan flag、state 与 quota,而不是只看一个 decision code,因此能捕捉细微语义漂移。
我的整体评价
APPROVE。 这是位于正确 owner 内的局部减法:删除重复权限构造,但把 source precedence 明确留在眼前;当前 focused 运行、public smoke 与未失效的全组合 parity/oracle 共同支持 behavior-preserving 结论。未来向检查也不建议再抽象一层,inline 分支更容易看清 guard precedence。
此前的 maintainer approval 因目标分支推进被自动撤销;本次不继承结论,而是核验了 head、main、merge-base、merge tree、完整当前增量与证据前提后重新批准。
English verdict: APPROVE - Exact head 272cd8f preserves reply-first inbox admission, all repair/replan/upgrade/terminal invariants, and the existing typed authority boundary; focused tests, public smoke, static checks, and still-valid exhaustive parity evidence pass.
The merge-base changed after approval.
huangruiteng
left a comment
There was a problem hiding this comment.
动机
本次按 exact head 272cd8f6faeff24416a75108f704d1a4919a29c3 复核 #4786。目标来自 discussion #4738 PR-10:lark_inbox_reply_due 与 operator_inbox_material_review_due 原本各自重复构造同一组六项 run permission,长期风险不是当前输出错误,而是未来只改一边后让 repair、replan 或 normal-delivery 权限悄然分叉。
当前 origin/main 为 09f10c4e37b89c6ed25f2f2354f89d641662e83c,三方 merge 结果相对主干只改 decision_summary.py 与 focused quota test;PR 历史中的 chat/Lark 祖先改动不属于当前独有增量。这个范围与“在既有 owner 内删除重复知识”的目标一致。
改动思路
实现继续让 resolve_quota_run_decision 做唯一 admission owner。它先用已有两个 typed boolean 派生私有的 inbox_priority_due,在一个共享分支内统一设置 should_run、normal delivery 与四类 repair permission;随后仅用一个显式 if inbox_reply_due 保留 reply-first 的 action/reason 选择。
我重点核对了几个容易在“小重构”里漏掉的顺序:terminal no-followup 的 inbox 例外仍存在;nonterminal automation-prompt upgrade 仍优先;任一 inbox source 仍抑制 autonomous replan;_task_orchestration_effective_action 只改写 normal_run,不会把 typed inbox action 扩张成 coordinator authority。没有新增 helper、schema、state、provider 或公共 vocabulary,这比抽一个只有单一 caller 的新层更合适。
具体改动
关键代码讲解
loopx/control_plane/quota/decision_summary.py:333的共享 admission branch 删除第二份相同权限赋值;当两个 source 同时 due 时仍先选LARK_INBOX_REPLY_DUE,否则选OPERATOR_INBOX_MATERIAL_REVIEW_DUE,两条原 reason 文本保持不变。tests/control_plane/test_quota_run_decision.py:166的 12 组参数矩阵把 reply-only、material-only、both-due 与 terminal/upgrade 交叉起来,并故意预置 recovery、self/capability/workspace repair、replan 和 adaptive orchestration,验证共享分支会关闭所有竞争 lane 且不会被重标为 coordinator work。
正向路径中,material-only 进入共享权限构造后仍返回 material-review action/reason;both-due 仍返回 direct-reply。负向/竞争路径中,nonterminal upgrade 阻止 inbox 执行,terminal inbox work 保留原例外,replan 与 repair lanes 被明确清零。
对主干的风险
最强反例是“单独 reply/material case 都通过,但 both-due 或 terminal+upgrade 时优先级/权限漂移”。这一点不能只靠代码相似判断。本 exact head 先前已经用独立 oracle 枚举 11 个相关 boolean 的全部 2,048 组 base/head 输出,其中 1,536 组 inbox-active;当前 head、merge-base 与 origin/main 均与最近证据基线一致,因此该证据没有被代码或基线变化失效。
我又在当前 exact head 重新执行:
tests/control_plane/test_quota_run_decision.py:20 passed;examples/control_plane/lark-inbox-priority-smoke.py:通过;- focused Ruff 与
git diff --check:通过; - 当前三方 merge tree
063e0a2ba511a97c4e7edba80fffb832ef9c52b1无冲突,合入结果仅上述两个文件; - exact-head required checks 当前均成功,deploy/publish/presentation 为预期 skip。Goal 配置为
wait_for_ci=false,因此我没有等待或轮询 CI,只把已完成 rollup 作为旁证。
没有 live Lark send;但这里改的是纯 decision owner,public inbox smoke 已覆盖真实 consumer boundary,外部发送不会增加对 permission vector 的证明。分支当前 BEHIND,更新分支会产生新 head,必须重新按 exact head 审阅,不能继承这条批准。
语义与 CI 对齐
本 PR 复用既有 EffectiveAction 与 QuotaRunDecision,没有 substring/prose 分类、默认行为变化或新的 authority 名称。测试断言的是 action、reason、全部 permission、replan flag、state 与 quota,而不是只看一个 decision code,因此能捕捉细微语义漂移。
我的整体评价
APPROVE。 这是位于正确 owner 内的局部减法:删除重复权限构造,但把 source precedence 明确留在眼前;当前 focused 运行、public smoke 与未失效的全组合 parity/oracle 共同支持 behavior-preserving 结论。未来向检查也不建议再抽象一层,inline 分支更容易看清 guard precedence。
此前的 maintainer approval 因目标分支推进被自动撤销;本次不继承结论,而是核验了 head、main、merge-base、merge tree、完整当前增量与证据前提后重新批准。
English verdict: APPROVE - Exact head 272cd8f preserves reply-first inbox admission, all repair/replan/upgrade/terminal invariants, and the existing typed authority boundary; focused tests, public smoke, static checks, and still-valid exhaustive parity evidence pass.
The merge-base changed after approval.
Implements PR-10 from discussion #4738: direct-reply and material-review admission duplicated the same six run-permission assignments. Both now use one construction block; source selection retains its distinct action/reason and reply-first ordering.
The existing quota decision owner remains responsible. Terminal/automation-upgrade precedence, repair clearing, replan suppression and the normal-run-only task-orchestration boundary are preserved. No new helper, vocabulary, provider, schema or permission is introduced. This removes one duplicate construction block; it does not claim that downstream inbox semantics have been unified.
Validation at baseline
361347713:The CLI quota decision and Lark inbox consumers keep their existing outputs; no settings, frontend payload or packaged frontend changes are needed. Existing live-packet tests cover source-specific work-lane preemption and required reads. A bounded future-facing pass chose the local branch consolidation over an extra abstraction. Maintainer review and merge required.
Current-head CI repair
Head
272cd8f6faeff24416a75108f704d1a4919a29c3includes the verified repair for date-dependent manager-context fixtures. Shared module-budget repair from #4793 is included as dependency ancestry, with current main incorporated; once #4793 lands its shared diff disappears from this PR. The PR-specific implementation is unchanged by this update.Focused current-head validation: 79 passed, no skips or failures in that run. Diff checks pass. This is local evidence; the newly triggered remote CI remains authoritative for readiness. No PR was merged and no new unrelated feature PR was opened.