Skip to content

Reuse check receipts after a final checkout check - #1784

Closed
eowca wants to merge 4 commits into
mainfrom
lean178/1526-final-receipt-reuse
Closed

eowca wants to merge 4 commits into
mainfrom
lean178/1526-final-receipt-reuse

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #1792. The partial-wildcard optimization was rejected under the fail-closed ruling.

Closes #1526

Supersedes #1737

loopzero check reuses an eligible passing receipt before starting stages, using the existing readiness validator and task-state lock. Immediately before accepting reuse, it rereads cleanliness and HEAD. A mismatch runs the normal check path. Git moving HEAD after that final check is equally possible during a freshly run check, so reuse does not add it.

Focused cases exercise the passing fast path, a tracked edit during lock acquisition, a same-tree HEAD change after validation, changed declared input bytes, and tracked receipt paths. A partial wildcard or unmatched declared pattern leaves the stage ineligible for reuse. The regression suite exercises both. The size gate reports 12 added test lines and 64 lines of headroom after merging main with #1731.


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

Review

  • primary, codex, 4452eab, request_changes
  • delta, codex, 9aaeb12, request_changes

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

@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 codex on 4452eab9b6f67232c5c95a677bd68a05979f0582, 75.7s: request_changes (0 critical, 2 important, 0 suggestion)

Same-family fallback: independent reviewers failed: claude: not authenticated. Cross-family review is preferred.

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

  • Call 1: requested model gpt-6.2-astra (effort medium); CLI-reported model gpt-6.2-astra (effort medium); configured model gpt-6.2-astra (effort medium)
Raw reviewer output
Native Codex transcript retained in the restricted local review receipt; public evidence is publisher-derived, not backend attestation. Exact raw SHA256: 02744afa8319b7fac0a3f70a958f7663895c53a207c75297c2a7a4357fd5a4f2

Comment thread src/loopzero/sandbox.py Resolved
Comment thread tests/test_cli.py Resolved
eowca and others added 3 commits November 26, 2026 10:55
Co-Authored-By: Codex <noreply@openai.com>
Co-Authored-By: Codex <noreply@openai.com>
Architecture-Review: unchanged; extracting check failure output preserves its behavior and the delivery contract.
Co-Authored-By: Codex <noreply@openai.com>

@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 delta review by codex on 9aaeb122a69ed54281906292f97a6212579bbc1f, 43.7s: request_changes (0 critical, 3 important, 0 suggestion)

Same-family fallback: independent reviewers failed: claude: not authenticated. Cross-family review is preferred.

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

  • Call 1: requested model gpt-6.2-astra (effort medium); CLI-reported model gpt-6.2-astra (effort medium); configured model gpt-6.2-astra (effort medium)
Raw reviewer output
Native Codex transcript retained in the restricted local review receipt; public evidence is publisher-derived, not backend attestation. Exact raw SHA256: 8db046d865db68d74c5dc170ea808d3a9803c5c86bb93d2922dd1767b0e66ef7

Comment thread src/loopzero/sandbox.py Resolved
Comment thread src/loopzero/sandbox.py
paths = tuple(path for group in entries.values() for path in group)
try:
blobs = _input_blobs(config, worktree, tuple(path for paths in entries.values() for path in paths))
blobs = _input_blobs(config, worktree, paths)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

important: Check exclusion pathspecs against the paths they exclude

With (".", ":(exclude)missing.txt"), Git evaluates the exclusion-only probe against the whole tree and returns every tracked file. The new all(...) check therefore accepts an exclusion that matches nothing and reuses the result despite the documented fresh-run rule. Probe the positive form of each exclusion for matches while retaining the original combined pathspecs for the fingerprint.

Comment thread tests/test_sandbox.py
def test_local_check_reuse_tracks_checkout_bytes(git_repo, bwrap_log, fetched_base, cache_check):
@pytest.mark.parametrize("partial_wildcard", [False, True])
def test_local_check_reuse_tracks_checkout_bytes(git_repo, fetched_base, cache_check, monkeypatch, partial_wildcard):
path = git_repo / "README.md"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

important: Restore the fake bwrap fixture for both checkout-byte cases

cache_check calls sandbox.run_checks directly. Removing bwrap_log makes both parameter values depend on a working host Bubblewrap installation. On hosts without bwrap or permission to create its namespaces, the test fails before reaching the receipt assertions. Add bwrap_log back to the test parameters.

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.

Reuse an eligible passing receipt before loopzero check launches stages

1 participant