Skip to content

Honor merge-authority holds in hosted eligibility - #1286

Merged
mergify[bot] merged 4 commits into
mainfrom
lean178/1253-hosted-merge-holds
Nov 26, 2026
Merged

mergify[bot] merged 4 commits into
mainfrom
lean178/1253-hosted-merge-holds

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Honor merge-authority holds in hosted eligibility

Context and goal

  • Goal: A merge-authority hold makes source and queue candidate eligibility fail.
  • Problem: Hosted can publish green for the same otherwise-ready pull request that the CLI blocks on its hold label.
  • Context: The hosted status binds to a commit, so adding or removing the label must also refresh source eligibility on that commit.

Closes #1253

Acceptance

  • Shared PR readiness logic applies the existing hold predicate. An otherwise-green held PR produces a red local verdict and red hosted source and candidate verdicts.
  • Adding or removing a hold refreshes source eligibility through the existing publisher so the status reflects the hold on an unchanged SHA. The same case without the hold passes.
  • Preserve the separate merge-time recheck of live hold state.

Notes

  • Dispatched by the readiness parity owner. GitHub's live PR labels are authoritative. Readiness and hosted attestation must reject a held source even with trusted approval and a valid head. Label events use the existing trusted publisher. Merge admission independently checks changes after readiness.

  • Offline regression on the base reproduced hosted source success and candidate success for held PRs. The current tests cover source failure and restored success on the same SHA, candidate rejection, and a hold first seen at merge admission.

  • Security review of 806404d approved. Both readiness callers use live GitHub labels. Label events only schedule the existing trusted publisher. Checkout, status permissions, candidate identity and live merge admission remain guarded.

  • Full local validation log: ~/.cache/lz-logs/lean178/r30/1253-check.fYqH79.

  • Full local gate passed on the initial reviewed head. Hosted CI at its original integration base reported 7,504 source lines against the 7,500-line cap. The clean merge of origin/main preserves the review reference and puts the source tree at 7,493 lines. Updated full local validation log: ~/.cache/lz-logs/lean178/r30/1253-check-merge.QvJcNs.

Base

main @ 35f3d8d
Base: 35f3d8d

Validation

Recorded for 9c9ccfc67cea

  • 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

(filled by loopzero check)

Review

(filled by loopzero review)


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

  • primary, claude, 806404d, approve

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 806404db66b65f8adf46eaaa85d9e0f71801e695, 32.4s: 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.

pr = github.pr_view(repo, number)
if pr.head_sha != head:
return github.Readiness(False, ("source head changed; refresh eligibility",))
if hold := github.merge_hold(pr.number, pr.labels):

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: Hold check is repeated in each caller instead of living in shared github.readiness

The task asks for the hold rule to live in shared PR readiness logic. Here the merge_hold early return is copied into both cli._readiness (cli.py:293) and eligibility.evaluate (eligibility.py:164), while github.readiness (github.py:1247) still ignores labels. Both current callers are covered, so nothing is broken today. But any new caller of github.readiness (another hosted path or a future merge gate) would quietly skip the hold. The smallest fix keeps the shared merge_hold predicate and adds one rule to github.readiness: if hold := merge_hold(pr.number, pr.labels): reasons.append(hold). If the early return is only there to save API calls, add a comment saying so, so the two copies are kept in step deliberately.

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Parked at 44a0230. The full local gate and hosted checks passed at this head, with approval on its clean-merge ancestor 806404d. Integrating origin/main b69efec locally makes the size gate exit 1 at 13,503 test lines against 13,500. The source budget passes. When the test budget admits the integration, merge the current main, run the delivery checks, then run loopzero ready --wait.

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

8 min in the queue, 3 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 02:44 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1424
  • ✅ Merged 02:52 · b9a018c · 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 b9a018c into main Nov 26, 2026
13 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/1253-hosted-merge-holds branch November 26, 2026 02:53
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.

review trust: Honor merge-authority holds in hosted eligibility

1 participant