Skip to content

refactor(queue): port queue show's dequeue diagnosis onto mergify-events - #1759

Open
jd wants to merge 1 commit into
mainfrom
devs/jd/jd/mrgfy-8363-make-the-activity-log-answerable-from-the-cli-a-shared-logs/port-queue-show-s-dequeue-diagnosis-onto-mergify--e13a945a
Open

refactor(queue): port queue show's dequeue diagnosis onto mergify-events#1759
jd wants to merge 1 commit into
mainfrom
devs/jd/jd/mrgfy-8363-make-the-activity-log-answerable-from-the-cli-a-shared-logs/port-queue-show-s-dequeue-diagnosis-onto-mergify--e13a945a

Conversation

@jd

@jd jd commented Aug 5, 2026

Copy link
Copy Markdown
Member

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

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 5, 2026 07:42 Failure
@jd

jd commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 refactor(queue): port queue show's dequeue diagnosis onto mergify-events #1759 👈
2 feat(events): add mergify events, a timeline over the activity log #1760

@mergify

mergify Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 2 of 6 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 👀 Review Requirements 👀 reviews
🔴 🔎 Reviews 👀 reviews
🟢 🤖 Continuous Integration
🟢 Enforce conventional commit
🟢 📕 PR description
🟢 🚦 Auto-queue

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by>=2
This rule is failing.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
This rule is failing.
  • #review-requested = 0
  • #changes-requested-reviews-by = 0
  • #review-threads-unresolved = 0

Show 4 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success=ci-gate

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

@mergify
mergify Bot requested a review from a team August 5, 2026 07:50
@jd
jd marked this pull request as ready for review August 5, 2026 09:35
@jd
jd force-pushed the devs/jd/jd/mrgfy-8363-make-the-activity-log-answerable-from-the-cli-a-shared-logs/port-queue-show-s-dequeue-diagnosis-onto-mergify--e13a945a branch from 2538e85 to c4884b2 Compare August 5, 2026 12:18
@jd
jd force-pushed the devs/jd/jd/mrgfy-8363-make-the-activity-log-answerable-from-the-cli-a-shared-logs/add-shared-activity-log-client-crate--1f15266a branch from 6220917 to f6b6132 Compare August 5, 2026 12:18
@jd

jd commented Aug 5, 2026

Copy link
Copy Markdown
Member Author

Revision history

# Type Changes Reason Date
1 initial 2538e85 2026-08-05 12:18 UTC
2 rebase 2538e85 → c4884b2 (rebase only) 2026-08-05 12:18 UTC
3 rebase 6bacff8 → b2faf78 (rebase only) 2026-08-06 08:58 UTC

@jd
jd temporarily deployed to func-tests-live August 5, 2026 12:18 — with GitHub Actions Inactive
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 5, 2026 12:18 Failure
Base automatically changed from devs/jd/jd/mrgfy-8363-make-the-activity-log-answerable-from-the-cli-a-shared-logs/add-shared-activity-log-client-crate--1f15266a to main August 6, 2026 08:44
@mergify
mergify Bot force-pushed the devs/jd/jd/mrgfy-8363-make-the-activity-log-answerable-from-the-cli-a-shared-logs/port-queue-show-s-dequeue-diagnosis-onto-mergify--e13a945a branch from c4884b2 to 6bacff8 Compare August 6, 2026 08:45
@mergify
mergify Bot temporarily deployed to func-tests-live August 6, 2026 08:45 Inactive
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 6, 2026 08:45 Failure
`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
@jd
jd force-pushed the devs/jd/jd/mrgfy-8363-make-the-activity-log-answerable-from-the-cli-a-shared-logs/port-queue-show-s-dequeue-diagnosis-onto-mergify--e13a945a branch from 6bacff8 to b2faf78 Compare August 6, 2026 08:58
@jd
jd temporarily deployed to func-tests-live August 6, 2026 08:58 — with GitHub Actions Inactive
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 6, 2026 08:58 Failure
@jd

jd commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Rebased onto main — no content change.

The base of this stack, #1758, merged this morning as 8bb025c. Mergify had already auto-restacked this PR onto main (c4884b2 → 6bacff8); this push replaces that with the locally rebased commit so the rest of the stack lines up again — the tip #1760 was left CONFLICTING by the merge and is now clean.

6bacff8 → b2faf78compare

Verified standalone at this commit (each commit is its own PR with its own CI): cargo test --workspace and cargo clippy --workspace --all-targets clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant