Make ship-queue ready refuse when its READY note doesn't reach origin (GST-2242) (#4254)

* Make ship-queue ready refuse when its READY note doesn't reach origin (GST-2242)

ready exited 0 and printed "notes pushed" even when the READY note never reached origin, so land refused the pin with QUEUE_NOT_READY (#4245). The notes writer now reads origin's ref back after each push, and train ready refuses with QUEUE_READY_NOTE_UNPUSHED when origin still lacks the note after three tries.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* Name the changelog fragment for the branch (GST-2242)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* Regenerate the doctor component list for the new ready result code (GST-2242)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* Say that ready's notes check covers train policies, and how to rerun it with its gate flags (GST-2242)

Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* Skip the ready notes-push test on Windows, where the gh shim can't run (GST-2242)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-10 00:54:27 +00:00
1 parent 9ab50347ac
commit dfdaea2efd
9 files changed
+160 -10

No files matched your search

+5 -1
View File
@@ -790,7 +790,11 @@ narrow screen, except `setup`, which no paid run executes: a narrow screen
derives it like any other file. The nonce key carries the purpose and
the policy, so a repeat follows the same run and a broad screen never adopts
a narrow one. The READY block gains `screen: …`, and the receipt is written
locally and to the notes ref. `--dry-run` prints the dispatch without sending
locally and to the notes ref. `READY_RECEIPT:` says `notes pushed` only after
`ready` reads origin's notes ref back and finds the note; after three tries
without it, `ready` refuses with
[`QUEUE_READY_NOTE_UNPUSHED`](troubleshooting.md#queue-ready-note-unpushed),
because `land` reads the note on origin. `--dry-run` prints the dispatch without sending
it. Before dispatching, `ready` fetches the merge ref and requires its second
parent to be the PR head and its first parent the current base: a missing,
lagging or unfetchable merge ref (GitHub stops recomputing it while the PR
+21
View File
@@ -6502,6 +6502,27 @@ CHANGELOG drops or renames a released heading (the message then names the
CHANGELOG). `train prune --stale` deletes the scratch branches of merged or
closed PRs.
<a id="queue-ready-note-unpushed"></a>
### `QUEUE_READY_NOTE_UNPUSHED`
**Meaning.** `gstack-ship-queue ready` wrote the READY receipt in the local
state root, but origin does not hold its note on `refs/notes/gstack-trains`.
`ready` pushes the notes ref, then fetches it back and requires origin's tip
to be the local tip or to contain it. It tries three times, fetching and
merging origin's notes between tries. Either the push failed (a rejected ref,
credentials, the network) or it exited 0 and origin still read back without
the note, as when a proxy drops the update. `land --pin` reads the READY note
on origin and refuses the pin with `QUEUE_NOT_READY` without it, so `ready` refuses
here instead of printing `notes pushed`. Before this check, ready exited 0 and
the land failed instead (#4245). Don't send the READY block.
**Fix.** The `READY_RECEIPT:` line ends with the push's error. Fix what
refused it, then run the `NEXT:` line, which is the same `ready` command
without `--pregate`, `--gate-exit` or `--gate-log`: add back any of those you
passed the first time. It keeps the first `ready_at`, follows a screen run already dispatched at the
same merge SHA, and pushes the kept receipt. To see the raw error, run
`git push origin refs/notes/gstack-trains:refs/notes/gstack-trains`.
<a id="queue-screen-red"></a>
### `QUEUE_SCREEN_RED`