Skip to content

test(checkpoint): initialize canonical source before its first read - #7513

Merged
huangruiteng merged 1 commit into
mainfrom
codex/checkpoint-canonical-fixture-20261028
Oct 27, 2026
Merged

huangruiteng merged 1 commit into
mainfrom
codex/checkpoint-canonical-fixture-20261028

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

The full checkpoint source qualification reads Todos before creating canonical authority. Current main correctly rejects that read with canonical_authority_required, preventing the native capture journey from starting. Initialize the disposable source with the existing initialize_canonical_source_fixture helper first. The same real native source test then passes; SQLite, hard-lease semantics and all capture/continuation assertions remain intact.

The reproduced failure is the outcome basis. Intended base: loopx-project/loopx:main, original author baseline fff09ead9b17190d9cc8385f0c4da70669a4f272. The proposal is now rebased onto 15471f8e832d7fb5893539fa053170ea233de5a7 at dd8087c6455b84899029373d916de5085a181aa1; range-diff confirms the fixture patch is unchanged.

Author Declaration

  • Written by: model_agent, OpenAI GPT-6 (Codex).
  • Specification: no written specification; the reproduced failure stated in this PR is the basis. The source-authoring contract is documented by _write_fixture in tests/control_plane/test_quota_settlement_cli.py at the author baseline.
Criterion Disposition Owning path Validation
Create disposable canonical authority before its first ordinary read implemented benchmark/tests/test_native_checkpoint_handoff.py Actual Linux source test and canonical CLI setup
Preserve existing native capture, execution and continuation assertions implemented Same test; existing canonical fixture helper Full native source test, without assertion changes

Scope And Continuation

Complete within the fixture-initialization scope. This reuses the existing test helper and changes no production authority, runner, scoring, budget or UI behavior. No new vocabulary or helper is added. Broader qualification also completed: the fresh source, ordinary receiver, stride receiver, automatic recapture, another receiver and benchmark-independent Core journey all passed. This is engineering qualification with synthetic inference and grading.

Validation

  • Full joint qualification revision: 568b5a8df216268b9af99f53fbc4ef1fb5855183.
  • Rebased revision: dd8087c6455b84899029373d916de5085a181aa1. Real canonical fixture initialization, first ordinary SQLite read and original task execution acquisition passed again; compile, whitespace and bilingual checks passed. The six-stage joint run was not repeated after this rebase; its result remains bound to the earlier tested revision. New-head hosted CI and review remain pending.
  • Run state: finished.
  • Input classes: synthetic, public_fixture.
Check kind Result Public-safe evidence / limitation
regression_parity passed Unchanged fixture failed before capture on current authority behavior. Corrected source test: 1 passed, no skips, using native CLI 0.162.1 in Linux with deterministic loopback responses.
real_entrypoint passed Disposable source's real CLI reads canonical SQLite without legacy fallback, then acquires its original task execution.
static passed Ruff, whitespace, compile and bilingual diff checks. Premerge executed 5 direct checks and 10 selected canaries with no check failures.
manual blocked Premerge retains the benchmark-sensitive maintainer-review hold; no merge readiness or authority is claimed.
integration passed benchmark/tests/qualify_checkpoint_joint.py: 6 actual tests passed with no skips, including a newly created full source point, fresh ordinary/stride receivers, automatic recapture, another receiver performing work, and the benchmark-independent Core journey. Clean source and exact provider/binary pins were retained.

The original failed attempts are retained privately. No raw logs, checkpoint payloads, credentials or local operating context are published. These checks qualify engineering behavior within their stated scope, not scientific outcomes or cost savings. The receipt retains research_point_qualified=false; non-finite native reports and differential-context treatment are outside this qualification.

Frontend / Visual Evidence

UI impact: none; only disposable qualification setup changes. Screenshots and preview are not applicable.

Type And Area

Test update; benchmark boundary and native Host integration. Shared-authority RFC fixture impact: N/A; no migration, promotion or production provider behavior changes.

Boundary Checklist

  • Diff and public description contain no private state, credentials, raw traces, internal links or local paths.
  • No duplicate maintainer-owned benchmark jobs or scientific evaluations launched.
  • Scope is the reproduced qualification failure.
  • No paired RFC changed; bilingual diff check passed.
  • UI impact is none.
  • Commit includes a DCO sign-off.

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent
loopx-agent force-pushed the codex/checkpoint-canonical-fixture-20261028 branch from 568b5a8 to dd8087c Compare October 27, 2026 18:34

@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)

精确 head:dd8087c6455b84899029373d916de5085a181aa1;实际 base:15471f8e832d7fb5893539fa053170ea233de5a7。无阻塞发现,APPROVE 仅针对这项测试初始化修复。

动机 / Motivation

同一原生 checkpoint 资格测试的维护者,在创建尚未迁移的合成 Goal 后开始读取任务。修改前,测试在建立 canonical provider 前执行普通 Todo 读取,立即被拒绝,尚未进入实际 worker;修改后先完成一次夹具来源初始化,再读取 SQLite 并取得原任务执行租约。独立重放新 base/head 的实际 CLI 初始化段:Explore off 与 planning 两种模式均由 base 拒绝变为 head 成功,任务身份、状态、SQLite 与 hard lease 保留。本次只修测试的来源初始化顺序,不改变生产读取、runner、评分、预算或界面,也不证明研究收益。 原测试的确定性前置失败会挡住后续回归检查,因此修复有独立维护价值;没有必要为了恢复这条测试而放松生产来源校验。

