Skip to content

Reject check receipts when declared inputs cannot be verified - #1392

Closed
eowca wants to merge 2 commits into
mainfrom
lean178/1296-verify-stage-keys
Closed

eowca wants to merge 2 commits into
mainfrom
lean178/1296-verify-stage-keys

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Reject check receipts when declared inputs cannot be verified

Context and goal

  • Goal: Make readiness and merge require a fresh check when the bytes of a declared input change.
  • Problem: Git can rewrite LF to CRLF while keeping the head unchanged and the worktree clean. The old passing receipt remains accepted even when a fresh check would fail.
  • Context: The check runner already stores stage input keys. Recompute those keys during receipt validation and refuse mismatches or unavailable keys.

Closes #1296. Supersedes #1308.

Acceptance

  • An unchanged declared input still passes readiness.
  • A clean LF-to-CRLF checkout at the same head blocks both ready and merge on the older receipt, and a fresh check fails.
  • A declared stage without a verifiable key blocks readiness and gives actionable recovery guidance.
  • Reuse the existing input key and receipt fields.

Notes

  • This replaces the prior review rounds with the fail-closed repair from d4b03c01, applied to current main at 72f087e.
  • The receipt must still match the head, check commands and settings. An absent stage key cannot establish that the declared bytes are unchanged.

Validation

(no loopzero check run recorded)


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

Review

  • primary, claude, 6dded7a, approve

Architecture-Review: unchanged; readiness uses the existing head-bound receipt and stage keys, with an actionable refusal for unverifiable inputs.
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 claude on 6dded7a45f84d8206577cf6deed7b16736f3df8b, 34.9s: approve (0 critical, 0 important, 1 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)

Findings without a file location:

  • suggestion: Unkeyable declared stages pass check but can never become ready — run_checks computes key = _input_key(...). If that returns None, for example because "*" = ["."] selects a tracked symlink, or because of E2BIG or a missing base, the stage still runs and the receipt is saved with exit 0. Then receipt_inputs_match rejects every ready and merge permanently. The task intends this fail-closed result, and the readiness message gives recovery guidance. However, the user learns about it only after a passing check, and running check again can never clear it. Smallest fix: when a keyed stage gets a None key during check, print a warning to stderr. It could reuse the same recovery text as _check_report_problem, so the problem shows up at check time. Optionally, have _check_report_problem tell "changed" apart from "unavailable". At the moment both share one message, and "run loopzero check at this head" can't fix the unavailable case.

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

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1440. Main added a regression at the same insertion point, so this head could no longer be integrated with inherited approval. #1440 carries both tests and the documented fail-closed guidance, passed its full slotted check, and received delta approval.

@eowca eowca closed this Nov 26, 2026
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.

Reject saved check passes when declared input bytes change

1 participant