Skip to content

fix(testing): support native context in behavior qualification - #7831

Merged
huangruiteng merged 6 commits into
mainfrom
codex/native-context-consumers-release220-20261101
Nov 2, 2026
Merged

huangruiteng merged 6 commits into
mainfrom
codex/native-context-consumers-release220-20261101

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

问题与结果

原生 context delivery 返回文件导航后,行为资格验证器仍有两类接线错误:required-vision 的 python -m loopx.entrypoint quota replan-view 没有进入受监督 CLI 通道,在隔离 shell 内无法导入;普通 actor 的系统提示又无条件要求 writeback 命令,而显式 context off 只提供内联合同。原有 review 的 F1 普通调用预算修复继续保留。

本 PR 将已有 native context 适配收敛到真实工具路径:模型收到原始导航,按需读取同一捕获、review 和 writeback,再执行工作及持久化。selected Todo、terminal settlement、required vision、scoped-gate successor 与 capability repair 继续使用原有状态和语义判据。

  • F2:复用现有 replan_view_command_tokens,仅将单条只读 reader 转接到隔离宿主的受监督 CLI;以完整 argv 反查当前捕获给出的原始 review/writeback 命令,再进入原有源、摘要、顺序与状态校验。没有开放任意 Python 导入或增加 sandbox 的源码读取权限。
  • F3:只有当前 action packet 提供 writeback 命令时才要求执行,否则使用内联 writeback_contract。保留先读当前上下文和工作证据、再选择动作的顺序及原有停止、权限和结算条件。
  • 普通调用仍最多 7 次;原生模式的 3 次 reader 额度单列,显式关闭不增加。required-vision 仍是总计 40 次,原生读取也计入。
  • required-vision 脚本只从模型实际收到的工具结果重建所需字段,并读取真实 staged writeback;没有把私有判分捕获注入模型。继续保留捕获物理身份、另一源/摘要拒绝、隔离 shell、CLI 来源、权限、顺序、单次 spend 与耗尽边界反例。

验证

测试版本:2e05ed4f6f2e04b6dd3036ac36cbebdaa52322d0;目标为 main,本次已包含 c334bbaf196505778149ae4edeefaa013d343259。正常向前合入目标分支,未重写已有 PR 提交。

  • 在仓库之外的临时目录,用同一最终测试对照合入 main 后的修复前代码和修复后代码:F2/F3 三项由 3 failed → 3 passed。
  • 8 个受影响测试模块:202 passed,0 failed,0 skipped。包含真实 OS 隔离 shell 的 capture → review → 工作证据 → writeback → authored vision → refresh → 单次 spend,以及错误 source hash、decision file 和非 reader Python module 拒绝。
  • 全部 15 个 PR 路径 Ruff、仓库配置的 mypy 17 个目标、staged/committed RFC bilingual 检查通过;diff-scoped semantic advisory 未发现支持形式中的新词汇载体,其静态扫描限制保留。
  • Standard premerge 在相同 exact head 通过:6 项 direct checks、10/10 catalog checks、8/8 risk smokes,failures 和 manual holds 均为 0。首次因新 worktree 缺少 typescript 开发依赖失败;按锁文件运行 npm ci --ignore-scripts 后,失败检查和完整 standard gate 均通过,未改产品代码或放宽检查,首次失败保留。

边界:合成模型 transport + 真实 CLI、隔离宿主和临时持久状态;没有付费模型调用。以上不证明真实模型采用、正式发布资格、benchmark 收益或净成本下降。没有查询、轮询或触发 CI。历史候选的失败保留,后续最终源仍须按原模型、预算和完整验收资格化。

范围与 review

变更归现有测试宿主/传输适配 owner,不新增决策 owner、共享协议状态、模型参数或科学任务预算。显式关闭的内联路径单独验证。此次系统提示调整修正可用命令条件,未删除 actor、先后顺序、权限、证据来源、继续/停止或结算义务。

同域重构采用现有 reader 归一化 helper,避免重复 CLI parser 或放宽 shell;更大的宿主抽取不属于本次修复。没有前端布局变化。此前 REQUEST_CHANGES 记录保留;修复提交交回当前 head 的独立 review,尚未据此批准或合并。

