Repository navigation
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on 9018045bf14da545dedda4ba9ee5f88e6b73110c, 32.7s: request_changes (0 critical, 1 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)
Native Claude output is retained in the restricted local review receipt.
| return True | ||
| try: | ||
| base = _check_base(config, worktree) | ||
| return all(stage.input_key == _input_key(config, worktree, stage.command, base) for stage in keyed) |
There was a problem hiding this comment.
important: Recomputed input key binds the transient HEAVY_SLOT_GRANTED_CORES grant, so ready falsely rejects valid receipts
_hash_inputs hashes _execution_settings(config, base). For local checks that includes environment, and environment includes an inherited HEAVY_SLOT_GRANTED_CORES whenever it is on the allowlist. settings_fingerprint deliberately removes that variable (sandbox.py:256-258, and docs/ARCHITECTURE.md:113 says the receipt excludes it), so ready/merge can accept a receipt recorded under a different worker grant. The new receipt_inputs_match recomputes the full stage key in ready's own environment. Suppose check ran with a heavy slot granted (e.g. HEAVY_SLOT_GRANTED_CORES=2) and ready runs with a different grant or none. Every keyed stage then mismatches and the receipt is rejected with "declared check inputs changed", even though no input byte changed. This contradicts the existing contract asserted in tests/test_sandbox.py:783-787 (test_declared_input_reuse[grant] expects _current_check_report(...) is not None after the grant changes to 4 and after it is removed). That test should now fail, because README.md matches the *.md inputs and so the stages carry keys. Smallest fix: build the comparison from the same settings that the receipt gate already accepts. One way is to factor _hash_inputs so it takes the settings dict, then compare using the grant-stripped settings that settings_fingerprint uses. Since the settings fingerprint already binds the other settings, another option is to compare only the per-path content digests and blob listing against something saved in the receipt. Run the existing grant test as a regression.
| try: | ||
| base = _check_base(config, worktree) | ||
| return all(stage.input_key == _input_key(config, worktree, stage.command, base) for stage in keyed) | ||
| except (SandboxUnavailable, OSError, _proc.ProcTimeout, _proc.ToolMissing): |
There was a problem hiding this comment.
suggestion: Exception set differs from _input_key's, so a ValueError escapes ready/merge
_input_key catches (SandboxUnavailable, _proc.ProcTimeout, OSError, ValueError) and re-raises when base is non-empty, which is always the case for a keyed receipt. receipt_inputs_match catches ToolMissing but not ValueError. Any ValueError from _git or the blob listing would therefore propagate out of _check_report_problem and crash ready/merge instead of returning the rerun instruction. Add ValueError to the caught tuple (or share one tuple constant) so that 'cannot be recomputed' always maps to rejection, as the acceptance criteria require.
|
Closed by Lean ruling on #1296: the fix needs a receipt-format change that is not approved now. Branch kept. |
Match saved check input keys before accepting a receipt
Context and goal
Closes #1296
Acceptance
Base
Base: 5d49e6d
Notes
Reuses the input-key idea from #1440. The comparison is scoped to saved keys so it preserves fresh runs that did not produce a cache key.
Validation
(no
loopzero checkrun recorded)Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review