Skip to content

Cover both recovery and refusal on original Turn reentry - #9332

Open
loopx-agent wants to merge 2 commits into
mainfrom
codex/antigravity-release-check-20261123T160202
Open

loopx-agent wants to merge 2 commits into
mainfrom
codex/antigravity-release-check-20261123T160202

Conversation

@loopx-agent

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

Copy link
Copy Markdown
Collaborator

Original Turn recovery after lease replacement

Two regression suites on main still expected an identity conflict when a host retried the original Turn, with the Todo either specified or inferred from its receipt. With a provable change of lease generation, the guard introduced by #9304 can already identify the interrupted Turn. It returns a recovery decision that prohibits normal work and quota spend. #9313 added assertions for the conflict fallback. #9314 preserved time precision in the lease evidence.

This change checks both outcomes against the public CLI. The modern receipt identifies the original Turn and offers its administrative closeout. For the historical case, the fixture uses the earlier writer's key-digest and version fields at admission. The current reader cannot prove generation order from that receipt and refuses requalification. Both cases compare durable state before and after the guard. The existing dry-run, settlement, replay, and next-Turn checks still run.

Author and scope

Validation

  • Tested revision: f7794cb
  • Run state: finished
  • Input classes: synthetic, public_fixture
Check kind Result Evidence
Regression parity passed At base 49881d5, the original guard test failed on both legacy File and SQLite projects because it returned a recovery decision. Both source-profile controls passed.
Real entrypoint and backend passed 120 tests passed across the execution-loss CLI, quota authority settlement journey and task-lease worktree suites, including the new historical-receipt refusals on both providers. Isolated provider stores, real public parser, persisted receipts and lease transitions.
Integration passed An additional 18 installed-module tests passed, including provenance, spend commit/replay, foreign effect identity and replacement or renewed lease proofs. Two provider variants previously failed on the outdated explicit-Todo guard expectation.
Static passed Ruff, bilingual diff, diff hygiene, Python compilation and the standard diff-selected premerge gate passed. Six additional diff-selected canaries passed.

The historical fixture exercises current reader compatibility with the earlier receipt format. It does not execute a historical binary. Production data and external services were outside the test.

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.2-astra · OpenAI · runtime_reported · xhigh

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

动机 / Motivation

发布维护者在工作进程换租后,需要知道旧任务能否继续,以及是否会重复扣额。主干在可证换租时已经给出免扣额恢复指令,两项测试仍将成功发现恢复判为失败。每次集成都需重新判断这两条红灯是否代表重复执行。修订后的测试分别验证可证明换租时进入恢复、缺少历史代数时拒绝重入。本次只修正测试与历史格式的覆盖,已安装程序的执行逻辑保持原样。

改动思路 / Approach

要区分两种原回执。带代数的回执可以和当前 File 或 SQLite 租约一起证明换代,系统给出免扣额的关闭路径。早期回执只保存键摘要和版本,当前读者必须拒绝将替代租约绑定到原轮次。两种测试都通过公开命令进入真实的回执与存储逻辑。

具体改动 / Changes

有代数的用例省略 Todo 查询,检查恢复指向原轮次,普通交付和扣额标志均关闭。数据库、任务状态和执行历史在发现恢复前后完全一致。历史用例只在生成原回执时使用早期序列化格式,其后恢复当前读取器,检查身份冲突、原结算身份和持久状态。原测试最后实际执行预演、结算及重放。

验收项 original-recovery 覆盖原轮次发现及免扣额关闭,proof-required 覆盖缺证时拒绝重入。依据为 docs/quota-allocation.md 的修订 49881d5。被评提交 8fec422。主干可复现两项失败,两项同源对照通过;此提交的恢复与租约测试 45 项通过,邻近能力事实 20 项通过。标准预合并通过五项直接检查,未选择额外目录测试。

对主干的风险 / Risks

最容易遗漏的情况是旧格式夹具在重入时仍生效,造成伪阳性。这里在重入前退出替换范围并读回原字段。覆盖限定于 File、SQLite 和历史写入格式;未执行旧版本二进制。生产实现与发行物均无改动。

我的整体评价 / Verdict

只改命令行回归测试,实际入口和用户界面均沿用现有实现。没有界面变更。保留两种回执的正反对照有发行价值,近期相关修订分别处理诊断、重入和时钟精度。未发现阻塞项。此为该提交的作者评审,合并权限与独立批准另行核对。

English verdict: APPROVE. The tests distinguish recoverable modern receipts from historical receipts that must stay fenced.

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.2-astra · OpenAI · runtime_reported · xhigh

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

动机 / Motivation

宿主集成维护者需要判断原轮次在换租后还能否交付。无论显式指定 Todo,还是从回执推导 Todo,都要能发现原轮次的恢复路径。两个回归套件仍期待查询失败,遮住了真正该验证的写入权限。普通写回收到替代租约的有效键和版本仍被拒绝,原事件、租约代数及零扣额状态可回读。改动限于两个既有回归套件,运行时代码和发行物沿用原版本。

改动思路 / Approach

分别通过传入 Todo 和从原回执推导 Todo 的入口查询恢复。对可证明换代的回执,两个入口均允许发现旧轮次的行政收尾,并关闭普通交付及扣额。早期回执只保留键摘要和版本时,继续验证原身份冲突。

具体改动 / Changes

在显式选择的路径中,实际把替代租约的键和版本传给普通写回命令。File 和 SQLite 均明确拒绝,日志逐字节一致,原回执的事件、代数、版本与零扣额状态保持可读。历史用例只在最初写入回执时替换序列化,随后恢复正常读取器。

验收项 discovery 覆盖恢复发现,fence 覆盖写回拒绝和早期回执的身份冲突。依据为 docs/quota-allocation.md 在 49881d5 的原轮次恢复约定。被评提交为 f7794cb。主干语义下,安装路径原有两项显式选择用例失败。修订后安装版本的结算及身份验证 18 项、源码三个完整套件 120 项通过。标准预合并通过五项直接检查和六项选中的 canary。

对主干的风险 / Risks

只检查恢复标志会漏掉写入方错误接受替代租约的情况,新增的实际写回覆盖了这一反例。旧格式兼容通过序列化边界验证,历史二进制与 PostgreSQL 未实测。

我的整体评价 / Verdict

两处测试分别覆盖了宿主使用的入口,修改范围与风险相符。未发现阻塞项。此结论属于作者对该提交的评审。

English verdict: APPROVE. The tests cover original-Turn recovery and reject an ordinary write using replacement lease authority.

This branch has not been deployed

No deployments
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