loopx-agent and others added 4 commits November 2, 2026 02:14
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: huangruiteng <huangrt01@163.com>
Signed-off-by: huangruiteng <huangrt01@163.com>
@huangruiteng
huangruiteng force-pushed the codex/native-context-consumers-release220-20261101 branch from a40c0df to dec73e9 Compare November 1, 2026 18:19
@huangruiteng

Copy link
Copy Markdown
Collaborator

Validated the native-context consumer against current main, which now includes #7833.

The combined path previously failed because the behavior qualifier still assumed an inline replan_context; the native packet now carries bounded capture navigation plus staged review and writeback readers. The qualifier now exercises the same sequence expected from the model:

  1. select the required fields from the captured quota packet;
  2. read the exact replan review view;
  3. read the projected work evidence;
  4. read the exact writeback view;
  5. execute the typed semantic action.

It keeps the legacy inline path, rejects skipped/repeated/out-of-order staged reads, accepts both legacy immediate successor handoff and the current settle-original-Turn successor contract, and budgets only the three mandatory native reads. The scripted transport selects only scenario-required pointers; it does not let the oracle read private context on the model's behalf.

Exact head: dec73e9b0

Validation on that head after rebasing onto 3503d8232:

  • 88 passed, 8 skipped across replan semantic action, model-tool context, context-machine configuration, and capture-registry independence suites;
  • 24 passed for the focused replan semantic-action suite on the standalone PR path before the final rebase;
  • Ruff passed for all touched implementation and focused test files.

I am not claiming a full-tree mypy pass; an earlier broad invocation reported unrelated existing tree errors rather than a diff-scoped result.

@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; model=gpt-6.1-sol; provider=OpenAI; source=runtime_reported; reasoning_effort=max

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

F1 / P2:原生读取额度泄漏到 inline/off,改变原资格预算。 同一真实 CLI 八步序列,14031 在七次上限失败,当前 dec73e9b0a34a047cbe8a99b4e224c26f0414b50 第八次执行写回并判为通过;两边均显式关闭 context delivery,没有任何 native reader。

动机 / Motivation

需要验证 Agent 能否沿真实 heartbeat 选中工作、执行并结算的维护者,以及默认开启原生上下文交付的行为验证调用者。

原先 quota 返回文件导航后,验证器在模型收到读取命令前就失败;当前 head 保留原导航,让模型经真实 reader 读取同一捕获,再完成选中工作或 replan 写回。私有判分器读取不会冒充模型已读。

当前 native adapter 能处理原生导航与分阶段读取,但最新提交把 off 路径也从七次调用放宽到十次;同一原本预算耗尽的序列因此变为通过,原预算保持目标尚未满足。

本审查不把旧 head 的通过继承给当前 head,不以 CI 未知阻止批准,也不允许通过扩大原 off 场景预算来改变资格结果;发布、作业和安装资格仍独立判断。

改动思路 / Approach

复用现有 capture/reader owner 的方向合理,但原生传输需要的读取额度应只覆盖已验证的读取;当前全局十次上限同时放宽普通 off 路径,改变了原资格标准。

当前 PR 仍应交付五类内部验证器的传输兼容修复;先修复 F1 的调用额度隔离,再验证新的 writeback reader 与 successor 结算分支。

模型仍应收到原始导航,私有判分器可读同一当前捕获但不能把结果注入模型。真实 reader 应保留 provenance、次序和独立工作/结算判据。最新分阶段 writeback reader 与 settle_original_turn_before_end successor 兼容各有现成 owner;它们不能让没有这些额外读取的调用者获得更多模型尝试。

具体改动 / Changes

精确审查 head dec73e9b0a34a047cbe8a99b4e224c26f0414b50,base 3503d823256c02bc531558f4a3bc9ea7c963d6eb。原15文件 diff、14031 的 staged-review 增量,以及 a40 的完整两文件 +193/-39 增量均已读完。当前15处作者改动 blob 与 a40 全部相同;rebase 不被当作自动批准。

