refactor(queue): port queue show's dequeue diagnosis onto mergify-events - #1759
Conversation
|
This pull request is part of a Mergify stack:
|
Merge Protections🔴 2 of 6 protections blocking · waiting on 👀 reviews
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
Show 4 satisfied protections🟢 🤖 Continuous Integration
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
2538e85 to
c4884b2
Compare
6220917 to
f6b6132
Compare
Revision history
|
c4884b2 to
6bacff8
Compare
`queue show`'s activity-log fallback was the CLI's first `/logs` consumer, and `last_leave.rs` (744 lines) carried the whole endpoint contract itself: the explicit 90-day window, the newest-first ordering assumption, the single-page fetch. That contract now has one home — the `mergify-events` crate — so this deletes the module and rebuilds the diagnosis as its `queue_leave` explain layer: - the fetch goes through `mergify_events::fetch` with `Window::retained` and `limit: 1`; the wire shape is unchanged (same filters, same `per_page=1`), but the window/pagination/ ordering traps are the shared client's tests' problem now - the decode types, the renderer (headline, facts block, the API's own reason prose, failing checks with job URLs, next step) and the no-activity notice move verbatim to `mergify_events::queue_leave` — the two queue-specific traps they guard (leave events vs `checks_end` abort codes, `metadata.merged` telling a merge from a dequeue) are documented there - `queue show` keeps its exact behavior: same human wording (the `PR #N is not in the merge queue` line the live smoke tests pin), same `--json` contract (`dequeued` tri-state, `queue_leave` verbatim, promoted `queue_leave_head_sha`), same 403 degradation — every test that pinned that behavior moved or stayed, none was weakened Net for mergify-queue: -744 lines, and no /logs knowledge left in the crate. Part of MRGFY-8363. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Change-Id: Ie13a945a4eddfdfcf5d998958c04950a7c0a0594
6bacff8 to
b2faf78
Compare
|
Rebased onto The base of this stack, #1758, merged this morning as
Verified standalone at this commit (each commit is its own PR with its own CI): |
queue show's activity-log fallback was the CLI's first/logsconsumer, and
last_leave.rs(744 lines) carried the whole endpointcontract itself: the explicit 90-day window, the newest-first
ordering assumption, the single-page fetch. That contract now has one
home — the
mergify-eventscrate — so this deletes the module andrebuilds the diagnosis as its
queue_leaveexplain layer:mergify_events::fetchwithWindow::retainedandlimit: 1; the wire shape is unchanged(same filters, same
per_page=1), but the window/pagination/ordering traps are the shared client's tests' problem now
reason prose, failing checks with job URLs, next step) and the
no-activity notice move verbatim to
mergify_events::queue_leave— the two queue-specific traps theyguard (leave events vs
checks_endabort codes,metadata.mergedtelling a merge from a dequeue) are documented there
queue showkeeps its exact behavior: same human wording (thePR #N is not in the merge queueline the live smoke tests pin),same
--jsoncontract (dequeuedtri-state,queue_leaveverbatim, promoted
queue_leave_head_sha), same 403 degradation —every test that pinned that behavior moved or stayed, none was
weakened
Net for mergify-queue: -744 lines, and no /logs knowledge left in the
crate.
Part of MRGFY-8363.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com