Skip to content

Show reusable local checks in status - #1316

Closed
eowca wants to merge 2 commits into
mainfrom
lean178/1301-status-receipt
Closed

eowca wants to merge 2 commits into
mainfrom
lean178/1301-status-receipt

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Show reusable local checks in status

Context and goal

  • Goal: Show builders when local checks already passed and let them go directly to opening a PR.
  • Problem: Status tells builders to rerun local checks even when the worktree has a reusable passing receipt. The wall-clock audit counted 22 heavy-slot runs after a green run at the same recorded head, base and command.
  • Context: Readiness already validates the local receipt against the head and effective check settings. Status now uses the same verifier.

Fixes #1301

Acceptance

  • A clean head with a matching successful receipt displays the pass before PR lookup and points to loopzero pr when no PR exists.
  • Missing, partial, failed, stale and fingerprint-mismatched receipts and dirty worktrees cannot show a reusable pass.
  • An open PR shows the local result and the live readiness reasons. Readiness still verifies the local receipt and all remote requirements.

Base

Base: 2ef0b72

Notes

The offline no-PR replay failed on main because the local line was absent at lookup. The focused status suite passes with the fix, covering receipt rejection and pending hosted CI.

Validation

Recorded for 462bb6b991ab (unverified, run loopzero check)

  • 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, f40e445, approve

Architecture-Review: unchanged; status uses readiness's existing receipt verifier without changing any gate.
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 f40e445fdb9b68ee08a631eff0fe50ca5ee67f84, 23.6s: approve (0 critical, 0 important, 2 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
dirty = worktree.is_dirty(wt)
print(f"dirty: {'yes' if dirty else 'no'}")
checked = not dirty and _current_check_report(wt, config, head) is not None
print(f"local checks: {'passed' if checked else 'no reusable pass'}", flush=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.

suggestion: New status label breaks the column alignment

Every other status field uses a 10-character label column, such as dirty: and pr: . The new local checks: label is wider, so its value starts in a different column from the rest of the block. Either use a short label that fits the column, such as checks: passed, or widen the whole block consistently. The tests match on substrings, so they need an update only if the label text changes.

Comment thread src/loopzero/cli.py
print(f"dirty: {'yes' if worktree.is_dirty(wt) else 'no'}")
dirty = worktree.is_dirty(wt)
print(f"dirty: {'yes' if dirty else 'no'}")
checked = not dirty and _current_check_report(wt, config, head) is not 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: Receipt is verified twice when a PR exists

cmd_status calls _current_check_report here. When a PR exists, _readiness calls it again at cli.py:286. Each call reloads checks.json and recomputes sandbox.settings_fingerprint, which can resolve the base revision and hash the runner executable. The result is correct, but the cost doubles. Readiness then reports the local half of its decision as a separate run loopzero check at this head reason, so the two outputs can disagree if the file changes between the calls. This is not blocking. A small follow-up is to let _readiness accept an already-verified report, or to accept the duplicate work explicitly.

@eowca
eowca marked this pull request as ready for review November 26, 2026 02:00
@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

❌ Left the queue · checks fails with this pull request

1 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 02:01 · rule main · triggered by @eowca with the @mergifyio queue command
  • ❌ Checks failed · draft #1360
  • 🚫 Left the queue 02:03 · f40e445

The failure is in this pull request. It failed tested alone on top of main.

Reason

The merge conditions cannot be satisfied due to failing checks

  • checks

Failing checks:

To get back in the queue

  • Push a fix: the pull request is queued again once its queue conditions match.
  • If the failure is a flake, comment @mergifyio queue to queue it again as it is.

Merge conditions not met when it left the queue

  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-neutral = checks
    • check-skipped = checks
    • check-success = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility
    • check-success = Loop-zero Eligibility
1 merge condition met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required

Times in UTC · dashboard · how the merge queue works

@mergify mergify Bot removed the dequeued label Nov 26, 2026
@eowca eowca closed this Nov 26, 2026
@eowca eowca reopened this Nov 26, 2026
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Owner queue route for 462bb6b991ab: the local receipt guard rejects the returned remote receipt because it lacks the settings fingerprint. The heavy-slot check passed every stage at this head. Required hosted checks are green, and the eligible review covers the clean merge of main.

@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

🚫 Left the queue · conflict with base branch

6 min in the queue, with no time running CI.

So far

Reason

The pull request conflicts with main

Conflicting file: tests/test_cli.py

Before this, the pull request was held in the queue behind 2 pull requests ahead of it.

To get back in the queue

  • You should update or rebase your pull request. A pull request in a stack is updated by rebasing the stack onto the branch it conflicts with. A pull request queued by a rule comes back to the queue once updated, as long as the rule still matches.
  • If it was queued with a command, update it, then comment @mergifyio queue to queue it again.

Times in UTC · dashboard · how the merge queue works

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1423. Main changed the status-test fixtures while this PR was queued. The replacement preserves the status fix and accounts for the additional output line in the signal test. It carries #1301 through a fresh review.

@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show reusable local checks in loopzero status before GitHub lookup

1 participant