Conversation
Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
258d380 to
55c0e0e
Compare
huangruiteng
left a comment
There was a problem hiding this comment.
动机
这个 PR 试图压缩 heartbeat 的 compact、brief 与 thin task body,同时保留 turn identity、执行义务和通知语义。方向是对的:当前 prompt 已经接近预算边界,重复措辞确实应该从共享规则里收敛。
改动思路
改动把多处较长的 heartbeat 规则换成更短的共享常量,并让不同渲染模式选择不同压缩级别。整体仍由现有 heartbeat 渲染边界拥有,没有引入新的能力层或第二套状态权威,范围也比较克制。
具体改动
rules.py收紧通知、执行义务、turn guard 和 writeback 文案。task_body.py让 brief 与 thin 模式复用更短的规则组合。- 现有回归覆盖了合成 scope 下的三种预算,以及 turn id 与部分 authority 字段。
关键代码讲解
这里仍有一个需要修复的 P1 语义/预算缺口。我在 exact head 上用真实 loopx-meta registry profile 运行公开 CLI:thin 从 1921 降到 1481、compact 从 6085 降到 5879,均在预算内;但 brief 仍为 3822/3500,within_budget=false。而 brief 使用的 HEARTBEAT_NOTIFICATION_RULE_THIN 只保留了裸的 agent_must_attempt,没有保留 canonical locator heartbeat_recommendation.agent_must_attempt,仅完整保留了 execution_obligation.must_attempt_work。现有预算 smoke 使用很短的合成 scope,因此没有捕获真实 registry-derived App prompt 的超限;现有语义断言也只匹配裸字段名,因此没有捕获路径被缩写。
此外,PR 记录的 base 为 258d380f...,当前 base branch 已前进到 b572baf3...,GitHub 当前为 DIRTY;本地 merge-tree 也确认 task_body.py 存在冲突。请先 rebase 当前 base,再在不提高 3500 ceiling 的前提下让真实 brief prompt 回到预算内,并同时保留两个完整路径;回归应使用 production-like registry-derived scope/preflight。
对主干的风险
我运行了相关 pytest(85 passed)、CLI output budget smoke、Ruff、git diff --check,远端 19 项检查也均成功或按设计跳过。这些证据说明改动没有一般性回归,但不足以推翻真实公开 CLI 的反例。若按现状合并,低上下文 brief fallback 仍可能超预算并丢失一个明确的 authority locator,且当前分支无法干净合入其 base。
我的整体评价
压缩方向、模块归属和批次大小都合理;未来向检查也没有发现需要顺手引入的新抽象。当前需要补的是这个 PR 自己声明要守住的核心契约,而不是扩大范围。修复 rebase 冲突、真实 brief 预算和完整 authority locator 后可以快速复审。
English verdict: REQUEST_CHANGES at exact head 2939e4b056bd87fd593b10a3bf6795e5f5321571; the real Codex App brief prompt remains 3822/3500, omits the fully qualified heartbeat_recommendation.agent_must_attempt locator, and conflicts with the current base branch.
Summary
LOOPX_TURNassignment introduced by fix(heartbeat): share automation-first Goal execution contract #4201Why
PR #4201 currently fails
Qualify agent-facing CLI output: heartbeat prompt variants grow by roughly 490–501 characters, exceeding the existing base/head limits. Raising the absolute prompt ceilings does not satisfy that independent regression gate.This stacked patch fixes the failure by removing duplicate prose rather than weakening the global output-growth allowances.
Validation
examples/control_plane/cli-output-budget-regression-smoke.py: passedloopx checkon both changed files: 0 errors, 0 warnings; public boundary cleangit diff --check: passedBase: #4201 at
258d380f59501453a87cd722bb904ad3eac54c29.Signed-off-by: BigDataDZ 76271875+BigDataDZ@users.noreply.github.com