独立依据仍为变更前 73c5daab342afe8aa6c1a85dc92bc0bf352d9132 的 docs/reference/protocols/model-behavior-qualification-v0.md; docs/reference/required-work-context.md,以及维护者当前评论中“只预算三次 mandatory native reads”的 frame。

  • Actual default portfolio — not met:原真实工具场景与接受标准应有可比预算。当前 off 反例证明预算保持目标未满足;需要 F1 修复。
  • Machine default — implemented:共享 QuotaToolContext 保留原 stdout,从 current recovery 校验路径/digest;不会预取旧 delta baseline。五类 actor 接通真实 reader 的方向保留。
  • Current captured observation — implemented:最新 replan host 在 capture/review 后允许 exact writeback view,拒绝 skipped/repeated/out-of-order reads,保留 frontier/source 与 obligation 校验;successor 接受旧 immediate-end 与现行 original-Turn settlement 形状。这些新增路径不能用旧14031的完整通过结果作当前资格证明。

F1:保留 inline/off 的原七次调用边界

REPLAN_SEMANTIC_ACTION_BEHAVIOR_MAX_CALLS 无条件从7变为10,tool_call_limit 在非 required-vision 场景直接使用该值,没有检查是否实际出现 capture、review 或 writeback reader。

我用完全相同、SHA-256为940a097a1286c10190526445772717000a3bdb31ca045e65f4a7ad51ecfc53bf的独立脚本,在不可变14031与当前dec调用真实 actor、source CLI 与隔离 File authority;两边均 LOOPX_CONTEXT_DELIVERY=off。序列是:quota、五次 frontier read、source read、typed refresh。旧版执行七次后 tool_call_budget_exhausted,未接受语义结果;当前版执行第八次 refresh,qualification_passed=true、semantic_action_accepted=true。没有 native read、模型网络调用、预算重置或 oracle 修改。

最小修复:inline/off 继续使用原七次上限;如要给 native mandatory readers 有界额度,应只计入已验证且正确次序的这些读取,拒绝用额外普通调用消耗该额度,并明确更新总调用预算与资格证据。增加一个“off 下第八次普通调用仍失败”的真实 actor 回归,再验证三类合法 native reads。全局扩大上限并不等于保留七次行为预算。

对主干的风险 / Risks

F1 是当前精确 head 的已验证回归,与未知 CI 无关。当前主张的“只预算 native reads”与实际通用上限不一致,会使原来预算耗尽的模型行为变成合格,也改变组合 portfolio 的完整成本。必须修复这个边界,或通过明确独立的预算变更与可比资格规则获得其 owner 验收;不能把旧失败重新标为通过。

历史14031上有369 passed、真实 native selected三步与 staged replan六步证据;这些证据仍保留原版本,未称当前dec整套通过。当前dec增加了writeback-read、successor settlement兼容与新上限,完整的新资格仍待修复后执行。a40的 Ruff、配置 mypy 与 risk-based检查记录独立保存;source CQR 配置兼容失败与合并hold也保留,不是F1的归因或替代证据。维护者给出的88 passed/8 skipped属于作者证据,本审查不冒充重跑。

未查询、轮询或等待 CI。未知 CI 不阻止已具备证据的代码批准;这里阻止批准的是实际相同 off 场景接受了额外调用。其余共享 capture、exact command、权限和原结算 owner 的设计可继续复用,无需把修复扩大为新框架或活动配置修改。

我的整体评价 / Verdict

已检查五类行为验证器的真实 CLI、model tool 输入和结果读回路径,diff 只涉及内部 testing hosts 与对应测试,没有页面、布局或 viewport 改动。

当前 dec head 的独立决定性证据是同脚本、真实 CLI/File、显式 context-delivery off 的八步反例;没有模型网络调用。369 passed 与原生三步/六步证据属于历史14031,不能称当前 head 整套通过。a40与dec的15处作者改动 blob 全相同;最新完整发布资格和修复后的预算反例待证。

原生导航兼容的方向有效,但当前全局调用上限改变了未启用原生交付的资格标准。先修复这个小而明确的边界,再复核新 head。独立发布工作可以按其实际产品范围推进,本结论不授予或阻止其他已分离 PR 的发布权限。

English verdict: REQUEST_CHANGES for #7831dec73e9. F1: the unconditional7-to10 limit changes an explicit-off eight-call real-CLI scenario from budget exhaustion to an accepted result without any native reader. Preserve the original off budget and scope any mandatory-reader allowance; CI was not consulted.

