Skip to content

fix: review Goal objectives during replanning - #7052

Merged
huangruiteng merged 2 commits into
mainfrom
codex/goal-objective-replan-20261022
Oct 22, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/goal-objective-replan-20261022

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Ordinary work reads and chat guidance currently prompt objective revision, while replanning lacks a complete comparison of the current objective, retained requirements and actual work. This change makes replanning the primary semantic review point. Ordinary conversations keep the revision tools without proactively prompting an objective proposal.

The existing TypeScript replan owner now asks for an evidence-linked judgment in the existing Vision/path_delta: a material direction change, a scope conflict, missing evidence, stale display text, or justified no change. It reuses delivered Core Goal/acceptance context, pending proposals, owner apply and independent peer adoption. Original commitments, stops and permissions remain binding. This is agent guidance; it neither creates a new enforced check receipt nor automatically revises Goals. Applied-revision adoption checks and ordinary callable APIs remain intact.

The existing Goal settings and conversation proposal/apply journey are reused; no UI or configuration surface is added. Qualification below is against source-checkout CLI/native handlers and disposable providers. It does not certify installation, model compliance, peer adoption in a live deployment, or long-horizon benefit.

Validation and cost:

  • 95 focused Python tests pass across real File/SQLite CLI, objective proposals, prepared native actions, owner apply, independent adoption, replay/conflicts and replan context; 27 TypeScript tests preserve typed exits, default-off strategy and the guidance/obligation boundary.
  • 170 differential tests pass, including incomplete, reordered, split, repeated, wrong-carrier and oversized instruction transitions. The 96-row actual CLI comparison passes with two explicit cost review signals.
  • Measured ordinary replan context grows from 6,842 to 7,779 bytes, remaining below its unchanged 8 KiB limit. The vision-rich fixture was already over that limit and remains so (20,211 to 21,148 bytes); this does not waive its warning. Guidance grows from 1,984 to 2,921 bytes. The two crowded JSON carriers grow by 729; an exact complete, once-only transition allows at most 768 additional bytes/chars on those carriers. Action, shape, line and hard envelope limits remain unchanged. Both RFC languages record this cost and its limits.
  • Initial full premerge exposed two existing unmigrated smoke fixtures, reproduced on immutable base, and a missing local npm dependency. The test-only follow-up imports disposable fixtures through the existing backup/prepare/apply path; heartbeat accounting, replay, waiting and refresh/shared-runtime routing now pass. Refresh dry-run verifies the entire existing runtime remains unchanged. Canonical read refusal is retained.
  • Ruff, whitespace, bilingual RFC, semantic vocabulary and public-boundary checks pass. Full premerge at 3eb6dd168ae8031140e798bba5101e6be7a85111 passes all 6 direct checks and 19 selected checks with zero failures; the final-scope change-quality receipt is accepted. Earlier failures are retained as evidence rather than relabeled.

Scope-fit: reuse the current owner and five replan guidance clauses; remove duplicate ordinary-flow nudges, retain APIs and adoption, and repair the adjacent fixture setup. No new schema, runtime classifier, configuration, authority store or speculative framework. Merge and installed rollout remain separate gates.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent | gpt-6-astra | OpenAI | runtime_reported | xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机

受影响的是持续处理 Goal 的 Agent,以及需要审阅目标修订的用户。用户只报告普通进展时,旧指引仍出现在日常读取和对话中;本次把主动核对移到重规划,允许有依据地维持原目标,同时保留用户主动调用修订接口的路径。

源码入口已验证:日常读取不主动提示修订,重规划交付完整核对指引,提案不会直接生效,各 Agent 仍需独立采用。本 PR 不自动改写目标、不替用户应用修订、不代其他 Agent 确认,也不宣称模型遵从、安装采用或长期效果已经验证。尚待维护者合并授权及安装后的真实采用;这些仍属于原任务,不能由源码测试或本评审替代。

改动思路

复用既有重规划与目标权威 owner,指引不制造新状态或新权限;测试观察器只约束可解释的输出增长。当前边界是指引投放、真实 CLI/native 消费和既有 smoke 的显式迁移;安装与真实采用保留为后续验收。

这里的“重规划”是已有的路线复核入口,不是新增任务或定时器。Agent 先复用已经送达的目标和累计验收,再判断是否真的存在方向变化。范围冲突不能靠改写目标获得许可,缺证据应保留未证实结论,显示陈旧应交还投影 owner;有依据地维持原目标也是有效结果。真需要修订时复用待审提案,再由 owner 应用、各 peer 分别核对自身工作并采用。既有新执行限制与旧 Turn 恢复路径继续有效。

删除全部目标维护指引会丢失核对入口,另建检查记录或自动分类器则增加状态与人工负担;本次沿用一个既有指引数组,同时删除日常重复提示,边界合适。未新增确认轮次:普通进展无需确认,实质目标变化沿用已有 owner 决策,已知材料由 Agent 预备。

具体改动

