Skip to content

test(turn): verify original Host evidence across context modes - #7461

Merged
loopx-agent merged 1 commit into
mainfrom
codex/dsh-context-source-oracle-20261027
Oct 27, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/dsh-context-source-oracle-20261027

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

现有 DSH 集成测试把能力上下文的 off / inline 模式误当成整个 Turn 都不需要原始证据路径。Host 已在 4d2285d31 保留普通 Turn 的证据路由,这四项旧断言仍失败,并阻塞相关验收。

本 PR 将已有的原始 capture 字节、Goal/Agent/Turn 身份和 typed source digest 检查用于全部模式;删除签名 required reads 时,每种模式都必须在 provider 调用前拒绝。能力关闭态仍无 agent_context,内联态仍逐字等于完整来源,历史引用态仍校验原内容哈希。

  • Basis: reproduced failure of tests/control_plane/test_turn_host_context_delivery.py on immutable main 71057d44f.
  • Before → after: 同一完整模块在基线为 4 failed / 4 passed,本次 head 为 8 passed;生产代码没有改动。
  • Intended base: loopx-project/loopx:main.

Author Declaration

  • Written by: model_agent; OpenAI Codex (exact model identifier unavailable in this runtime).
  • Specification: docs/reference/protocols/turn-envelope-v0.md and loopx/control_plane/turn_driver/host_candidate.py at 71057d44f.
Criterion Disposition Path / evidence
原观察的证据路由与源签名必须保留,不重新准入 implemented 全部六种 mode/provider 组合执行收到的原 capture reader,逐字比较原始决策并核对 Goal/Agent/Turn 和源摘要
能力 off / inline / 历史引用保持各自语义 implemented 保留原上下文缺省、完整内联、历史内容哈希及原有篡改拒绝断言
签名必读项不能在 Host 前被删去 implemented 六种组合均删除 required_reads,验证拒绝且 provider 输入、capture 和 runtime 字节不变

Scope And Continuation

本测试修复可独立评审和回滚。将重复的证据检查提升为同一块验证,无需新 helper、fixture、配置、协议状态或运行时改动。普通 Turn 与绑定重规划仍走已有真实 CLI/Host 入口。

本批完成测试缺口的修复;自然 App 采用、完整输入及补读成本属于既有融合工作的后续验收。本 PR 不据此宣称整体融合完成或成本收益。旧版本失败记录保持其历史结果。

Validation

  • Tested revision: 66da4926835aedcb44b031ce95f5eb3c4783bd8d.
  • Run state: finished.
  • Input classes: synthetic, public_fixture.
  • Environment: source-checkout Python 3.14.8, Node 24.21.0; canonical File and SQLite 3.53.4 in disposable isolated runtimes. DSH uses the explicit recording runner and invokes no model.
Check kind Result Evidence / limitation
regression_parity passed 原始基线运行准确重现上述四项 off / inline 失败;其他四项通过。修复后整个模块 8 项通过,包含真实 subprocess 边界与签名删除负例。
real_entrypoint / real_backend passed uv run --extra test --frozen python -m pytest -q tests/control_plane/test_turn_host_context_delivery.py: 8 passed, 28.45s;保留两个绑定重规划案例与原始字节不变断言。
static passed 仓库规定范围 Ruff 零问题;配置内 mypy 17 source files 零错误。
static passed 精确单文件 diff 的 CQR cqr_428cfd6ea7f1cc886cb5 已记录并回读 valid;风险式 premerge 的 5 项直接检查通过,catalog 未选额外 smoke。
integration not_run 本地未运行全仓 pytest、远端 CI 或真实模型。远端所需检查和独立评审仍由正常 PR 流程完成;不声称具备合并资格。

Coverage: 本次仅修订已有 Host 集成测试的语义 oracle;完整来源读取、关闭态隔离、篡改拒绝和无重新准入均经过真实 File/SQLite CLI 与 DSH stdio。没有修改 TypeScript、存储实现、前端或权限规则,因此未启动无关实现矩阵。

Frontend / Visual Evidence