# Native progressive delivery adds three bounded reads (capture, review, and
# writeback) to the same semantic action path. Preserve the prior seven-call
# behavior budget while allowing those mandatory reads to complete.
REPLAN_SEMANTIC_ACTION_BEHAVIOR_MAX_CALLS = 10

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.

[P2] 请保留 inline/off 的原七次预算。这里无条件把上限改为10,显式 context-delivery=off 同样生效。我用相同真实 actor/CLI/File 的八步序列(quota、五次 frontier read、source、typed refresh)对照14031和当前dec:旧版在七次后 budget_exhausted,当前第八次完成并 qualification_passed=true;两边没有任何 native reader。若仅为 capture/review/writeback 三次 mandatory reads 提供额度,请将它限定到实际验证的这些读取,保留 off 的原边界,并补充第八次普通调用仍失败的反例。

Signed-off-by: huangruiteng <huangrt01@163.com>
@huangruiteng

Copy link
Copy Markdown
Collaborator

Addressed reviewer F1 at exact head 97ad04c82.

The original seven-call budget is restored for all ordinary and inline/off behavior. Native progressive delivery now has a separate three-call allowance, activated only after the quota result identifies the current native capture. The loop counts context_read / staged replan reads separately, so an eighth ordinary call cannot consume native-read allowance.

Added a real CLI/File regression with LOOPX_CONTEXT_DELIVERY=off: quota + five frontier reads + one source read exhausts the seven ordinary calls, the eighth semantic writeback is never requested, and the receipt remains tool_call_budget_exhausted. The existing native path also asserts the explicit 7 ordinary + 3 native read limits.

Validation:

  • all eight changed test modules: 171 passed, 23 skipped;
  • focused off/native budget cases: 2 passed;
  • Ruff on both touched files: passed;
  • loopx check public-boundary scan: clean for both touched files (the aggregate command also reported unrelated stale local Goal registry errors outside this PR).

@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; reasoning_effort=max.

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

REQUEST_CHANGES:原 F1 的 inline/off 七次预算已修复并独立验证;当前 #783197ad04c 仍有两个与 CI 无关的 native/inline 调用边界问题。

动机 / Motivation

维护者需要验证 Agent 能否通过真正的 heartbeat 读到当前工作、执行并完成结算。原先默认开启 native context 后,验证器把文件导航误当完整决策,在模型选择 reader 之前失败。本 PR 保留原导航给模型、让私有判分器另外读取同一捕获,是正确的修复方向;当前选中工作已能走通,但 required-vision 的真实隔离 shell 仍不能执行投影出的 staged reader。

本次要求是修复现有资格验证消费者,不是证明模型已理解上下文、提高长期收益或通过整次发布资格。原失败和预算必须保留;未知 CI 不构成本次拒绝原因。

改动思路 / Approach

复用 QuotaToolContext 和 capture/reference/digest owner,将私有判分读取与模型可见输入分开,比全局关闭 native 或偷偷把完整决策注入模型更合适。narrow actor 对 python -m 形式的 replan-view 做了受限归一化,但 required-vision 使用真正 OS shell,必须让同一个投影命令实际到达受监督 bridge;仅在 invoke 里添加分支并不能保证 shell 会调用它。

保留共享 reader、场景自有 oracle 和来源校验这个设计;当前 PR 的可交付边界应包括被声明支持的五个现有消费者,不能把 required-vision 的 reader 接入停在不可达分支。最小修复是桥接已知只读入口并修正条件指令,不需要扩大 sandbox 读权限、引入新决策 owner 或增加普通工作预算。

具体改动 / Changes

规格:docs/reference/protocols/model-behavior-qualification-v0.md; docs/reference/required-work-context.md,spec_revision=3503d823256c02bc531558f4a3bc9ea7c963d6eb。Actual default portfolio 要求保留五类真实行为场景与各自语义 oracle;该项因 F2 尚未满足。Machine default 要求原生导航与机器决策分清、显式 off 保留原合同;预算部分 F1 已满足,指令部分 F3 未满足。Current captured observation 的当前来源、完整摘要、按需读取和顺序校验仍由既有 owner 承担,错误来源/顺序反例继续拒绝。

