Skip to content

feat(kix): show each base's landing queue - #566

Merged
moq-bot[bot] merged 5 commits into
mainfrom
quest/m0/queue-watcher/queue-page
Nov 8, 2026
Merged

moq-bot[bot] merged 5 commits into
mainfrom
quest/m0/queue-watcher/queue-page

Conversation

@kixelated

@kixelated kixelated commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m0/queue-watcher/queue-page.md: kix shows each enrolled repository's landing queue at /projects/github/<owner>/<name>/queue, linked from the project's activity page and its inbox row.

Summary

  • One section per base. Several bases of a repository each get their own section, which matches the per-base watchers that landed in moq-dev/quest#563.
  • GitHub's merge queue (any base where isMergeQueueEnabled is set): entries are listed by mergeQueueEntry.position. An entry in AWAITING_CHECKS is the build, and it links its merge group's run (taken from the first unfinished check's job link, trimmed to the run). After the entries come the PRs whose armed auto-merge is still waiting on checks to join.
  • The watcher's own queue (any other base): armed PRs are listed in autoMergeRequest.enabledAt order. Each one shows the title of its unfinished quest queue check run. The run that is IN_PROGRESS is the build, and it links the run's details_url.
  • Recent drops come from the watcher's marked comments (<!-- quest land fixer: <pick> removed ... -->) in the last 24 hours, newest first. Each drop shows its reason and links the comment. Its outcome is the watcher's next marked comment on the same pick: re-enqueued, handed back, fix not applied, refused, or held. Only comments from an app or a writer count, the same rule quest status applies to ejection comments. A dropped PR that has since closed is looked up by number to find its base.
  • Gating: the page goes through #authorized, the same live maintainer check every enrolled-project page uses. A private repository's readers without maintain get the 403 that the rest of kix gives today, until Private repositories widens that check for all pages.
  • Cost: one GraphQL page per 100 open PRs, the REST issue-comments pages since the cutoff, and at most one aliased GraphQL read for closed dropped PRs. On live moq-dev/moq that came to 1 + 4 + 1 requests, plus the usual authorization reads.
  • The fake GitHub (cloudflare/dev/github.ts) models these reads, so the route test and the seeded server can render the page.

Checked against live moq-dev/moq data: main showed 4 queued entries, one of them building with its run link, and 90 drops in the last day with their outcomes; release showed in its own section.

Choices made without asking

  • Drops come from the watcher's comments, not RemovedFromMergeQueueEvent. The watcher posts a marked removal comment in both modes, and its outcome comments carry the same pick marker. One repository-wide comment listing therefore covers both modes, and it includes PRs that have since merged or closed. Removals the watcher skips by design (a merge, or the App's own removal) are not drops. The plan named both sources; dropping the timeline events is simpler and loses nothing the page shows.
  • The drop window is 24 hours. It bounds the comment pages under Workers' subrequest limit: moq-dev/moq had about 620 comments in two days.
  • Labels: a non-merge-queue base is labelled "the watcher's queue" rather than "own queue", because the host gate also arms auto-merge on such bases.
  • No caching or D1 storage: the page reads live data, as the plan decided.

Public API and wire impact

  • New route: GET /projects/github/:owner/:repository/queue (HTML).
  • No schema, CLI, or webhook changes. No new App permissions: it uses pull_requests, issues, checks, and statuses read, which observation already holds.

Checks

  • just check passed.
  • just worker-test passed (22 files, 545 tests), including the new cloudflare/test/queue.test.ts.
  • quest check --base origin/main passed.
  • The CLI tests (just test outside the Worker) did not run, since nothing outside cloudflare/ and quest/ changed.

Suggested follow-ups

  • None recommended. The watcher status API that the maintainer expects later (for detail GitHub lacks, such as a fixer's live progress) is already noted in the quest's plan as a future direction, and nothing here needs it yet.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

Review

mechanical fix by codex, gpt-6.1-sol, medium effort: Merged base and re·solved quest/m0/queue-watcher/README.md conflict, preserving base child-list removal and PR queue-page documentation; ran just check and just test successfully. (head af61ca1)

Rewritten by quest review after each round.

  • Reviewer: Codex, gpt-6.1-sol, medium effort
  • Session: 01a1b88f-984f-7d31-8c6b-c8d05a8e8c8f, round 2
  • Head: c96a33a
  • Base: origin/main at ddcefaa
  • Score: 10/10, The updated fallback displays terminal dispositions from removal comments, resolving the prior finding without introducing new issues in the reviewed changes.
  • Findings: none
  • The last round's findings, at a82dcdf:
    • Fixed: medium, cloudflare/src/github/queue.ts:226: Read terminal dispositions from removal comments; Drop.next now preserves the removal comment’s prose second paragraph, and QueuePage displays it when no later outcome exists; the added unit and route assertions cover this fallback, including a held removal.

After round 2: merged origin/main at 114621d. The merge was conflict-free except for taking main's deletion of quest/m0/queue-watcher/per-base.md, which drops this PR's one-line edit to that file. Nothing under cloudflare/ changed since the reviewed head c96a33a. just check and just worker-test (545 tests) passed again on the merge.

@pullfrog

pullfrog Bot commented Nov 8, 2026

Copy link
Copy Markdown

Pullfrog  | Review this ➔

/projects/github/<owner>/<name>/queue lists each base's queue in landing
order, its builds with their runs, and the watcher's drops from the last
day with each one's outcome, for GitHub's merge queue and the watcher's
own queue alike. It reads GitHub when served, under the maintainer check
every project page uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title kix.quest shows each repository's landing queue feat(kix): show each base's landing queue Nov 8, 2026
kixelated and others added 2 commits November 7, 2026 16:32
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r/queue-page

# Conflicts:
#	quest/m0/queue-watcher/per-base.md
@kixelated
kixelated marked this pull request as ready for review November 8, 2026 00:52
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f98fb1d2-d770-46c1-8d8d-da80102727ef
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@kixelated
kixelated added this pull request to the merge queue Nov 8, 2026

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed head: 114621d
Base: ddcefaa

No actionable findings identified in this static review.

The direction is sound: derive each base's queue from GitHub, reuse the existing live maintainer authorization, and keep queue assembly separate from rendering without adding stored queue state. I inspected the changed route, data fetching and pagination, queue ordering and build links in both modes, drop/outcome pairing and terminal-removal fallback, navigation links, fake GitHub support, and the new tests. I also checked the surrounding authorization and watcher/check-writing code.

Limits: GitHub-connector-only source review. I did not run builds or tests, execute the application, or independently reproduce the live-data results reported in the PR. This is a COMMENT review, not approval or a claim that the PR is ready to merge.

(Written by review (OpenAI))

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 8, 2026
@moq-bot

moq-bot Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

quest land watch: the merge queue removed this pull request at 114621d because it conflicts with main (merge_conflict).

The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs.

(written by quest land watch)

@moq-bot
moq-bot Bot enabled auto-merge November 8, 2026 01:12
@moq-bot

moq-bot Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

quest land watch: armed auto-merge on this pull request at af61ca1, so it joins the back of the merge queue once its required checks pass, with the land fixer's fix (codex, gpt-6.1-sol, medium effort): Merged base and re·solved quest/m0/queue-watcher/README.md conflict, preserving base child-list removal and PR queue-page documentation; ran just check and just test successfully..

(written by quest land watch)

@moq-bot
moq-bot Bot added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit b7fb7f8 Nov 8, 2026
9 checks passed
@moq-bot
moq-bot Bot deleted the quest/m0/queue-watcher/queue-page branch November 8, 2026 01:18
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.

1 participant