Skip to content

Reuse eligible check receipts only for fully matched inputs - #1792

Closed
eowca wants to merge 1 commit into
mainfrom
lean178/1526-receipt-exclusion
Closed

eowca wants to merge 1 commit into
mainfrom
lean178/1526-receipt-exclusion

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by the Lean178 scope reassessment.

Closes #1526

Supersedes #1784

This carries #1784 onto current main with the two round-two fixes. An exclusion that matches no files leaves the stage unkeyed, and the checkout-byte tests use the offline Bubblewrap stub. Partial wildcards still fail closed as recorded in the review disposition.

Immediately before accepting reuse, loopzero check rereads HEAD and cleanliness. Git moving HEAD after that final check is equally possible during a freshly run check, so reuse does not add it.

Thirty focused tests passed. The size gate passed with +12 test lines and 64 lines of test headroom.


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

Review

  • primary, codex, 5f517af, 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 5f517afd6eceda980f28b625452b42cc20360cbb, 60.0s: 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: cb53d6d1cbac24d5cc5bf67decf128b0e54054379f6da5c0d50c77164212e4ef

Comment thread src/loopzero/sandbox.py
base = _check_base(config, worktree)
return all(
result.input_key is not None and result.input_key == _input_key(config, worktree, result.command, base)
for result in report.results if result.command in config.inputs or "*" in config.inputs

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: Allow same-head receipt reuse with partial wildcard inputs

With inputs = {"*": ("README.md",)}, this filter requires an input key for every command, but _has_inputs prevents _input_key from producing one for any unlisted command. A second check therefore reruns stages even when HEAD, settings, and README.md are unchanged. Record and validate a head-bound key for these commands so the complete receipt can be reused while cross-head stage reuse stays disabled. Cover the unchanged second run alongside the existing checkout-byte change case.

Comment thread tests/test_cli.py
assert "config=commands-sha256:" in out and "environment=unknown" in out
assert [(r["command"], r["exit_code"]) for r in report["results"]] == [
("echo ok", 0), ("test -f README.md", 0)]
@pytest.mark.parametrize("move_head", [False, True])

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: Meet the net-zero test-line requirement

The repository’s size check reports 13,786 test lines against 13,774 at base. The diff adds 11 net lines in tests/test_cli.py and one in tests/test_sandbox.py. Consolidate 12 lines of test setup or assertions while preserving coverage to meet the explicit net-zero requirement.

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