关键代码讲解

  1. model_tool_behavior.py 的 QuotaToolContext.from_output/read:私有读取固定当前 recovery,模型仍收到原始 stdout;不同 capture、摘要替换、session lookup 和 shell chain 被拒绝,读取成功不代表模型已保留。
  2. replan_semantic_action_behavior.py 的 _tool_call_budget_exhausted:新 head 恢复七次 ordinary 调用,native capture 才展示三次 reader allowance。与旧 head 相同的 off 八步脚本当前在第七次停止,eighth refresh 从未请求,F1 已实证修复。
  3. 同文件 qualify.invoke:1759:新增 replan reader 分支只在调用 console shim 后才可达。真实投影的 python -m 命令在 shell 内直接执行,未经过这个分支,触发 F2。
  4. 同文件 qualify 的 system prompt:1719:在条件性的 context_read 句子后,新增无条件 writeback reader 要求;off 的实际包没有这个命令,触发 F3。

全 PR 为 15 文件 +944/-118,七个内部运行时/资格模块、八个测试文件;没有新增用户界面或机器配置。相对上一轮 dec73e9 只有 replan host 与其测试两个文件变化,其余十三个 blob、共同 base 和依赖边界已核对;历史 14031 的 369 passed 仍只是历史记录,未挪作当前通过。

对主干的风险 / Risks

F2 [P2]:在 macOS 真 sandbox 中独立运行 required_vision=True:quota 和当前 capture reader 成功,第三步执行原样投影的 replan review 命令后,得到 shell_nonzero/PermissionError,目标是 source checkout 的 loopx/init.py。只包装 console shim 的 bridge 拦不到这个模块入口。相同脚本在 immutable base 3503 更早停于 inline-only quota,说明本 PR 有进展,但没有交付声明的完整 native vision 路径。修复后必须从 reader 到 source、authored decision、refresh 和原 Turn 单次 spend 走通,保留原四十次限制和隔离负例。

F3 [P2]:独立真实 CLI/File off 运行同时捕获了实际输入给模型的 system message 与 inline action keys。指令无条件要求执行 writeback,而 action 只有 writeback_contract、没有 writeback 字段。把这一句限定为当前包提供 staged command 时执行即可;不能用忽略提示词的 scripted transport 成功来证明文本兼容,也没有据此声称真实模型已经误执行。

语义与 CI 对齐

PASS:当前 selected native 三步真实入口通过;同一 off 八步预算反例正确停在七次;显式 off 的 required-vision 套件 17 passed。FAIL:默认 native 九模块合计 180 passed / 24 skipped / 14 failed,包含上述 shell 路径及旧 narrow receipt 断言。另一个旧六步 staged 脚本当前正确拒绝缺少 writeback reader,不能继续沿用其历史通过。应更新脚本走完整顺序,不能删除原义务或把失败改成通过。

source premerge 的本地检查执行结束后,整体入口仍因 steward_executor 配置兼容 ValueError 失败;旧 base/head 同类归因记录保留,未改活动设置,也未宣称整个 premerge 已通过。CI 未查询、未轮询、未等待。当前拒绝来自 F2/F3 和受影响的完整 native 路径证据,而不是 CI 未知或未完成历史根因清理。

我的整体评价 / Verdict

设计与代码规模仍相称,F1 的边界修复应保留;不能因此继承批准。long_horizon=not_yet_proven、user_experience=not_yet_proven:维护者仍无法通过受支持的默认 native required-vision 路径取得完整结算资格,off 调用者还收到不存在操作的强制提示。visual_review=not_applicable:检查的是内部工具 loop、隔离 shell 和 CLI 合同,没有渲染展示变化;unverified_scope=真实模型遵循、完整 native vision 成功和长期效果。

当前复用既有 typed capture/replan vocabulary,本地 reader trace 与 budget 分类不另建权限或状态 owner。完成 F2 的 supervised module-route 实际入口回归、F3 的 on/off 条件指令反例,以及对应 source/refresh/spend 回读后再评审。没有合并、dismiss 旧 review 或修改实验阈值。

