Repository navigation
Report Mergify departures for the current queue attempt - #1357
Conversation
Architecture-Review: unchanged; departure diagnostics use the existing authenticated report and still verify the exact head before a verdict. Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero primary review by claude on b6a7527bb5c8ba31e505841a9452c5a78a93c668, 54.4s: 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.
| print(f"PR #{pr.number} confirmed in Mergify queue {queue}; waiting") | ||
| elif state is None and confirmed: | ||
| if sha := _mergify_departure(config, pr, queue, closed): | ||
| elif state is None: |
There was a problem hiding this comment.
suggestion: Every admission-wait tick now reads the full PR comment list
Before this change, a tick where state is None and not confirmed made no extra calls. Now each such tick calls mergify.departure_report, which reads every page of issues/{n}/comments through github._paged. That call comes on top of the merged_sha, configured and membership reads the tick already makes. On a long --wait with a PR that has many comments, this uses up GitHub rate limit while Mergify is only waiting on preflight checks. It is not wrong, since GhError falls back to None. Smallest fix: before fetching the comments, check something cheap that shows a departure could have happened, for example that the request marker exists and the latest Mergify comment's updated_at has changed. Or fetch comments every Nth tick and once before timing out.
|
|
||
| @pytest.mark.parametrize("report", ["current", "stale", None]) | ||
| def test_mergify_reports_admission_wait(wt, gh, capsys, monkeypatch, report): | ||
| @pytest.mark.parametrize("confirmed,kind", [ |
There was a problem hiding this comment.
suggestion: Consolidated test moves assertion logic into fixture data
test_mergify_reports_current_queue_attempt runs 11 cases through one body. The body branches on kind in fixture["admission"], kind in fixture["expected"] and kind == "landed". The expected messages, attribution sentences and requeue guidance are stored in mergify-departure.json instead of next to the assertions. The task says this was done to fit under the test line cap. The cost is that a failure is hard to map back to the acceptance item it covers. It also makes it easy for a new kind to fall silently into the wrong branch: any kind that is not in expected and not landed is treated as an admission wait. Consider splitting it into two parametrized tests, one for admission/stale controls and one for confirmed/unconfirmed departure guidance. Or keep the expected outcome per case in the parametrize tuple. Not blocking.
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
loopzero delta review by claude on 929cbc812c930eb85811dc8e92525c4a1039bf08, 14.7s: approve (0 critical, 0 important, 0 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.
|
@Mergifyio queue |
✅ Merged into
|
|
No description provided. |
Report Mergify departures for the current queue attempt
Context and goal
Closes #980
Closes #982
Acceptance
Notes
GitHub's bot identity authenticates the report. Its command link and reported source SHA tie it to the latest attempt. The existing membership and merge verification remain authoritative.
Base
main @ bafb356
Base: bafb356
Before the fix the replay timed out before admission and omitted the report
and attribution after confirmation. The stale-head, stale-command, and
untrusted-author controls stayed on the admission path.
Supersedes #1009 after the test cap required consolidating admission and departure cases around one fixture.
Validation
Recorded for
929cbc812c93uv run --group dev ruff check src tests: exit 0uv run --group dev tach check: exit 0uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0scripts/size_budget.sh: exit 0uv run --group dev pytest -q: exit 0Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Review