Skip to content

test(checkpoint): preserve prepared native preflight coverage - #8350

Merged
loopx-agent merged 1 commit into
mainfrom
codex/release-checkpoint-fixture-20261108
Nov 8, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/release-checkpoint-fixture-20261108

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

The checkpoint handoff regression fails in both native-context modes before it can check history: its fake guard requires --decision-output-root, while the shipped preflight now prepares a capture with --decision-output-dir. It also expects an immediate projected view where the native host now presents the retained original later.

Update that synthetic transport to use the existing prepared-reference formatter and verify the current contract. All four context/participant combinations retain their history assertions; two corrupt-digest cases prove that a substituted reference is rejected before continuation. No runtime, scoring, execution authority or benchmark workload changes.

Author Declaration

Criterion Disposition Evidence
Preserve the original guard bytes, digest and private file mode Implemented Initial and resumed captures remain distinct and immutable; corrupt references are refused
Defer native presentation without replaying the guard Implemented Prepared flags, original capture reference and one guard per explicit preflight are checked
Defer full history only for a native participant Retained All four existing context/participant combinations remain covered

Scope And Continuation

Complete within this test-fixture scope. The broader 2.3.0 release continues through its existing qualification and publication gates; this PR does not certify that release.

Validation

  • Tested revision: 6469c07491cf6260c6cd94f7ccc9b34dd3df550b.
  • Run state: finished. Inputs: synthetic fixtures.
  • python -m pytest -q benchmark/tests/test_checkpoint_handoff.py benchmark/tests/test_context_delivery.py: 76 passed, 4 skipped. The skips cover Linux writer process groups on macOS.
  • The unchanged test failed in both native-context modes during the release sweep. The updated six-case preflight matrix passes and rejects both injected digest substitutions.
  • CI-scoped Ruff, public-boundary scan and diff hygiene passed. Exact-scope change-quality receipt verified.
  • Standard premerge: 5 direct checks and 10 selected checks completed, zero blocking check failures. Its benchmark-sensitive manual hold remains for independent review. The maintainability ratchet reports inherited metric debt in loopx/extensions/lark/private_conversations.py; premerge classifies it as an advisory outside this one-file diff. The first premerge attempt lacked repository npm dev dependencies; after installing the lockfile dependencies, the vocabulary check passed. No paid model or benchmark experiment was launched.

Frontend / Visual Evidence

UI impact: none; only a synthetic Python regression fixture changes.

Boundary

One test file, signed-off commit, no paired RFC change. No credentials, private state, local paths, raw trajectories or verifier output are included.

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.1-sol, OpenAI, runtime_reported, reasoning_effort=max

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

未发现阻塞问题;结论绑定 6469c07491cf6260c6cd94f7ccc9b34dd3df550b。

动机 / Motivation

维护者在运行 checkpoint handoff 回归时会被过时的假 guard 阻断。同一原生上下文 preflight,旧夹具查找不存在的 --decision-output-root 而失败;新夹具接受已交付的 prepared reference,继续检查原文件和历史边界。四种原组合继续到历史/来源断言,两种被替换的摘要在恢复前拒绝。不认证完整 2.3.0 发布、平台资格、真实模型或长期收益。

改动思路 / Approach

生产 preflight 已经把原始 guard 保存下来,prepared reference 只携带身份和摘要,真正呈现由原生工具调用完成。旧夹具还把输出当作即时 projection,因此只改参数名并不足够。复用已交付的 preparation formatter,独立保留来源与拒绝断言;测试修复不另立运行规则。本 PR 到现有回归夹具为止;完整发布与真实宿主资格由原 owner 继续。没有改动运行时来迎合旧期望,也没有另建一个形状相同的测试入口。

具体改动 / Changes

关键代码讲解

  • test_preflight_defers_history_only_when_capture_will_verify_it 保留 native context 与 native participant 的四种原组合,另外覆盖两种摘要被替换的情况。合成 guard 在原生模式检查 prepared/deferred 标志,并使用产品已有 formatter;非原生模式继续使用原输出路径。后续断言独立检查真实源文件、SHA-256、私有文件权限和原正文,避免仅让 formatter 自证。
  • capture_before_replan 的生产代码在 base/head 完全相同:读回原文件后,先把返回摘要与原字节比较,再调用历史恢复 gate。有效 native participant 才推迟 full-history 检查;其他组合仍要求立即核完整历史。
  • preflight_context_instruction 同样未改,继续让 context-project --initial-read 在实际呈现时运行。两次显式 preflight 各执行一次 guard,保留不同的原始 capture;第二次不能改写第一次的字节。本测试不声称第二次 preflight 是原 guard 的重放。

规范使用改动前 benchmark/README.md,修订 a02be126957953b7a61796e3b99fcfe578eb5174。该文无编号,定位标签 Original quota guard 对应一次原 guard 与原身份恢复,Native retained history 对应完整历史验证边界,Immutable source recovery 对应原字节及替换拒绝;这三项在本夹具范围 implemented。完整 diff 为现有一份测试 +33/-11,产品 preparation、checkpoint 与呈现模块的 Git blob 均与基线一致。

对主干的风险 / Risks

独立 PASS:产品 decision-capture/research-checkpoint 两份测试 106 通过、11 项因未配置显式真实 Host 而跳过;两份目标测试 76 通过;四项 Linux writer process-group 测试在本次 Darwin 环境跳过。旧基线同一原测试为 2 失败 / 2 通过,两个 native case 都因缺少旧参数失败。独立反例把生产摘要比较单独停用后,恰好两种篡改 case 报 DID NOT RAISE ValueError,另外四种通过;原 head 六种均通过。第一次 mutation harness 错误复制了 globals,导致六项一起失败,已保留为无资格结果,修正后的对照才用于结论。

合成 guard、selector 和历史 gate 限定了证明范围:这里验证真实 preflight 的传输、原文件和分支,不证明真实 Codex 历史已经重建。test_context_delivery.py 另经实际 CLI 验证原捕获的只读恢复。Ruff、差异及公开边界扫描通过;标准 premerge 完成 5 项 direct 与 10 项 selected,零阻塞检查失败;benchmark_sensitive 人工 hold 仍在。其 ratchet 的 Lark 模块规模债务被原生门判为 inherited advisory,未改记为修复。移出我创建的工作区日志后,clean plan 的十条命令完全相同,复用原检查。未查询或等待 CI,未执行模型或正式 benchmark 工作负载。

我的整体评价 / Verdict

这是一项完成的回归夹具维修,复用了现有 owner,并用可失败的反例保留了原约束,范围与成本相称。long_horizon 的生产行为 preserved;本 PR 只修复现有 checkpoint 夹具,未改生产路径或呈现。真实宿主、安装版与模型采用未验证;此测试改动不改变页面。没有新增共享 vocabulary、权限或默认策略,local test 参数不授予执行权;完整发布及平台门继续独立判断。

English verdict: APPROVE for the test-fixture repair at 6469c07491cf6260c6cd94f7ccc9b34dd3df550b; release and native-platform qualification remain separate.

@loopx-agent
loopx-agent merged commit 488c7d3 into main Nov 8, 2026
13 of 30 checks passed
@loopx-agent
loopx-agent deleted the codex/release-checkpoint-fixture-20261108 branch November 8, 2026 07:27
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