English verdict: REQUEST_CHANGES; F1 is fixed, but the native vision reader bridge and inline/off instruction still need repair.

if state.seen_quota else _handle_quota_command(command, state))
if is_context_read_command(command):
return _handle_context_read(command, state)
if replan_view_command_tokens(command) is not None:

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.

[P2] 让投影出的 module reader 到达受监督 shell bridge。required_vision=True/native on 的真实 macOS sandbox 对照中,quota 和 capture read 已成功;随后模型原样执行投影的 python -m loopx.entrypoint quota replan-view ...,会绕过只包装 loopx console shim 的 bridge,直接在 sandbox 内启动模块,因 source checkout 不可读而 PermissionError。新分支因此不可达,尚不能完成声明的 native vision 路径。请复用既有受监督入口桥接这个精确只读模块形式,保留来源/摘要与40次预算及隔离负例,并从 reader 到 authored decision、refresh、单次 spend 跑通;不要扩大任意 Python/source 权限。完整同脚本 base/head 因果与验证限制见本 review 正文。

"reader before acting. If the delivered replan obligation names "
"a context_read command, execute that exact command before "
"choosing a semantic result. After reading the work evidence, "
"execute replan_action_packet.writeback to obtain the exact "

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.

[P2] 将 staged writeback reader 限定为当前包实际提供命令时执行。独立真实 CLI/File context-delivery off 运行中,传给模型的这句 system instruction 是无条件要求;同一次 inline replan_action_packet 只有 writeback_contract、没有 writeback 命令。遵循新指令会要求执行不存在的操作,改变原有 off 路径的义务。请加明确条件,保留原 inline direct action 与七次 ordinary 调用;用实际模型输入/packet 的 on/off 反例覆盖,而不是让 scripted transport 忽略这句话后仅断言成功。未据此声称真实模型已经误执行。

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

Copy link
Copy Markdown
Collaborator Author

已在 2e05ed4f6f2e04b6dd3036ac36cbebdaa52322d0 修复本轮 F2 / F3,并保留此前 F1:

  • F2:捕获 reader 复用受监督 CLI bridge;完整 argv 必须匹配当前捕获的原始 review/writeback 命令,再走现有校验。未扩大 sandbox 源码读取或任意 Python 执行权限。覆盖真实 OS shell 完整 closeout 和错误 source hash / decision file / 其他 module 拒绝。
  • F3:系统提示按实际 action packet 选择 staged 命令或内联合同;on/off 验证实际 model message 和工具输出。普通预算仍为 7,native reader 额度单列,vision 总预算仍为 40。

同一最终测试及外部临时目录对照:修复前 3 failed,修复后 3 passed;8 相关模块 202 passed。Ruff、配置 mypy 17 目标及 RFC 双语检查通过。相同 exact head 的完整 premerge 已通过:6 direct、10 catalog、8 risk checks,failures/manual holds 均为 0。首次缺 TypeScript 开发依赖的失败保留,按锁文件补齐后复验通过。

这是作者修复回执,原 REQUEST_CHANGES 保留,交回新 head 复审。

@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; model=gpt-6.1-sol; provider=OpenAI; runtime_reported; reasoning_effort=max

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

当前精确 head 可以批准。F1 的普通预算修复继续成立;F2 的真实 shell reader 接线和 F3 的 off 条件指令已经验证。CI 未作为批准条件;旧讨论与合并资格单独保留。

动机 / Motivation

在受支持 POSIX native 默认开启时运行既有真实工具行为资格验证的维护者。导航曾被误当完整 quota 决策;后续 native required-vision 的 module reader 又绕过 console bridge,inline/off 则收到执行不存在 writeback 命令的无条件指令。当前保留原导航,让模型选择当前 capture、review、工作证据与 writeback,再进入原有动作和结算判据。当前精确 head 的八模块 202 项通过;真实 OS sandbox 内 module reader 到 authored vision、refresh、单次 spend 完成,off 原七次 ordinary 边界和 vision 四十次总边界仍成立。这是内部 qualification host 的可用性修复;不证明真实模型遵循、完整 C1/研究采用、正式发布或净成本下降,也不授予安装、作业、merge 或 dismissal 权限。

改动思路 / Approach