依据修改前的 docs/architecture/rfcs/goal-outcome-refinement-v0.md,固定版本 a3e5e520f9c8444fa3cd990bdc5829c680f2e673:Current operating objective 的原承诺、提案无效力、owner 应用、独立采用约束已实现并保留;Ordinary user messages 的真实人类来源与累计要求约束保留。原 RFC 的日常提示位置根据当前需求明确调整,并同步中英文说明。Validation must cover 中安装、模型采用及长期收益仍待资格验证,不拿新文档证明旧验收已经完成。

关键代码讲解

  1. REPLAN_PLANNING_GUIDANCE 在既有第一条加入目标/累计要求比较及有据“不变”判断,其他四条保留原来的证据、未达验收、冻结标准和完整边际成本义务;requirements 投影送达真实 CLI/host,但不会凭这段文字消除重规划义务。
  2. interactionRequiredReads 删除日常 prepare-objective 提示,完整目标读取、来源变化重取 guard、canonical objective 优先和逐 Agent 采用仍在。
  3. GUIDANCE 删除日常主动提案段,原生 TOOL/handler 不变。真实测试经提案、owner 应用、独立 readback/adopt,并验证提案前后原始目标不被写坏,另一 peer 不能被代确认。
  4. _continuation_instruction_migration 只在两个 JSON carrier 的完整旧→新指令转换时给一次 768 字符/字节增量,重复、缺句、错序、拆段、错误 carrier 和超量都会失败。它是测试观察器,不能决定实时状态。

其余差异包括真实 CLI/native 与 TS 断言、170 项差分单测、中英文 RFC,以及三个既有 smoke 的迁移适配。测试复用真实 backup/prepare-import/apply-import helper;refresh dry-run 对比整个 runtime 内容,heartbeat 仍校验记账、重放、等待与路由,跨 runtime 投影仍覆盖失败恢复。没有恢复未迁移读取 fallback,也没有添加生产数据迁移。

对主干的风险

主要风险是文字投放变化影响 Agent 判断,不能以“枚举没变”冒充行为等价。逐条比较 actor、触发条件、先后顺序、证据来源、权限与停止条件后,本次结论是 intentional_change_validated:位置有意改变,既有约束保留。模型理解和实际效果没有被脚本证明;代码回退也不能删除已经存在的目标修订历史。

固定 head 3eb6dd168ae8031140e798bba5101e6be7a85111 的本地验证:95 项 Python 真实 File/SQLite/native 测试、27 项 replan TS 测试及 Goal objective TS 边界测试通过;96 行实际 CLI base/head 对照通过,两个尺寸变化保留为 review signals;完整 premerge 的 6 项直接检查和 19 项选中检查通过,最终范围 CQR 已接受。170 项差分单测的源文件在 rebase 后保持一致。按 Goal 的 review policy 未读取或等待远端 CI。

早先失败未被掩盖:两个 smoke 在不可变 base 上均因未显式迁移而拒绝;补齐迁移后,在单项和整套检查中都通过。缺少 npm 开发依赖导致的扫描失败也在安装依赖后恢复。原输出预算超限保留并按同输入测量修复,不删除输入、断言或原义务。

语义与 CI 对齐

复用现有语义 owner,没有新 runtime enum、协议或状态分类规则。完整语义扫描与 public-boundary 检查通过。普通信封从 6,842 增至 7,779 bytes,仍在原 8 KiB 以内;指引 1,984→2,921 bytes,回归预算 2,000→3,000。拥挤 JSON 增量 729,限定一次 allowance 768。已有 vision 大信封 20,211→21,148 bytes,原有超限警告保留;没有放宽硬传输、执行或实验门槛。代价明确,不能当作无成本的提示改动。

我的整体评价

结论为 APPROVE,针对这个可独立回退、可通过真实入口验证的源码增量;它没有完成全部安装和运行采用。长期继续工作能力 preserved:原任务、累计要求、停用、恢复、提案重放和 peer 采用 owner 保留,新增文字不能自行记完成;长期收益未测量。用户交互 improved:日常少一次主动修订诱导,主动 API、已有 owner 审阅与错误恢复不受影响。没有新 opt-in 功能,日常提示默认变化已经披露,不能声称 feature-off 的提示完全没变。

复用既有重规划与目标权威 owner,指引不制造新状态或新权限;测试观察器只约束可解释的输出增长。当前边界是指引投放、真实 CLI/native 消费和既有 smoke 的显式迁移;安装与真实采用保留为后续验收。已采用的简化是删除普通流重复提示并复用现有迁移 helper;不引入平行检查机制。未发现当前 head 的阻断缺陷,仍需维护者明确合并授权和独立安装验收。本 COMMENTED 自审不是 GitHub 正式 self-approval,更不是合并许可。

English verdict: APPROVE — 3eb6dd168ae8031140e798bba5101e6be7a85111 moves proactive objective review to existing replanning, keeps ordinary APIs and owner/independent-adoption boundaries, and repairs disposable canonical fixtures. Exact-head local premerge and real CLI/native checks pass; instruction cost increases are measured and bounded. Model compliance, installed adoption and long-horizon benefit remain unqualified. Merge authorization is separate.

@huangruiteng
huangruiteng merged commit bb6e78e into main Oct 22, 2026
12 of 34 checks passed
@huangruiteng
huangruiteng deleted the codex/goal-objective-replan-20261022 branch October 22, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants