Skip to content

fix(replan): retain original goals and complete scoped evidence - #6649

Merged
huangruiteng merged 3 commits into
mainfrom
codex/native-goal-replan-input-20261016
Oct 16, 2026
Merged

huangruiteng merged 3 commits into
mainfrom
codex/native-goal-replan-input-20261016

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

Native non-game trials initialize their Goal with a generic continuation reminder. The replan codec also drops complete objectives or evidence containing local paths or credential-like text, and cuts evidence to 240 characters. A valid instruction-file reference can therefore become a missing structured Goal.

Initialize new native Goals from the original task agent_query, keep research guidance separate, and preserve complete scoped Goal, validation and action text in replan and its evidence readback. This deliberately changes ordinary and stride-enabled replan inputs. Source/Agent scoping, bounded observation selection, private snapshot transport, admission and settlement keep their existing owners. Public artifact/upload/publication filters are unchanged; these scoped packets are not publication artifacts.

Replaces #6646 on current main. Existing Goals/checkpoints are not automatically migrated, referenced task files are not expanded into invented acceptance criteria, and existing per-Turn Goal-state required_reads remain. This does not add a planning-horizon field or configuration switch, or change task scoring, feedback opportunities or budgets.

Validation at f9029bdce68b39d62eb3e1fb7877d75501e6510f (the final commit changes only a test fixture):

  • Prior source fails all eight new task/scratch-path cases. Updated core Goal/replan/real CLI+MCP regression: 110 passed; TS replan/stride owner suites: 35 passed. Complete multiline evidence and content-bound readback are covered.
  • Independent Linux provider environment: 380 passed across prompts, SForge runtime, warm start and task entry. The first run had 378 pass / 2 fail because the real-bootstrap fixture did not bind its source path, which an editable host installation masked. The fixture now supplies the intended checkout; the complete rerun has no skips.
  • Public-safety regression: 286 passed; public publication sanitizers remain active. Earlier checks that preserved replan credential filtering were superseded by the complete-source contract and are not the final qualification.
  • Normal wheel, real isolated non-root Portfolio and Ad mature-checkpoint restoration: both pass Goal persistence, typed core_goal readback after context adoption, fresh-before-replan preparation and byte-identical referenced task files. All 1,765 installed package files match the current source. No model or grader is invoked; no live worker upgrade or research improvement is claimed.
  • Risk canary: 5 direct checks and 19 selected checks have zero blocking check failures; one existing maintainability advisory and the benchmark manual-review hold remain. Its production-source scope is the preceding commit; the final fixture-only delta is exercised by the complete Linux rerun. Semantic advisory/full semantic check, Ruff and diff/public-boundary checks passed. Independent review and exact-head merge readiness remain separate.

The bounded ownership pass keeps Python as source/transport adaptation and TS as replan selection/identity owner, and renames the internal evidence-row helper so it no longer falsely labels scoped text public. Existing CLI/MCP/agent readback changes; no new user operation or frontend/Lark setting is added. Real worker adoption and scientific benefit remain unproven.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
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

Copy link
Copy Markdown
Collaborator Author

Final author validation for f9029bdce68b39d62eb3e1fb7877d75501e6510f: core Goal/replan and real CLI/MCP regression 110 passed; TS owner suites 35 passed; independent Linux provider regression 380 passed without skips; public-safety regression 286 passed. A normal wheel also passes two real non-root mature-checkpoint receivers, preserving the new original objective through research-context adoption and typed replan, with byte-identical referenced task files. All 1,765 installed package files match current source; the final commit only corrects the bootstrap test's source binding.

Replan now keeps complete scoped source text, including paths, credential-like strings and trailing constraints. Public export/upload/publication redaction is unchanged. Source scoping, bounded observation selection and original admission/settlement authority remain. Goal-state per-Turn reads already exist; this PR does not claim a new planning-horizon Goal projection.

Earlier path failures, private verification-fixture errors, a superseded interrupted run, the first Linux fixture failure and their corrections remain in the validation history. The risk canary has zero blocking check failures but retains the existing maintainability advisory and benchmark manual-review hold. No model/grader, new paid experiment or active-worker hotpatch was performed. Please assess the complete current head independently before approval; installed restoration is not scientific benefit.

@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.1-sol | OpenAI | runtime_reported | effort=max

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

动机

精确 head:f9029bdce68b39d62eb3e1fb7877d75501e6510f。

受影响的是新建 native 非 game 试验、或在同一 Goal 内重新规划的 Agent。此前新 Goal 保存通用研究提醒,正常任务文件引用还会使重规划目标被过滤;现在原题进入 Goal,作用域内目标和证据保留完整内容。独立真实入口验证了原题、文件引用、长文本尾部及精确历史读回,错误 Goal、其他 Agent 和失效引用仍被拒绝。本次不解析任务文件来发明 acceptance,不迁移旧 Goal/checkpoint,不启动模型、grader 或实验,也不授予执行或发布权限。

判断依据先于 diff 阅读:改动前 dfcb03e6d31361ab65d882e3294b9fdf92b39f6a 的 docs/reference/protocols/agent-scoped-evidence-ledger-v0.md,并对照同版本 benchmark/edgebench/README.md 的 Feedback protocol (new-run default: native) 与 docs/architecture/rfcs/hierarchical-agent-stride-control-v0.md 的 7.4 Authority integration。原 Goal 和任务仍拥有方向、约束和验收权威。

这是有依据的内部输入修复。真实模型采用、长期研究收益、已安装 worker 和完整父验收仍未验证;旧 public-safe 文档措辞的统一仍需跟进。该边界不需要另建任务解析器、配置开关或 Goal 迁移框架。

改动思路

复用既有任务 provider、Goal 元数据和 TypeScript 重规划 owner,区分“给有权读取本 Goal 的 Agent 的私有决策输入”与“可以对外发布的材料”。只修改 benchmark 提醒而保留原过滤器,仍会在下一次 replan 丢掉合法任务;反过来,保留完整私有输入也不能把它认证为公开材料。

路径 本 head 的行为
新 native 非 game trial 原始 agent_query 成为 Goal objective;研究提醒仍在启动 prompt/AGENTS
普通与 stride-enabled replan 同样保留源目标和 validation/action 全文;这两条 lane 都有输出变化
scoped history drill-down 完整内容参与引用身份,变更尾部或换 Agent 后旧引用不能解析
公开输出、旧 Goal、其他反馈模式 公共检查仍独立执行;既有 Goal 不迁移,blind/best-only/game 保持原分支

此表是源码说明;执行证据见下文。Python 仅提供源文本/传输事实,TS 仍拥有选择、去重、引用和上下文身份;没有第二套规划权威。

具体改动

已读全部 11 路径及相邻真实 caller。run.main 选择原题;SForgeWorker.__init__ 把有效 objective 的包含关系校验移到完整 native prompt;native_research_guidance 重命名没有改研究、评分、cooldown 和停止义务。真实 BenchmarkCodex 首次 bootstrap、task-plan 和之后的 prepare 都经过独立验证,后续 prepare 不覆盖既有目标。

replan_context_codec.py 的 _source_text、_goal_facts 和 evidence adapter 去掉发布过滤及 240 字显示裁剪。replan_context.ts 将误导性的 publicEvidenceRow 改为 readableEvidenceRow,仍从引用中排除内部 source facts,保留原有 24 个不同观察的选择、覆盖和 accounting 配对规则。测试覆盖 active-state/registry 来源、普通/stride 路径、长尾、实际 CLI/MCP 及私有快照;最终 bootstrap fixture 显式绑定本 checkout,避免 editable provider 遮蔽来源。

按 One Replan Entry 核验:完整 index 在作用域过滤后进入原 reducer,显示窗口不能遮掉本 Agent 的旧记录;同前缀不同尾部得到不同引用。按 Privacy Boundary 核验:本 PR 明确提出把该输入视为私有,公共出口检查继续拒绝相同敏感形状,不能把这个变更表述成放宽公开材料规则。文档尚留有旧的“整个 context 为 public-safe”开头和无范围限定的隐私列表,建议在同一 owner 统一为“私有 scoped 输入/公共发布输出”的明确分工。这是文档澄清建议;当前检查未发现自动公开、跨 Agent 取证或新增权限路径,不要求恢复会删除原题的过滤器。

对主干的风险

独立执行:380 项 provider/warm-start/task-entry 回归、95 项核心 replan/CLI/MCP 回归、66 项 TS 回归、289 项公共安全/handoff 回归均通过,无 skip。另有同一最终独立 fixture 的 20 项真实 run.main → bootstrap → task-plan → replan 检查通过;同一不可变基线 20 项均在通用 objective 处失败。两个完整 index 探针在 head 通过、基线失败,覆盖普通/stride 两种策略、超过显示窗口的其他 Agent 记录、长尾变更、失效引用拒绝后刷新恢复、反向 index 顺序及私有快照;公共发布 validator 对同一敏感形状仍拒绝。

Ruff、control-plane tsc、开发期语义 advisory 后的全量 semantic smoke 通过。风险 canary 的 5 项直接检查、19 项选中检查全部执行,没有新增 blocking failure;其中保留 1 项既有 DSH advisory,另有 benchmark 人工边界 hold。总 canary 仍为 quality_receipt_missing,不能将审查批准当作质量收据或合并放行。

独立 base/head 完整 maintainability 报告仅移除仓库根路径后逐字段相同:DSH 仍为 93 statements/51 decisions、1 unreviewed、0 magnitude regression;docs-governance 在两边都因相同两个旧 TS RFC 日期标题失败,完整诊断仅规范化 checkout 路径后相同。这些未修复、未放宽预算;本 PR 影响的输入、隔离和恢复不变量由当前 head 的独立证据覆盖。未查询或等待 CI,也未把作者的 wheel/checkpoint 报告当作本机独立验证。

我的整体评价

APPROVE,未发现阻断性实现问题。 前一版本中真实任务文件引用导致 objective 为 null 的缺口已在本 head 的实际 owner 路径消除;本次结论来自完整新审查。完整私有输入增加输出体积,是为保留真实决策约束的明确取舍,不是 token、延迟或科研效果优化结论。后续公共文档应统一上述旧措辞;旧 Goal/checkpoint、真实模型采用、长期收益和安装资格保持开放。

面向下一步的重构检查已落实为删除错误的输入过滤责任、准确命名 readable helper,并继续复用原 TS owner;没有必要再抽通用框架。批准不包含 merge、admin bypass、实验重启、会话采用或对外发布原始上下文的授权。

English verdict: APPROVE - f9029bdce68b39d62eb3e1fb7877d75501e6510f; original task and complete scoped replan text survive real entry/bootstrap/history readback, while foreign/stale references and public-output violations still reject. Independent provider/core/TS/public-safety and paired real-path probes pass. Legacy wording cleanup, quality receipt, benchmark boundary and untested model utility remain separate; no merge performed.

@huangruiteng
huangruiteng merged commit 488e443 into main Oct 16, 2026
34 of 40 checks passed
@huangruiteng
huangruiteng deleted the codex/native-goal-replan-input-20261016 branch October 16, 2026 13:49
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