复用共享 QuotaToolContext、现有 reader 归一化和受监督 CLI,五类消费者保留各自的状态机与语义 oracle;不新增通用 runner、Goal 决策 owner 或 sandbox 源码读取权限。本 PR 边界是七个现有 Python testing host/transport 模块及八个对应测试,15 文件 +1112/-128;不是新的产品 capability 或模型实验。只让私有判分器读完整 capture 并不能代表模型读过;把完整决策偷偷替换到 stdout、全局关闭 native,或放开 sandbox 源码读取也会改变本题。当前实现保留模型真正收到的导航,再沿同一捕获和原始 staged 命令进入已有 typed owner。

这次采用经验提示中“核验第一个有用结果”的部分:维护者应能完成读取、工作和持久化结算。这里是有实际消费者的内部 provider prerequisite,不需要为此新建前端入口或完成整次 live 研究;没有据此记忆效用或长期收益证明。

具体改动 / Changes

完整审查 head 2e05ed4f6f2e04b6dd3036ac36cbebdaa52322d0,实际 PR merge base c334bbaf196505778149ae4edeefaa013d343259;15 文件 +1112/-128,七个内部实现模块、八个测试。该 head 合入了当前 main;没有把 first-parent 的整段 main 历史算进本 PR,也没有继承旧 head 的通过。

独立规格是固定 3503d823256c02bc531558f4a3bc9ea7c963d6eb 的 Model Behavior Qualification 和 required work context。两份规格在当前 target c334bbaf196505778149ae4edeefaa013d343259 的 blob 均未变化;三个维护者评论、两份历史 review 和三个 inline finding 已完整读取。

原合同与本次映射 当前结果
Actual-Default Scenario Portfolio:五类真实工具路径、各自 oracle、原身份与结算次序 implemented;当前 CLI/File/OS sandbox 验证,模型 transport 为合成
Machine default:支持的 native 默认与显式 off 分开,原预算保留 implemented;off 普通调用 7,native 三次 reader 单列,required-vision 总数仍 40
Current captured observation:当前来源、摘要、按需读取与模型输入分开 implemented;full/delta/inline、错误来源和 staged 次序反例保留;不预取旧 baseline

关键代码讲解

  1. QuotaToolContext 复用现有 reference/capture 校验,只供 host 的私有语义判分读取当前 recovery;output 仍是原导航。其 read 将模型工具调用绑定到同一 physical capture 和完整 digest。selected Todo、terminal、scoped successor、capability repair 与 vision 的 replay/readback 都复用它,各自的动作、拒绝和状态 oracle 保留。
  2. _handle_replan_context_read 接受当前捕获给出的原始 review/writeback 命令,保持 capture → review → 工作证据 → writeback → typed action。错误来源/摘要、跳过、重复或乱序继续拒绝;successor 支持既有 immediate-end 和现行 settle-original-Turn 形状,原 obligation 和回读仍受检查。
  3. _run_qualification_loop 在 OS shell 前仅归一化单条只读 python -m ... quota replan-view。受监督 invoke 以完整 argv 反查原投影命令,再执行原 source/hash/stage 校验。包括原 OS sandbox 在内的七项相邻 adapter blob 在97ad与当前 head 相同,没有开放任意 Python 或 checkout 读取。
  4. qualify 的条件指令 只有当前 action packet 提供 writeback command 时才要求执行,否则使用 inline contract。actor、先读工作证据、精确目标、一次 typed action、停止和结算义务仍在;F1 的 _tool_call_budget_exhausted 继续把普通调用与 native reads 分开。

原 finding 的独立核验

  • F1:当前 off 八步反例在第七次 ordinary 后耗尽,第八次 refresh 未请求;native 三次读取不能变成额外普通操作。required-vision 的 on/off 正反例都把 reader 计入原四十次,最终 spend 缺失不能合格。regular live entrypoint 原本就使用 required_vision=True,未把 narrow 的 reader allowance 加到该科学场景。
  • F2:相同最终回归在不可变97ad真实 sandbox 内复现 shell_nonzero/源码读取 PermissionError,没有 review/writeback stage。当前相同用例走完整 module reader、实际工作、authored vision、refresh 和单次 spend;错误 source hash、decision file 和其他 module 仍失败。
  • F3:旧97ad实际 off packet 只有 writeback_contract、没有 writeback,却有无条件执行后者的 system sentence;scripted action 本身仍可成功,因此不能靠它冒充提示词兼容。当前实际 on/off 输入与条件逐条核对,直接动作和原预算均通过。