改动思路 / Approach

先由原夹具最终化 authored source,即完成测试输入编写并建立规范存储,再进入普通读取与执行。现成 helper 已负责完整任务解析、原 typed owner 和 fence,原测试不应先用普通读取绕一个尚不存在的 provider。同域最小修复复用已有 source initializer;不把生产 canonical 拒绝改成可选策略,也不让测试新造第二个 authority。本 PR 只改变 disposable test 初始化顺序;原生 capture/receiver 科学资格及合并权限分别保留。

保持 SQLite 与 hard lease(独占任务执行租约)的显式参数,随后沿原入口 acquire 和 configure-goal。比较了不修改、删除读取/约束、复刻 parser 和直接复用现成 helper:最后一种既恢复实际 setup,也删除手工 projection 装配,没有引入新的业务决策或持久状态。流程只有一次次序修正,正文已能解释,无需附未经渲染核验的流程图。

具体改动 / Changes

全 PR 一个测试文件 +5/-7。没有单独书面规格或可映射的正式 criterion id;验收基础是可复现失败及不可变 base 15471f8e832d7fb5893539fa053170ea233de5a7 中 _write_fixture 的 docstring:源编写后,普通读写前必须初始化 canonical authority。它说明现有前置条件,不是本补丁新增的生产约束。

关键代码讲解

  • test_actual_worker_captures_pending_replan_before_native_model:删去初始化前的 todo list、低层 initializer import 和手工 shadow projection;在 line410 直接调用现成 source initializer,仍传 provider="sqlite" 与 handoff_mode="hard_lease"。原任务 acquire、replan 阈值6、Explore off/planning 两分支保持。
  • initialize_canonical_source_fixture:定义未改;在源编写阶段读取完整 authored todos,再经原 builder 和真实 TS authority/fence 写入规范 provider。这不是恢复普通读取的 legacy fallback。后续任务变化仍由原 canonical writer 负责。

六次自然 work wake、capture 在第七次决策之前、原 session/Turn 身份、重复 spend 不再 debit、stride grow 后实际保留7/8的断言逐条保持;没有把 setup 成功替代这些断言。rebase 从旧 568b 更新到当前 dd808 后,我重新读了完整 diff;range-diff 的 patch 相等,相关 worker/source fixture/CLI fixture 的依赖也未变,并且重跑了新 base/head 的实际 setup、拒绝反例和 premerge。

对主干的风险 / Risks

最强风险是错误来源或 lease 模式让后段在假状态上通过。我方重放执行原测试 AST 中所有已修改 setup,使用真实 CLI/TS SQLite,在进入 real_native_source 前明确结束;另行读取实际 Todo 和 task lease,并与独立源声明比对。新 base 两模式都在第一次普通读取被拒绝;当前 head 两模式都保留全部任务身份/状态、SQLite/no fallback、原 hard-lease owner 和阈值6。新 head 另建未初始化源仍 exit1,完整错误/恢复字段与 base 相同且源字节不变,因此没有靠放松 guard 恢复测试。

独立检查 结果与边界
新 base/head 同输入 setup,off/planning PASS:base 两种均拒绝,head 两种实际规范读回和原任务租约通过
当前 head 未初始化负例 PASS:预期拒绝,完整 recovery/error 与 base 相同,无 legacy fallback
标准 premerge 与 Ruff PASS:5 direct + 10 selected 自动检查无失败/skip,Ruff通过
premerge 总门 HOLD:原命令 exit1 为 benchmark_sensitive 人工审查门,不能称为 merge-ready
完整 Linux native/joint旅程 UNVERIFIED:本评审未执行;作者六阶段结果绑定旧568b,不能称为dd808独验

本 PR 是既有真实消费者的 coverage-only 维护,生产代码无变更。没有新增公共协议、权限或状态分类,复用现有词汇;同域简化已经是删掉重复 builder,无需另抽框架。完整 native 旅程、安装和科学资格应按其原环境验收,不能从本次初始化读回推导。未查询、轮询或等待 CI。

我的整体评价 / Verdict

对当前夹具初始化任务,交付判断是 goal_achieved;long_horizon=preserved,user_experience=preserved。实际生产调度、长期结算和用户操作路径未改变;我方证据证明该 setup 增量及拒绝边界,不证明模型收益或长程净效率。检查的唯一改动路径 benchmark/tests/test_native_checkpoint_handoff.py 只改变测试初始化,没有 rendered presentation 变化,视觉审查不适用。无界面变更的未验证范围;完整 Linux native capture 与 receiver 旅程未由本评审重验。

无阻塞发现。源码变化与已展示的问题相称,现成 owner 足够且已复用,完整下游断言原样保留;最强未验项和 benchmark 人工门如上保留。该 COMMENTED 是 author-owned 账号限制下的批准结论,不是正式 self-approval、合并授权或独立完整 native 科学认证。

English verdict: APPROVE dd8087c6455b84899029373d916de5085a181aa1 for the fixture-initialization fix. Real CLI setup and fail-closed readback pass; full Linux native qualification and the maintainer merge hold remain separate.

@huangruiteng
huangruiteng merged commit 702633b into main Oct 27, 2026
6 of 7 checks passed
@huangruiteng
huangruiteng deleted the codex/checkpoint-canonical-fixture-20261028 branch October 27, 2026 18:50
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