Skip to content

Resume observing a confirmed Mergify entry after a receipt change - #1854

Merged
mergify[bot] merged 3 commits into
mainfrom
lean178/1639-merge-wait-membership
Nov 26, 2026
Merged

mergify[bot] merged 3 commits into
mainfrom
lean178/1639-merge-wait-membership

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Resume observing a confirmed Mergify entry after a receipt change

Context and goal

  • Context: A PR can already be queued while the local CLI stops accepting the receipt that originally let the PR enter Mergify.
  • Problem: The merge helper refuses admission before it checks live membership, so the builder cannot resume observing that queue entry.
  • Goal: With merge --wait, follow authenticated membership for the selected PR on the configured base and verify the same head at landing.

Closes #1639.

Acceptance

  • A confirmed entry uses the existing exact-head waiter with the remaining deadline, without sending a queue request or writing a confirmation marker.
  • Absent or unverifiable membership must leave the PR unadmitted. Ready and new queue admissions keep their existing gates.
  • Extend the existing offline Mergify resume fixture. No new configuration or durable state.

Notes

  • The three incompatible-receipt cases fail at base c9520ed10e22 without making a membership read. The fix handles confirmed, absent and unverifiable membership through existing transports and exact-head landing checks.

  • Security review scope covers the authenticated vendor lookup and the return into the existing observer with confirmation already true. Admission and its writes remain behind readiness.

  • Source delta +14, tests +15. The earlier Resume a confirmed Mergify entry without readmission #1682 closed without merging. This is a smaller implementation on fresh main.

  • Primary finding aa1fc9a5: a failed vendor lookup could hide the original
    readiness reasons. The read-only branch preserves those reasons and adds a
    membership diagnostic. The offline unverified case asserts both.

  • Merged origin/main at f2276685fd6f after primary review. The size gate
    reports 8,104 source and 13,719 test lines at the repaired head.

Validation

Recorded for 57d39fe15665

  • 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, 07832b4, request_changes
  • delta, claude, 57d39fe, approve

Architecture-Review: unchanged; Existing authenticated membership uses the exact-head follower with unchanged admission gates.
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 07832b4449d25e633440b0ca70b45f1ba523f4ac, 44.3s: 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.

Comment thread src/loopzero/cli.py Resolved
Comment thread src/loopzero/cli.py Outdated
if not readiness.ready:
if (deadline is not None and pr.base_ref == config.base_branch
and mergify.membership(config.repo, pr.number, queue) is not None):
return _wait_for_mergify(config, pr, max(0.0, deadline - time.monotonic()), 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: The observe-only path runs for any non-ready reason, not just a receipt change, and prints nothing about why

The task describes a receipt change. The condition actually covers every readiness.ready == False case, including failing required checks, unresolved blocking findings and draft state. In each case merge --wait now quietly follows the queue and cleans up the worktree after landing. Following an entry Mergify already holds is defensible, since the waiter checks the exact head and no writes happen. But the builder never learns that the local gates are currently failing.

Suggestion: print the _readiness_messages reasons, e.g. as warning: following existing Mergify entry although not ready: ..., before calling _wait_for_mergify. Also add one fixture case with a non-receipt reason, such as a failing check, so this broader scope is tested on purpose.

@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 delta review by claude on 57d39fe15665bfa130be690e383fd2fd9adece37, 17.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: Membership diagnostic is placed after the 'next:' guidance — When _merge_check_hint returns a hint such as ; next: loopzero merge --wait, the error reads not ready to request Mergify: <reasons>; next: loopzero merge --wait; Mergify membership unverified: HTTP 503. The membership diagnostic ends up after the suggested next step, so the next step no longer comes last. The behaviour is correct: the readiness reasons are kept, the PR is not admitted, and no write happens. It would read better with the diagnostic before the hint, for example by collecting unverified = f"; Mergify membership unverified: {exc}" and building ... + unverified + hint. The test only checks for the substrings, so it would still pass. Non-blocking.

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

@eowca
eowca marked this pull request as ready for review November 26, 2026 12:16
@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 44e51dc at 12:22 UTC

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

So far

  • ✅ Entered the queue Thu 26 Nov, 12:16 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1875
  • ✅ Merged 12:22 · 44e51dc · 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 44e51dc into main Nov 26, 2026
19 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/1639-merge-wait-membership branch November 26, 2026 12:24
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.

Resume observing a confirmed Mergify entry after receipt compatibility changes

1 participant