~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

A queued pull says what it waits for and when it should land

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:web/queue-stages

What changes

The merge queue page says what each pull is waiting for. A queued pull in no batch used to read just "Queued, 2nd of 3" unless a pre-flight was running at that moment. Now it reads one of these:

  • "running its checks"
  • "running its checks again on main as it is now", when one failed on an older tip and the runner runs it again
  • "ready for the next batch"

Its pre-flights' runs show beside it, as the checks mark a commit row has. The page groups pulls under the batch they are in, with the batch's commit, its checks, when it started and when it should land. The pulls not in a batch yet come after. The separate check boxes under the list are gone.

Each queued pull says when it should land, as "lands in about 8 minutes", on the queue page and in the pull's merge box. The server answers how long the queue typically takes (typical: the median batch that landed lately, and the median longest passing pre-flight). The page works it out from that against its own clock, so the estimate moves on while it is open, and the shots stay put.

dev.knotless.getQueue gains typical, each pull's stage and checks, and each batch's startedAt. queueStateView gains stage, typical, batchStartedAt and aheadStartedAt. All are optional. knotless show and show_item say the same new words.

Why

A queue that is working looked stuck. Pulls sat at "Queued" for ten minutes while their pre-flights ran, or ran again after main moved, and nothing said so. GitHub's merge queue shows each entry's status, its checks and an estimated time to merge. This brings the same to ours.

How it was checked

  • A unit test of every stage and of the typical durations (crates/knotless/src/queue.rs).
  • The merge queue serve test reads each pull's stage, its pre-flight checks, typical, and the batch starts on the pull page.
  • The runner tests' wording follows the new said.
  • The shots world gains pre-flight runs, so the queue page draws a pull running its checks. The answers were recorded again, so every page's identifiers changed with the new world.
  • I looked at the queue page and the queued pull's merge box with just look, and had a fresh agent critique the pictures. I fixed the estimate repeated on each row of a batch, the group named "waiting" over a pull that is running, and the batch's commit drawn as plain text. Left as they were before: the gap between "opened by" and the person, and the colons in the ejected and landed lines.

Shots-moved: queue, pull-queued

Shortcomings

  • The estimate is a median. A batch that fails and is halved takes longer than it says.
  • It does not count pulls queued ahead that are not yet in a batch. Those may share its batch, or take one before it.

🤖 Generated with Claude Code

Asked for changes

This pull makes the merge queue say what each queued pull is waiting for (running its checks, running them again, or ready for the next batch) and when it should land. It adds typical, stage, checks and the batch start times to getQueue and queueStateView, redraws the queue page and merge box, and updates the CLI and MCP wording. I read the main logic in crates/knotless/src/queue.rs (the stage rules, typical and the medians) and found it sound. The change file, the lexicon changes and the docs in merge-queue.md and mcp.md are present. I did not read the whole diff, and the checks had not finished when I looked (all seven were still queued).

One thing must change before it merges. The pull moves pages: the queue page and the pull page's merge box change, and the shots world gains pre-flight runs. AGENTS.md says the shots check fails a pull whose body does not name every moved page on a Shots-moved: line. The body has no such line. Add Shots-moved: <page names> on a line of its own, using the names the shots check reports, then rerun that check with knotless rerun <repo> --pull <uri> --workflow shots. The body is read when the check runs, so editing it alone moves nothing.

The pull also changes the merge box and the queue page in states the shots may not draw. AGENTS.md asks for just look pictures of those states, passed as --image when the pull is edited.

Asked for changes

The pull makes the merge queue say what each queued pull is waiting for and when it should land. I found nothing new in the code this round, but the one thing I asked for last round has not been done.

The pull body still has no Shots-moved: line. The change moves the queue page and the pull page's merge box, and the shots world gains pre-flight runs. AGENTS.md says the shots check fails a pull whose body does not name every moved page on a Shots-moved: line. Add Shots-moved: <page names> on a line of its own, using the names the shots check reports. Then rerun the check with knotless rerun <repo> --pull <uri> --workflow shots, because editing the body alone does not rerun it. The shots check for the new head is still queued, so I could not read its report.

The earlier request for just look pictures of the merge box and queue page states is also still open. Pass them as --image when you edit the pull, unless the shots already draw those states.

Asked for changes

The pull makes the merge queue say what each queued pull is waiting for and when it should land. The new head adds a commit that compares a pre-flight with its earlier runs by reference. I found nothing new in the code, but the two things I asked for in earlier rounds are still not done.

  1. The pull body has no Shots-moved: line. The change moves the queue page and the pull page's merge box, and the shots world gains pre-flight runs. AGENTS.md says the shots check fails a pull whose body does not name every moved page on a Shots-moved: line. Add Shots-moved: <page names> on a line of its own, using the names the shots check reports. Then rerun the check with knotless rerun <repo> --pull <uri> --workflow shots, because editing the body alone does not rerun it.
  2. I asked for just look pictures of the merge box and queue page states, passed as --image when you edit the pull. That is still open unless the shots already draw those states.

All seven checks for the new head are still queued, so I could not read the shots report.

Approved

The pull makes the merge queue say what each queued pull is waiting for and when it should land. It adds typical, stage, checks and the batch start times to getQueue and queueStateView, and it redraws the queue page and the merge box. I found nothing wrong in the code in earlier rounds, and the new head only reworks the batch header and its commit chip.

Both things I asked for are now done. The body has Shots-moved: queue, pull-queued, and it says you looked at the queue page and the merge box with just look. It also lists what the critique led you to fix.

I could not confirm the names on the Shots-moved: line against the shots report. All seven checks for this head were still queued when I looked. Check that the shots check passes with those names. If it reports different ones, fix the line and rerun it with knotless rerun.

Approved

The pull makes the merge queue say what each queued pull is waiting for and when it should land. I found nothing wrong in the code in earlier rounds. The body now has Shots-moved: queue, pull-queued, and it describes the just look pictures. Both things I asked for earlier are done.

I could not confirm the Shots-moved: names against the shots report. The checks for this head are still queued or running. Check that shots passes with those names before merging. If it reports different names, fix the line and rerun it with knotless rerun.

Merged as dccf3ce