Repository navigation
fix(goals): preserve acceptance guidance with objective adoption - #6999
huangruiteng wants to merge 1 commit into
Conversation
Signed-off-by: huangruiteng <huangrt01@163.com>
1b8fd7c to
f5af380
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; declaration_source=runtime_reported; reasoning_effort=max
代码结论:APPROVE。精确 head f5af3809b35d888fe38b09be677a861db3699667,不可变基线 63728ab9f039688bbf5855faec40c87a690defb7。未发现阻断代码批准的问题。
动机
已修改 Goal 当前目标,同时仍有累计要求或配置验收检查的 Agent 与使用者。Agent 采用新的当前目标后,旧版对同一 inspect 命令只保留第一段理由,导致原验收义务不再进入普通工作上下文;新版保留一条读取并合并全部适用理由。
已独立验证真实 File/SQLite 在采用目标后同时携带目标采用和原验收指引;完整依据只读取一次,已有自定义理由与重复投影的幂等性保留。指引可见不证明模型遵守或长期收益;该 PR 不改变目标修订、采用、验收判定或权限。
改动思路
命令身份继续由既有 shared interaction owner 去重;只合并该命令的完整理由,不增加 inspect 调用、配置、持久状态或第二个验收 owner。
当前边界是普通工作入口中目标与验收理由的完整投影;原有目标采用与独立验收规则保留,直接修复同一 owner 即可。比增加第二次读取更简单,也避免另加一次采用或所有者确认。这里需要保留的是整段义务,包括先后顺序、原始要求、来源、停止条件和独立验收区别;输出字段或大小检查本身不能证明这些意思未丢失。
沿实际 quota/Turn 入口,Python 传递当前目标及验收事实,TS 生成同一读取,既有上下文 consumer 复用返回内容。模型阅读和执行遵守仍是另一项验收。随当前 packet 提供的经验建议已用于检查这条最短用户路径,没有把经验送达本身当成收益。
具体改动
先读规范 docs/architecture/rfcs/goal-outcome-refinement-v0.md,修订 63728ab9f039688bbf5855faec40c87a690defb7,其中 Current operating objective、Goal context before work selection 与原始要求保留是判断依据;也读回 #6987 的原 P2 评审 discussion_r4335733624。没有用本 PR 的测试预期替代原合同。
本 PR 完整范围为4文件、+146/-2,仅一个既有产品 helper、两组回归及一处旧 scheduler 期望对齐;没有新产品模块、命令或状态格式。
关键代码讲解
interactionRequiredReads内部的add先按完整 command 找原行。未出现过才新增;已存在则保留原 source、ordering 和其它字段,只补入尚未完整包含的 reason。空或非字符串 reason 被当前完整理由替代。这里的includes只去除相同完整段落,不从文字分类权限、任务状态或优先级。projectInteractionWorkContext沿同一 command 复用真实内容并携带合并理由,既有 source 不可用/fresh guard 规则保持。检查 actual inline context 而非仅调用 helper,证明没有隐含第二次读取。test_objective_and_acceptance_guidance_share_real_inline_goal_read通过真实 prepare/owner apply/Agent adoption,再走公开 quota CLI,分别覆盖 configured-checks 与 cumulative-outcome、File 与 SQLite。已有 adopted Agent 也保留验收理由,而不是反复采用。
逐项映射:GO-original-commitments 已实现,原始 Goal 与累计要求未改;GO-context-before-work 已实现,目标采用与原验收理由共同进入真实上下文;GO-no-extra-round 已实现,完整 inline read 消除额外 required read,重复投影和原自定义理由保留。
独立执行112项相关 Python、61项 TS、control-plane typecheck,全部通过。相同四个真实 CLI 用例在不可变基线都因验收理由丢失而失败,在当前源码及非 editable wheel 各4例通过。安装包实际加载411个产品模块、零源码逃逸,改动 TS blob 与 reviewed head 字节相同。
对主干的风险
最强风险是修复遗漏时又引入重复读取、反复采用,或在无工作准入的分支上新增义务。我通过实际 typed transport 比较80组目标/outcome/checks/普通、disabled、selection、settlement、capability 分支及原自定义 reason:70组完整输出相同,10组仅增加适用 reason;全部 command、source、order、arbitration 保持相同。重复投影均幂等,输入未改变。该结果证明这里的输入与投影边界,不证明模型理解。
初次私有检查使用了两个不存在的测试路径,未执行测试;安装包夹具初次仍按 checkout 相对路径导入 TS,四例 setup 失败。修正的是调用和公开夹具的产品位置,随后仍执行原断言;失败记录保留,未改产品或降低断言。真实数据库状态均为隔离合成 Goal,未修改活动工作。包外没有复制产品源码,底层存储 owner 没有变动。
语义与 CI 对齐
这是当前 shared owner 的语义保全:新理由增加的是既有适用义务,没有把指引变成新的机器权限;无新词汇、配置或平行 authority。完整原理由按条款检查过,原任务、权限、停止和独立验收边界保留。标准 premerge 为5项直接、18项选中检查通过,零失败和 manual hold。按当前策略未查询、轮询或等待 CI;该批准不代替 GitHub 合并资格和维护者授权。
我的整体评价
此处是范围完整的 goal_achieved:修复了原 P2 所指的普通工作上下文遗漏。long_horizon=improved,后续工作仍能看到原验收与累计要求;user_experience=improved,既有上下文复用,不多读取、重新填目标或增加确认。当前边界内的对照证据成立,长期效果与模型采用保留未知。
同域收敛已经体现在一个现有 helper 内组合理由;不需要新配置、状态、泛化 framework 或兼容 decoder。保留既有持久 Goal 读者与共部署 caller 的合同,未要求无关重写。结论 APPROVE,仅针对本精确版本。
English verdict: APPROVE — f5af3809b35d888fe38b09be677a861db3699667, immutable base 63728ab9f039688bbf5855faec40c87a690defb7. The complete four-file fix preserves objective and acceptance guidance in one actual inline read. Python112, TS61, typecheck, wheel4 and native premerge5+18 pass; the four real base counterexamples fail as expected. Eighty paired projection cases preserve commands, scope and arbitration. Model adherence and long-term benefit remain unqualified; no merge authority is implied.
Summary
Fixes the post-merge P2 from #6987: when a Goal has
goal_objectiveplus cumulative outcomes or configured checks, the sharedgoal-acceptance inspectcommand must carry adoption guidance and the existing acceptance obligations. The prior command-level deduplication kept only the first reason.This change keeps one read command, merges all applicable reason clauses, preserves an existing custom reason, and remains idempotent. It does not add another inspect call or a second acceptance authority.
Verification
work_context.sourcesretained both guidance sets with no extra required inspect.npm run -s typecheck:control-plane, Ruff, Python compile andgit diff --checkpassed.loopx canary premerge --from-git-diff: passed, 18/18 selected checks, 0 failures, 0 manual holds.loopx-metastatus and acceptance inspection succeeded. The active meta Goal currently has no objective/outcomes/checks, so the exact branch was exercised in isolated real File/SQLite Goals instead; no active Goal state was modified.Residual risk
No live-model adoption or benchmark-effect experiment was run. PostgreSQL tests remained conditionally skipped in the TS suite; this diff does not change provider storage behavior and the real provider regression covers File and SQLite.
Related: #6987 post-merge audit discussion
discussion_r4335733624.