Skip to content

Preserve passing receipts across late check checkpoints - #1379

Closed
eowca wants to merge 4 commits into
mainfrom
lean178/1368-preserve-passing-receipt
Closed

eowca wants to merge 4 commits into
mainfrom
lean178/1368-preserve-passing-receipt

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1368

A checkpoint from an overlapping check keeps the clean passing receipt for the same head and settings. The existing worktree lock covers the comparison and write. Checkpoints still save reusable stages when no pass exists, and completed failures still replace passes.

The offline regression fails without the guard and passes with it. The full slotted loopzero check passed on bcf882e44c12fd8c361a4cbb96349c3265ad30ff.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, bcf882e, approve

Co-Authored-By: Codex <noreply@openai.com>
@eowca
eowca marked this pull request as draft November 26, 2026 02:15

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loopzero primary review by claude on bcf882e44c12fd8c361a4cbb96349c3265ad30ff, 31.6s: approve (0 critical, 0 important, 3 suggestion)

Settings per native call (launch configuration and CLI claims, not backend attestation):

  • Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)

Native Claude output is retained in the restricted local review receipt.

Comment thread src/loopzero/cli.py
if report.head != current_head:
return current_head
saved = _load_report(wt) if checkpoint else None
if (saved is not None and saved.ok and not saved.dirty and saved.head == report.head

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Guard treats any same-head/same-settings pass as authoritative, even if its check list differs

The checks list is not part of settings_fingerprint; the fingerprint only covers execution settings and inputs. Suppose checks.commands changes but the settings do not, at a head that already has a clean pass under the old list. _check_report_problem rejects that old pass for readiness because the command tuple differs. Even so, every checkpoint from the new run is dropped. If the new run is interrupted, its stage progress is lost. Readiness stays correct, so the only cost is reuse. Smallest fix: also require tuple(r.command for r in saved.results) to equal the checkpoint's leading command list, for example by comparing against report.results[:len(saved.results)] commands. Alternatively, pass the configured checks into _save_report and reuse _check_report_problem, so 'what counts as a pass' is not defined in a second place.

Comment thread tests/test_cli.py
assert "Manual validation evidence." in draft


def test_late_checkpoint_preserves_completed_pass(wt, head):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Regression drives the internal helper instead of an actual interrupted overlapping run

The test calls sandbox._checkpoint_success and _save_report by hand. That proves the guard behaves as intended, but nothing covers the cmd_check wiring (checkpoint=True at cli.py:605) or the interruption path, where the final _save_report is never reached. That path is what the acceptance criteria describe. Consider a test that stubs sandbox.run_checks and calls its checkpoint callback after a pass has been saved, then raises (for example KeyboardInterrupt). This would catch a regression where the keyword is dropped from the cmd_check lambda.

Comment thread docs/ARCHITECTURE.md
validation. Runners cannot select stages or mint receipts. Stage admission
for reuse. A checkpoint cannot replace a clean pass for the same head and
settings or satisfy readiness before final worktree validation. Completed
failures still replace passes. Runners cannot select stages or mint receipts. Stage admission

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Unwrapped long line in reflowed paragraph

The edited paragraph leaves 'failures still replace passes. Runners cannot select stages or mint receipts. Stage admission' on one line, much longer than the surrounding wrap width. Reflow the paragraph to match.

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

The full sandboxed check passed and review approved bcf882e. A clean integration with origin/main at 72f087e contains 13,509 test lines against the 13,500 cap. Preserving the approved head while #1352 is open.

eowca and others added 3 commits November 26, 2026 03:25
Architecture-Review: unchanged; same settings and commands retain the current pass.

Co-Authored-By: Codex <noreply@openai.com>
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1415. The revised checkpoint guard also compares the check command list. The delta reviewer refused the change after a base merge, so the replacement can receive a fresh review while this branch retains its reviewed history.

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.

Keep a completed check receipt when an overlapping run writes a checkpoint

1 participant