Skip to content

Resolve staged replans against the acceptance owner emitted by quota - #8110

Merged
huangruiteng merged 2 commits into
mainfrom
codex/acceptance-reference-readback
Nov 5, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/acceptance-reference-readback

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

A compact quota decision can place the only literal goal acceptance contract in planning_horizon and direct the Todo summary there. On main the staged reviewer rejected that address even when the decision file and source hash were correct. This makes a valid decision unusable when recovering the acceptance criteria for a replan.

The writer and staged reader now use the registered quota acceptance carriers. A valid reference returns the original outcome and stop conditions. Missing owners, unknown paths, reference chains and ambiguous owners fail closed. Older captures with a loaded work-context owner remain readable. The Python display adapter applies edits to the original facts and only sends the roots consumed by this projection. No new CLI flag or persisted format is required.

Validation

  • Reproduced the valid-address failure on main 12803354ab and exercised the same public CLI entry point against this head, including hash-correct negative cases.
  • Six related Python suites passed all 215 tests on the standalone branch. The TypeScript suite passed 44 tests and the strict control-plane typecheck passed.
  • Replayed two captured benchmark steps and one larger local decision through the same display operation on both versions. The serialized output matched byte for byte for all three. Each used one internal RPC. Its compact request and result bodies totaled 648,645 B on main and 403,743 B here (−37.8%). This measures the display RPC only. Model billing, full-task quality and run time require a separate comparison.
  • The older staged-read suite on main assumes the legacy full guard in several places. Independent progressive coverage for File and SQLite is carried in Pin the native first read and deliver the same-Turn selection route #8100. This proposal can be reviewed against main on its own. When integrating both changes, retain the explicit legacy and real progressive paths.

Extracted from #7430. The bilingual experiment history stays in the parent PR.

The separate historical staged-read suite on this branch had 13 passes and 10 failures. The same ten cases fail on the main baseline. The three-way integration with #8100 and #8106 passed all 59 acceptance and staged-read checks. Quick premerge passed with one inherited maintainability advisory in _admitted_interaction_next_cli_actions outside the changed code.

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.

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

Reviewer: model_agent; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=max

Reviewed head: 4dd045e2f9c06463f3837e26b14df165161b3c77; base: 12803354ab13a003de8620ab496250617224ff37.

动机 / Motivation

使用 quota CLI 恢复重规划任务的 Agent,需要取回原目标的完整验收要求才能继续工作。同一决策把唯一完整验收正文放在规划区并发出引用时,旧版 reader 会拒绝这个合法地址;新版本从原 capture 取回要求,避免为读取已知事实重新准入。同一个公开 CLI 反例在 base 被拒绝,在本 head 能读回原 outcome;缺失、链式、冲突和未登记地址仍被拒绝。本次只判断同一 capture 内验收引用的显示和恢复,不认证整个 C1、已安装 Host、模型采用、计费或长期净收益。

改动思路 / Approach

共享既有 TypeScript 验收 carrier 和原数值身份 owner,删除 Python 的相等/迁址决策;Python 只保留结构性 IO 快路与原值应用,没有新增 authority 或持久缓存。当前五文件切片独立修复 reader/writer 不一致;整个 C1、原生模型选择和长期成本不在本次通过范围。不改动会保留已复现的合法输入拒绝;仅再加一条地址正则又会保留 writer/reader 的两份登记规则。当前将完整 carrier 的枚举、原数值身份比较和直接引用迁址放到现有 TS owner,Python 继续应用原值上的显示编辑。没有新增 CLI、持久格式或后台服务;同一 capture 仍是读取依据。

在此 head,普通路径是完整验收正文 → 已登记引用 → staged review → 原 outcome;缺失、链式、正文与引用并存或未登记地址则拒绝。这个前后对照使用文字表达,未发布未验证渲染的图。

具体改动 / Changes

完整差异为五文件 +265/−121:三个生产文件 +150/−104,两个测试文件 +115/−17。规范依据为 docs/reference/protocols/turn-envelope-v0.md,spec_revision 12803354ab13a003de8620ab496250617224ff37。criterion_id acceptance_contract 已实现:同一响应中保留完整 owner,重规划沿原地址读取;criterion_id source_decision_hash 已实现:仍核原始成功决策与匹配哈希,不另做准入。

关键代码讲解

  • _reference_context 只运输当前显示 owner 消费的根字段,得到编辑后应用到原始 Python 值;未知字段、长尾正文和精确数值继续保留。结构性快路只判断有无可能共享,不在 Python 重建相等或来源优先级。
  • inlineAcceptance 供 replanGoalContext 使用,读取登记的 loaded work-context、planning、replan 或 Todo 完整 owner;目标带另一引用、缺正文或地址未知时拒绝,旧 loaded-source capture 保持可读。
  • referenceGoalAcceptance 复用原数字 spelling 身份,先选完整 owner,再把既有引用迁到保留正文,避免产生引用链。删除旧 Python equality/relocation 规则,是这次有证据的同域简化。

对主干的风险 / Risks

最强风险是跨 JS 运输时把不同数值/来源误合并,或把未登记地址当完整验收。当前没有复现阻断问题:新六例经真实 subprocess CLI 执行,合法 planning 地址在 base 失败、head 成功;四种哈希正确的坏引用均拒绝且原 capture 字节不变。现有 File/SQLite 真实 guard、数字类型、不同 revision/source、旧引用迁址与丢 baseline 恢复用例也通过。

本轮六模块共 196 PASS / 10 FAIL / 0 SKIP。十个失败都来自未改的 test_replan_staged_read.py:基线同模块在与 head 相同的锁定依赖环境下 13 PASS / 10 FAIL,逐项错误键、断言源码和完整 traceback 在只归一化 pytest 运行号、对象地址及生成引用文件名后相同,分别是旧 inline guard、recovery.path 和 replan_action_packet 假设。它们发生在新增地址解析前,不能称已修复,也不能只凭相同总数豁免;新路径的六例和固定输入对照独立覆盖了本 PR 改动。

另有 30 组同输入显示结果逐字节相同,覆盖 loaded/unavailable/null、无 work-context、未知长尾及数值类型。首次未固定 fixture 时间的对照只相差观察时间,保留为无资格结果;固定输入时间后没有归一化输出。原生 delivery 显式 off 的 File/SQLite 路径保持,未新增默认必读、调度、扣额或权限条件。

语义与 CI 对齐

PASS:完整 TS 套件 6,121 通过 / 77 跳过 / 0 失败(其中44项相关 typed tests 另有定向结果)、严格 typecheck、配置范围17文件 mypy、变更文件 Ruff、完整 semantic-vocabulary smoke;标准 premerge 六项 direct、十三项 selected,零阻断失败。有一项继承的 maintainability advisory:未改 _admitted_interaction_next_cli_actions 在 base/head 的完整检查均出现同一 finding、零 magnitude regression;该债务未被修复或改为通过。当前精确范围 CQR 已实际记录、原生 verify 为 valid,带 Goal policy 的标准 premerge 重跑通过;两项已归因旧失败保持 failed/risk,没有改记通过。未查询、轮询或等待 CI。复用既有语义 owner,无新增 shared vocabulary,也未以预算放宽换取绿色。

我的整体评价 / Verdict

未发现阻断 finding;对这个精确 head 的独立五文件修复给出 APPROVE。long_horizon 在“合法原始验收可继续读取”的边界 improved,user_experience 因无需重入准入或新增确认轮次而 improved;两者均不推导真实模型或长期收益。检查了 quota CLI、reference_context 和 replan-view 路径;本 PR 没有改变渲染页面或首屏布局。已安装 Host、真实模型采用及端到端长期收益未验证。当前五文件切片独立修复 reader/writer 不一致;整个 C1、原生模型选择和长期成本不在本次通过范围。旧 staged 测试失败与继承债务保留,批准结论、GitHub formal approval、closeout/readiness 和维护者合并权限分别判断。

English verdict: APPROVE for the bounded exact-head acceptance-reference fix; pre-existing staged-test failures and the inherited advisory remain disclosed. No merge is authorized.

@huangruiteng
huangruiteng merged commit 2ce6a5d into main Nov 5, 2026
26 of 38 checks passed
@huangruiteng
huangruiteng deleted the codex/acceptance-reference-readback branch November 5, 2026 13:13
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