UI impact: none. Only a test file changes; screenshots and preview are not applicable.

Type of Change / LoopX Area

  • Test update
  • Host or runtime integration

Shared-authority RFC fixture impact: N/A; production authority and provider routing are unchanged.

Boundary Checklist

  • Diff and PR text contain public synthetic fixtures and aggregate evidence; no private state, credentials, raw traces, internal links or host paths.
  • No maintainer-owned benchmark execution or duplicate work.
  • Scope is the reproduced Host test failure.
  • No paired RFC changed; bilingual diff check passed.
  • UI impact is none.
  • Commit has its DCO sign-off.

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

APPROVE,精确head 66da4926835aedcb44b031ce95f5eb3c4783bd8d。既有测试oracle已按原始来源与签名契约修正,未发现阻塞问题。

动机 / Motivation

维护DSH Host、原始证据传递和能力上下文关闭态隔离的开发者。 Host集成测试误把能力上下文off或inline理解为整个Turn无需原观察的证据路由,因而拒绝当前已签名、可读回的真实Host输入。 已有原capture字节、Goal/Agent/Turn身份与源摘要检查用于全部上下文模式;删掉签名必读项时,每种模式均在provider前拒绝,原输入与runtime字节不变。 仅修订既有测试oracle,不修改Host运行时、权限、上下文开关、模型或UI,也不声称自然模型采用与成本收益。

改动思路 / Approach

把已有完整来源检查提升到模式分支之前,保留off缺省、inline完整内容和历史引用哈希,增加同一签名必读项的独立篡改反例,无新fixture或helper。 能力上下文是否启用,与整个Turn是否需要原始来源是两个条件。来源检查统一放在分支之前,模式分支只检查各自内容。这样不需要重复原capture读取代码,也没有通过删除完整来源或签名断言来消除失败。直接复用当前PR,避免为同一测试再造修复。

具体改动 / Changes

按 71057d44f0d50a3636fcd8796f7c98717ce41742 的 docs/reference/protocols/turn-envelope-v0.md 核对 ORIGINAL-SOURCE 与 SIGNED-READS。test_captured_context_reaches_actual_host_without_readmission在全部六种mode/provider组合中比较收到的action_signature、required_reads和detail_ref;执行真正交给Host的full_decision reader,逐字对照capture并核对Goal/Agent/Turn及TS拥有的源digest。off仍无agent_context,inline仍完整等于来源,历史引用仍校验原context哈希。删掉required_reads和篡改context都必须在provider前拒绝,原prompt/capture/runtime字节不变。两个绑定replan用例也完整保留。精确head的完整模块8项通过、零skip,真实File/SQLite CLI与DSH stdio;当前premerge、定向Ruff、单文件公开边界及CQR通过。

对主干的风险 / Risks

风险在于只比较两个相同的缩减投影,或用删除旧断言掩盖证据丢失;本head用独立的原始文件字节、实际执行的reader和篡改反例补齐这一点。生产Host、权限、上下文开关和状态写入均未改。所有八项真实backend/stdio测试零skip通过。CI按Goal配置未查询,未调用真实模型,也未将合成runner结果记作模型采用证据。本PR修复测试缺口;真实模型采用、完整发布与打包资格仍由统一候选验证。

我的整体评价 / Verdict

这是一处有明确回归来源的既有测试修复;统一检查位置减少重复,保留模式差异和原始证据边界。没有新增一次性smoke或同形测试模块,符合长期可维护的覆盖范围。只修改测试断言,不涉及渲染界面;真实模型采用、完整发布与打包资格仍由统一候选验证。

English verdict: APPROVE 66da4926835aedcb44b031ce95f5eb3c4783bd8d. Original source readback and signed-read rejection are verified across all context modes through real File/SQLite and DSH stdio.8cases and required local checks passed;production behavior is unchanged.

@loopx-agent
loopx-agent merged commit 83ab247 into main Oct 27, 2026
23 of 37 checks passed
@loopx-agent
loopx-agent deleted the codex/dsh-context-source-oracle-20261027 branch October 27, 2026 15:20
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.

1 participant