最终相同三项回归在97ad为3 failed,当前三项包含在 202 passed/0 failed/0 skipped 中。旧三项中两项是条件文本断言,不是三次模型行为失败;另行观察实际 prompt/packet 和 OS 错误补足了语义依据。97ad是历史 parent,并非所有 main 集成变化均冻结的因果实验;七项相邻 transport/sandbox blob 的相同范围已明确核对。

对主干的风险 / Risks

主要反例是通过扩大执行权限或预算“修好”资格验证。当前 exact argv/source/hash 与 staged state 检查、真实 OS 保护输入/权威状态/private data/网络、CLI shadow、超时杀进程组、非零退出、七次/四十次耗尽和单次 spend 都继续受测。私有 oracle 读取仍不等于模型已读;scripted transport 也不等于真实模型采用。

PASS:当前八模块 202 项,Ruff 全15路径、编译、配置 mypy 17 目标、diff、RFC bilingual、diff-scoped semantic advisory 和公开边界扫描;standard premerge 的 6 direct、10 catalog、8 risk 命令检查全部通过,0 command failure。新增 read trace/错误码属于现有内部 qualification 边界,未新建通用状态 owner;静态 advisory 的零候选不证明所有动态语义均被分析。

HOLD:带当前 Goal 策略的 aggregate premerge 仍退出1,唯一 policy failure 是当前 base/diff 的 quality_stale_receipt,merge_gate_passed=false;旧 CQR 没有被改写为通过。作者报告的通过与本轮结果分别保留,不能互相替代;本轮未独立核验作者原始执行环境。CI 未查询、轮询或等待,状态与原因保持未知。三个旧 review thread 当前仍 unresolved;本次逐项说明修复依据,未改写、resolve 或 dismiss 原讨论,亦未合并。

同域重构已应用于共享当前 capture adapter 和既有 read-only argv helper;保留场景专有 oracle。更大的 host 抽取会扩大审阅面,当前没有必要。代码增长有成本,但五个真实消费者和原有边界需要一起接通;没有为通过而删除 integrated coverage。

我的整体评价 / Verdict

这个有界维护成果已经达到请求。long_horizon=preserved:原身份、预算、失败和独立结算规则保留;user_experience=improved:维护者现在能够沿受支持 native 默认完成 qualification,off 也不会被要求执行不存在的命令。检查了内部真实 CLI、模型工具消息、OS 隔离 shell 与持久状态读回;没有页面、布局或其他渲染呈现变化,视觉审查不适用。真实模型理解/遵循、安装版采用、完整 live portfolio/C1、研究成果及完整费用净益未在本轮验证;没有发起模型网络调用或新研究。

复用共享 QuotaToolContext、现有 reader 归一化和受监督 CLI,五类消费者保留各自的状态机与语义 oracle;不新增通用 runner、Goal 决策 owner 或 sandbox 源码读取权限。本 PR 边界是七个现有 Python testing host/transport 模块及八个对应测试,15 文件 +1112/-128;不是新的产品 capability 或模型实验。APPROVE 只覆盖当前源代码提案与已经验证的工具路径;真实模型、完整研究资格、旧讨论收口、当前 CQR 和独立维护者合并门禁继续分开。没有为未知 CI 拒绝一个已有决定性覆盖的修复,也没有把 source checks 或这次批准记成正式发布成功。

English verdict: APPROVE at 2e05ed4f6f2e04b6dd3036ac36cbebdaa52322d0. F1 remains bounded; the native module-reader bridge and conditional inline/off instruction now pass real-CLI and OS-isolated fixture validation. CI, live-model qualification, thread closeout and merge gates remain separate.

@huangruiteng
huangruiteng merged commit 0610f69 into main Nov 2, 2026
29 of 39 checks passed
@huangruiteng
huangruiteng deleted the codex/native-context-consumers-release220-20261101 branch November 2, 2026 03:28
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