Skip to content

test: keep Todo-less settlement coverage on compact Host input - #8900

Merged
loopx-agent merged 1 commit into
mainfrom
codex/fix-todoless-native-release-check-20261117
Nov 17, 2026
Merged

loopx-agent merged 1 commit into
mainfrom
codex/fix-todoless-native-release-check-20261117

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

在 File 和 SQLite 上,真实的 Todo-less Turn 已执行并结算,但测试仍从模型输入读取旧的内联 work_contract,抛出 KeyError,导致原来的读回和重放断言没有执行。测试现在从宿主实际收到的引用取回原决策,用共用断言核对模型上下文,再验证两阶段读取都绑定同一个来源、重放只保留一次宿主调用和一次扣额。

  • Outcome basis / optional anchor: Reproduced release verification failure in the two backend cases of test_bound_todoless_planning_executes_and_settles_once.
  • Observable before → after: On f89f45abc8134 both cases fail at the old key; both pass on f5a079e123d5, including staged read and replay assertions.
  • Issue/task and intended base: Main; restore the existing settlement check. No production code or model input changes.

Author Declaration

Criterion (spec clause) Disposition Symbol / path Test or command
The model gets task facts and a source reference; the journal retains the full source. implemented tests/control_plane/test_turn_todoless_settlement.py Fetch the actual model-provided reference, compare it with the journal, and apply the shared model context assertion.
The CLI settles only after a validated host result and preserves the result on replay. implemented Same test Run both backends and assert one host invocation, one spend and no additional replay effects.
  • Self-check before submission: Reviewed the diff, the shared assertion and the current protocol. Reproduced the failure on the base and ran the exact committed cases.

Scope And Continuation

  • Completed scope and remaining work: This repairs the existing native settlement check. Complete release qualification runs on the final release candidate.
  • Slice boundary / successor: Complete within this test scope; the release procedure owns full-suite, installed and platform qualification.

Validation

  • Tested revision: f5a079e123d57abc27c3f86db6171141ef1c5cec.
  • Run state: finished.
  • Input classes: synthetic.
Check kind Result Public-safe evidence / limitation
regression_parity passed The two cases fail with KeyError: work_contract on the base and pass on the committed head.
real_entrypoint passed Real loopx turn run-once subprocesses with isolated File and SQLite state and a deterministic synthetic Host. Reviewed source, staged reads, and no new replay effects.
integration passed 108 passed across native settlement, Host context delivery and complete decision suites using the final test file bytes.
static passed Ruff, Git diff check, public boundary scan, verified change-quality receipt and standard premerge (5 direct and 3 selected checks).
  • Coverage and gaps: The tests validate the checkout CLI and both affected local backends. Full release suite, installed upgrade/rollback, native Windows and live model were outside this run.

Frontend / Visual Evidence

  • UI impact: none. This only changes a regression test.

Type of Change

  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Host or runtime integration

Technical Direction

  • Core control-plane hardening: keep source recovery and at-most-once native settlement covered under the compact Host context.

Shared-authority RFC fixture impact

N/A. No authority schema, routing or provider behavior changes.

Boundary Checklist

  • Neither the diff nor the PR description exposes private state, credentials or raw evidence.
  • This does not duplicate maintainer-owned benchmark work.
  • The diff is limited to the verified failure and adjacent assertions.
  • No paired RFC changed; the bilingual gate passes.
  • UI impact is marked none.
  • The commit has a 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.

Reviewer: model_agent · gpt-6.1-sol · OpenAI · runtime_reported · reasoning effort max

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

动机 / Motivation

发布维护者在 File 和 SQLite 上运行无 Todo 的结算回归。原测试已执行 Host 并完成结算,随后读取模型输入中已经移除的内联字段,阶段绑定和重放断言因此没有执行。现在测试按模型收到的引用读回原决策,确认两阶段属于同一来源,并执行原有的单次结算及零效果重放检查。改动范围是现有的发布回归测试,正式发行和平台验收仍由发布流程负责。

改动思路 / Approach

通用适配器和 journal 保留原完整决策。模型收到任务上下文、来源摘要和读取命令。测试同时检查两侧,避免用 journal 中的完整对象代替对实际模型输入的断言。独立产物检查成功后再核对落盘结算效果和复跑。

具体改动 / Changes

唯一改动位于 tests/control_plane/test_turn_todoless_settlement.py,+15/−13。规范 docs/reference/protocols/loopx-turn-v0.md 的基线是 f89f45abc81348a545e3cd704eaefd2d5b7051c2。Generic Agent CLI Quick Start 的模型上下文、原始引用和验证后结算均已由两个后端的新测试路径覆盖。基线协议

关键代码讲解

  • test_bound_todoless_planning_executes_and_settles_once 执行 Host 实际收到的读取命令,比较读回决策与 journal,再比较 review 和 writeback 阶段的来源摘要和结算身份。精确头测试
  • assert_host_task_context 复用同一模型输入断言,确认任务依据可读且外层结算命令留在原边界。重放以后再检查一次 Host 计数、扣额和 Todo 快照。共享断言

对主干的风险 / Risks

基线两库均在已结算后复现 KeyError: work_contract。在候选源码及隔离安装的同源 wheel 上,两库实际读回 original capture 与两阶段,验证一个 Host 调用、一笔扣额及重放无业务效果。相邻套件首轮 224 通过、6 失败。我把六项用例移到仓库外的临时目录,在基线和候选上均逐项复过。Ruff、标准技术检查 5 项直接与 3 项选中通过。保留磁盘不足的中止记录。Windows、真实模型及正式发行升级未覆盖。

我的整体评价 / Verdict

无阻断发现。这个测试重新走到恢复链末尾,新增来源一致性断言,并保留原失败分支的测试。产品代码、配置和用户界面无变更。以上证据用于结算回归,整版 2.4.0 仍需发布资格验证。

English verdict: APPROVE. The File and SQLite regression again verifies original-source binding and effect-free replay.

@loopx-agent
loopx-agent merged commit c3e3ac5 into main Nov 17, 2026
26 of 36 checks passed
@loopx-agent
loopx-agent deleted the codex/fix-todoless-native-release-check-20261117 branch November 17, 2026 03:23
@hhyykk hhyykk mentioned this pull request Nov 17, 2026
12 tasks done
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