Skip to content

Fail closed when the delegated check runner changes during execution - #1381

Merged
mergify[bot] merged 2 commits into
mainfrom
lean178/1282-runner-receipt-replacement
Nov 26, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
lean178/1282-runner-receipt-replacement

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Fail closed when the delegated check runner changes during execution

Context and goal

  • Goal: A runner change leaves the operator with a clear rerun instruction and a nonzero check exit.
  • Problem: A check can report PASS even when a runner upgrade prevents it from producing a receipt that ready can use.
  • Context: The local coordinator fingerprints the delegated runner and invalidates the fingerprint if it changes during execution.

Closes #1282

Acceptance

  • A successful delegated stage with missing or changed runner identity yields a nonzero check exit and explains how to rerun from the task worktree with a stable, readable runner.
  • Keep recorded stage results and reject the unverified receipt. A stable rerun restores readiness without automatically retrying stages.

Notes

Supersedes #1287. This branch carries forward the reviewed fix onto current main for a fresh primary review.

Keep coordinator-owned fingerprints and the existing receipt predicate. Preserve stage exit codes so an operator can distinguish execution success from receipt verification.

The offline runner-retarget regression failed before the fix because check returned 0.

Base

Base: 72f087e

Validation

Recorded for 9ebba64bbf9d

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

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

Review

  • primary, claude, d74665f, approve

Architecture-Review: unchanged; the coordinator still owns receipt production and readiness still verifies the fingerprint.
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 d74665f11b4d74887e06a54c0fc1970c29819804, 18.2s: 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)

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

Comment thread src/loopzero/cli.py
print(f"check result discarded: checked HEAD {report.head}, current HEAD {current_head}",
file=sys.stderr)
return 1
if report.ok and report.settings_sha256 is None:

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: Recovery wording duplicates the receipt predicate's message

The new branch checks report.settings_sha256 is None, which is the same test as the receipt predicate in _check_report_problem (cli.py:326). That keeps check and ready consistent: a passing report with no fingerprint is now rejected by both. The problem is that the rerun instructions now live in two places with different wording: here, and the recovery string at cli.py:324. If one is edited later, operators could get conflicting advice. Smallest fix: move the instruction into a shared constant, or build this message from _check_report_problem's output. The branch also fires when the fingerprint was already None before any stage ran (the runner executable couldn't be read at start). The message covers that case because it says "stable, readable", so this is not a bug.

@eowca
eowca marked this pull request as ready for review November 26, 2026 02:37
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as fec91d0 at 02:49 UTC

9 min in the queue, 4 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 02:39 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1420
  • ✅ Merged 02:49 · fec91d0 · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot added the queued label Nov 26, 2026
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit fec91d0 into main Nov 26, 2026
11 checks passed
@eowca
eowca deleted the lean178/1282-runner-receipt-replacement branch November 26, 2026 02:49
@mergify mergify Bot removed the queued label 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.

Report when a runner change prevents a usable check receipt

1 participant