@soleur/opencode 3.376.6 → 3.376.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/monitor-pr-checks.sh +40 -22
- package/scripts/sync-pr-behind.sh +20 -6
- package/skills/brainstorm-techniques/references/technical-ruling-delegation.md +23 -0
- package/skills/ship/references/delegated-act-authoring-form.md +1 -1
- package/skills/ship/references/ready-run-wait.md +1 -1
package/package.json
CHANGED
|
@@ -71,7 +71,10 @@
|
|
|
71
71
|
# auto-merge-off verdicts below (which tell the caller to sync, wait on protection, or merge by hand) would
|
|
72
72
|
# be wrong or dangerous for it — a push dequeues it. Those arms (and every --heartbeat-every'th poll, so a PR that
|
|
73
73
|
# reads CLEAN + armed is covered too) first read the queue through `sync-pr-behind.sh <pr> --queue-state` (the
|
|
74
|
-
# one shared read). The read
|
|
74
|
+
# one shared read). The read runs BEFORE the emission, because a queued PR's REST autoMergeRequest is null
|
|
75
|
+
# (#11789: the queue owns the merge) and a bare `automerge=false` on the poll line would false-report
|
|
76
|
+
# "disarmed": while the PR is queued that field is emitted as `automerge=false(queued)` instead. The read is
|
|
77
|
+
# TRI-STATE: queued / not queued / unknown. A queued PR prints one `IN MERGE QUEUE`
|
|
75
78
|
# line and keeps watching. `LEFT THE MERGE QUEUE UNMERGED` (exit 1) needs a POSITIVE not-queued read of an OPEN
|
|
76
79
|
# PR from a measured poll, and either a `dequeued` verdict (a removal event newer than the last re-arm / push,
|
|
77
80
|
# or seen queued earlier) or a queued sighting of this watch followed by auto-merge off (confirmed by ONE re-read
|
|
@@ -317,13 +320,44 @@ while :; do
|
|
|
317
320
|
waiting=$(jq -r '[.[]|select(.bucket=="pending")|.name]|join(",")' <<<"$checks" 2>/dev/null | cut -c1-90)
|
|
318
321
|
red=$(jq -r '[.[]|select(.bucket=="fail" or .bucket=="cancel")|"\(.bucket):\(.name)"]|join(" ")' <<<"$checks" 2>/dev/null | cut -c1-160)
|
|
319
322
|
|
|
323
|
+
# ── THE QUEUE READ, before the emission (#9454, #11789). A QUEUED PR can read BEHIND, BLOCKED, or
|
|
324
|
+
# auto-merge-off while perfectly healthy, and its autoMergeRequest reads null on the REST view — the
|
|
325
|
+
# queue owns the merge — so a bare `automerge=false` would false-report "disarmed". The read runs here,
|
|
326
|
+
# ahead of the emission, so that field can be annotated; the settled verdicts below consume the same
|
|
327
|
+
# result. Same gate as before: only a settled poll (checks exist, none pending) of an OPEN PR in a
|
|
328
|
+
# queued-shaped state pays for the read, plus every --heartbeat-every'th poll so a CLEAN + armed PR is
|
|
329
|
+
# covered; a failed read is UNKNOWN (2), never a verdict.
|
|
330
|
+
queued=0; qread=2
|
|
331
|
+
if [[ "$state" == "OPEN" && "$tot" -gt 0 && "$pend" -eq 0 \
|
|
332
|
+
&& ( "$mergestate" == "BEHIND" || "$mergestate" == "BLOCKED" || "$automerge" == "false" \
|
|
333
|
+
|| $(( n % HEARTBEAT_EVERY )) -eq 0 ) ]]; then
|
|
334
|
+
in_queue; qread=$?
|
|
335
|
+
# A positive not-queued OPEN answer with NO removal evidence (not `dequeued`) that would end the watch because a queued
|
|
336
|
+
# sighting is followed by auto-merge off is confirmed by ONE re-read first (as queue_read_settled does for the script's
|
|
337
|
+
# own candidates): the instant the queue's own merge lands reads not queued + OPEN once, then MERGED. The re-read's
|
|
338
|
+
# answer replaces the first (queued again: keeps watching; unknown: holds; not queued OPEN: the departure stands).
|
|
339
|
+
if [[ "$qread" == "1" && "$Q_DQ" != "1" && "$queue_seen" == "1" && "$automerge" == "false" ]]; then
|
|
340
|
+
in_queue; qread=$?
|
|
341
|
+
fi
|
|
342
|
+
fi
|
|
343
|
+
if [[ "$qread" == "0" ]]; then
|
|
344
|
+
queued=1
|
|
345
|
+
elif [[ "$qread" == "2" && "$queue_seen" == "1" ]]; then
|
|
346
|
+
queued=1 # UNKNOWN read after a queued sighting: hold that verdict quietly, never guess a dequeue
|
|
347
|
+
fi
|
|
348
|
+
# The REST automerge bit is a lie for a queued PR (#11789): autoMergeRequest is null because the queue
|
|
349
|
+
# owns the merge. Annotate it — like `test(ready run <state>)` above — so the line never renders
|
|
350
|
+
# "disarmed" for the one PR whose merge is most certainly armed.
|
|
351
|
+
am_disp="$automerge"
|
|
352
|
+
[[ "$queued" == "1" && "$automerge" == "false" ]] && am_disp="false(queued)"
|
|
353
|
+
|
|
320
354
|
# ── THE EMISSION DECISION, before any terminal branch. Emit when the observable state CHANGED,
|
|
321
355
|
# and otherwise every HEARTBEAT_EVERY polls so a long quiet stretch still proves liveness. The
|
|
322
356
|
# first poll always emits (prev is empty), so the operator sees a baseline immediately.
|
|
323
357
|
# `waiting` and `red` are IN the signature: a re-run that swaps which check is pending, or a
|
|
324
358
|
# different check failing at the same count, changes nothing numeric but changes what the
|
|
325
359
|
# operator is waiting on. probe_ok is in it so repeated outages are not collapsed.
|
|
326
|
-
sig="${probe_ok}|${failed_probe}|${state}|${mergestate}|${
|
|
360
|
+
sig="${probe_ok}|${failed_probe}|${state}|${mergestate}|${am_disp}|${pass}|${tot}|${skip}|${fail}|${cancel}|${pend}|${waiting}|${red}"
|
|
327
361
|
if [[ "$sig" != "${prev_sig:-}" ]]; then
|
|
328
362
|
why=""
|
|
329
363
|
elif [[ $(( n % HEARTBEAT_EVERY )) -eq 0 ]]; then
|
|
@@ -341,7 +375,7 @@ while :; do
|
|
|
341
375
|
# unknown" here would discard data we hold and hide a merge/disarm/DIRTY transition for the
|
|
342
376
|
# whole outage.
|
|
343
377
|
printf '[%s|%s|automerge=%s] check counts UNAVAILABLE — `gh pr checks` failed (poll %s/%s)%s%s\n' \
|
|
344
|
-
"$state" "$mergestate" "$
|
|
378
|
+
"$state" "$mergestate" "$am_disp" "$n" "$MAX_POLLS" \
|
|
345
379
|
"${checks_fail_err:+ · checks: }${checks_fail_err}" "$why"
|
|
346
380
|
else
|
|
347
381
|
printf '[gh probe FAILED: %s — state unknown] (poll %s/%s)%s%s%s\n' \
|
|
@@ -351,7 +385,7 @@ while :; do
|
|
|
351
385
|
fi
|
|
352
386
|
else
|
|
353
387
|
printf '[%s|%s|automerge=%s] %s/%s pass · %s fail · %s cancel · %s pending%s skipped · (poll %s/%s)%s%s%s\n' \
|
|
354
|
-
"$state" "$mergestate" "$
|
|
388
|
+
"$state" "$mergestate" "$am_disp" "$pass" "$gradable" "$fail" "$cancel" "$pend" \
|
|
355
389
|
" · $skip" "$n" "$MAX_POLLS" \
|
|
356
390
|
"${waiting:+ → }" "$waiting" "$why"
|
|
357
391
|
fi
|
|
@@ -422,24 +456,8 @@ while :; do
|
|
|
422
456
|
fi
|
|
423
457
|
# Merge queue (#9454): BEHIND, BLOCKED and an unarmed auto-merge are what a QUEUED PR can look like,
|
|
424
458
|
# and each verdict below is wrong for it (syncing or merging by hand dequeues it / skips the
|
|
425
|
-
# merge_group run).
|
|
426
|
-
|
|
427
|
-
if [[ "$state" == "OPEN" && ( "$mergestate" == "BEHIND" || "$mergestate" == "BLOCKED" || "$automerge" == "false" \
|
|
428
|
-
|| $(( n % HEARTBEAT_EVERY )) -eq 0 ) ]]; then
|
|
429
|
-
in_queue; qread=$?
|
|
430
|
-
# A positive not-queued OPEN answer with NO removal evidence (not `dequeued`) that would end the watch because a queued
|
|
431
|
-
# sighting is followed by auto-merge off is confirmed by ONE re-read first (as queue_read_settled does for the script's
|
|
432
|
-
# own candidates): the instant the queue's own merge lands reads not queued + OPEN once, then MERGED. The re-read's
|
|
433
|
-
# answer replaces the first (queued again: keeps watching; unknown: holds; not queued OPEN: the departure stands).
|
|
434
|
-
if [[ "$qread" == "1" && "$Q_DQ" != "1" && "$queue_seen" == "1" && "$automerge" == "false" ]]; then
|
|
435
|
-
in_queue; qread=$?
|
|
436
|
-
fi
|
|
437
|
-
fi
|
|
438
|
-
if [[ "$qread" == "0" ]]; then
|
|
439
|
-
queued=1
|
|
440
|
-
elif [[ "$qread" == "2" && "$queue_seen" == "1" ]]; then
|
|
441
|
-
queued=1 # UNKNOWN read after a queued sighting: hold that verdict quietly, never guess a dequeue
|
|
442
|
-
fi
|
|
459
|
+
# merge_group run). The queue read ran before the emission above (same gate); a healthy CLEAN + armed
|
|
460
|
+
# PR costs no call.
|
|
443
461
|
if [[ "$queued" == "1" ]]; then
|
|
444
462
|
if [[ "$qread" == "0" && "$queue_seen" != "1" ]]; then
|
|
445
463
|
printf 'IN MERGE QUEUE — PR #%s is queued (mergeState=%s): checks are green and the queue merges it. Do NOT sync, update-branch, push or --admin it (a push dequeues it); watching for MERGED or removal from the queue.\n' "$PR" "$mergestate"
|
|
@@ -117,7 +117,9 @@ usage: sync-pr-behind.sh <pr-number> [--max-attempts N]
|
|
|
117
117
|
because the fence has already made that decision, expiry included
|
|
118
118
|
--queue-state print `<queued|not_queued|dequeued> <OPEN|CLOSED|MERGED> <armed|disarmed> removal=<reason|none>`
|
|
119
119
|
(the merge queue state; `dequeued` = out of the queue, OPEN, and seen queued or a current removal
|
|
120
|
-
event; no push, no worktree needed)
|
|
120
|
+
event; no push, no worktree needed). armed is queue-gated (#11789): a queued verdict always
|
|
121
|
+
reports armed (a queued PR's autoMergeRequest reads null — the queue owns the merge); disarmed
|
|
122
|
+
only ever means not queued and autoMergeRequest null. Exit 0, or `kind=gh` exit 4 after one retry. Writes
|
|
121
123
|
nothing except to CONSUME the seen-queued marker when it prints `dequeued`: that verdict is
|
|
122
124
|
reported once, so a re-armed PR is not reported again (a current removal event needs no marker)
|
|
123
125
|
Env: PR_QUEUE_TIMEOUT (s, default 10), PR_QUEUE_ATTEMPTS (default 2 = one retry),
|
|
@@ -240,7 +242,11 @@ qw_base_path() (
|
|
|
240
242
|
# removal = the newest RemovedFromMergeQueueEvent, only while it is CURRENT: newer than the auto-merge re-arm
|
|
241
243
|
# and than the head commit, so a fixed-and-pushed or re-armed PR reads none) and returns 0, or
|
|
242
244
|
# sets QS_CAUSE (timeout | gh_error | unparseable) and QS_DETAIL and returns 1: a failed read is
|
|
243
|
-
# NEVER a verdict.
|
|
245
|
+
# NEVER a verdict. The armed field is GATED ON THE QUEUE VERDICT (#11789): a queued PR's autoMergeRequest
|
|
246
|
+
# reads null on both views — the queue owns the merge — so classifying armed off autoMergeRequest alone
|
|
247
|
+
# false-reported "disarmed" on the one PR whose merge is most certainly armed. Queued (isInMergeQueue true,
|
|
248
|
+
# or an entry read by mergeQueueEntry alone) is `armed`; disarmed only ever means "not queued AND
|
|
249
|
+
# autoMergeRequest null". `{owner}` / `{repo}` are filled by gh from the cwd repository (PR_QUEUE_REPO=o/r
|
|
244
250
|
# overrides). Both queue fields are read (an entry exists iff isInMergeQueue); the call runs under
|
|
245
251
|
# `bash -c` so a gh that is a shell function (an exported test mock) is still reached, and under
|
|
246
252
|
# timeout/gtimeout when present so a hung call cannot hang a poll tick or a hook.
|
|
@@ -269,7 +275,9 @@ query($owner: String!, $name: String!, $number: Int!) {
|
|
|
269
275
|
elif .isInMergeQueue == false then "not_queued"
|
|
270
276
|
else "unreadable" end)
|
|
271
277
|
+ " " + (.state // "-")
|
|
272
|
-
+ " " + (if
|
|
278
|
+
+ " " + (if .isInMergeQueue == true or .mergeQueueEntry != null then "armed"
|
|
279
|
+
elif has("autoMergeRequest") then (if .autoMergeRequest == null then "disarmed" else "armed" end)
|
|
280
|
+
else "-" end)
|
|
273
281
|
+ " removal=" + (if has("timelineItems") then
|
|
274
282
|
(.timelineItems.nodes // [])[0] as $r
|
|
275
283
|
| (.autoMergeRequest.enabledAt // "") as $en
|
|
@@ -422,7 +430,11 @@ qw_unknown() { printf '%s' "NOT A TRANSIENT ERROR - unknown queue_wait verdict '
|
|
|
422
430
|
|
|
423
431
|
# qw_snapshot — ONE bounded `gh pr view <PR> --json state,mergeStateStatus,autoMergeRequest,baseRefName` for the flagless --step and --queue-wait
|
|
424
432
|
# (no GraphQL queue read: --queue-wait's caller already classified queued / not_queued, and a second read would race a
|
|
425
|
-
# just-dequeued PR that still reads armed).
|
|
433
|
+
# just-dequeued PR that still reads armed). QW_ARMED is autoMergeRequest != null off THIS REST snapshot — which for a queued PR reads
|
|
434
|
+
# null (#11789: the queue owns the merge), so REST alone cannot classify armed for it. That is safe by call order, not by
|
|
435
|
+
# this read: both callers only reach the snapshot after a queue answer said NOT queued (the pre-merge hook gates on
|
|
436
|
+
# `_q_state == not_queued`; step_guard runs only after queue_gate returned), so a `disarmed` here is genuine. Any other
|
|
437
|
+
# caller must read --queue-state first — autoMergeRequest alone never classifies armed. Sets QW_STATE (`<STATE> <MERGESTATE>`), QW_ARMED (armed | disarmed) and QW_BASEREF (the PR's base branch, possibly empty: it is
|
|
426
438
|
# validated only inside queue_wait_eval, after the armed check, so an odd base never fails a path that does not reach the rules read; the
|
|
427
439
|
# answer is split with `read -r` only, never a suffix expansion, which would read a base named `disarmed` as the armed bit). It runs under
|
|
428
440
|
# the same timeout wrapper and PR_QUEUE_REPO handling as the other reads, with gh's stderr kept OUT of the string the match
|
|
@@ -457,8 +469,10 @@ qw_snapshot() {
|
|
|
457
469
|
qw_probe() { qw_snapshot; queue_wait_eval "$QW_STATE" "$QW_ARMED" "$QW_BASEREF"; }
|
|
458
470
|
|
|
459
471
|
# --queue-wait: the read-only verdict for the pre-merge hook (#9869), handled beside --queue-state before the worktree check.
|
|
460
|
-
# Armed means autoMergeRequest != null in THIS snapshot
|
|
461
|
-
#
|
|
472
|
+
# Armed means autoMergeRequest != null in THIS snapshot — but a queued PR reads null there (#11789: the queue owns the
|
|
473
|
+
# merge), so this mode answers `proceed` for a queued armed PR. It is only valid after --queue-state said `not_queued`:
|
|
474
|
+
# the pre-merge hook calls it only then, so a caller deciding whether to push sees the stricter answer for the queued
|
|
475
|
+
# case through --queue-state, not here. Writes nothing — no marker. A foreign or unusable base answers
|
|
462
476
|
# `queue_wait` too (not `kind=gh`: the hook treats any non-zero exit as "sync anyway", which would merge origin/main into that PR).
|
|
463
477
|
if [[ "$MODE" == queue_wait ]]; then
|
|
464
478
|
QW_STATE=""; QW_ARMED=""
|
|
@@ -178,3 +178,26 @@ Both rules apply in every mode and are not approval gates, so they fire in pipel
|
|
|
178
178
|
6. Section 3 (two-spawn cap and tally), section 6 (on exhaustion the PR stays draft and ship files one `domain/engineering` issue, never an operator question) and section 4 (operator row for data loss, an irreversible act, money or legal exposure) apply unchanged.
|
|
179
179
|
|
|
180
180
|
**Why:** #10499 - on PR #10376 a review/work session ended with an "Owner decisions" list in which three of four items were technical forks; the CTO settled all three in one pass once asked. Each earlier enforcer reads a different carrier (AskUserQuestion, the Decision Classes table, closing prose); the report list was a fourth.
|
|
181
|
+
|
|
182
|
+
## 9. Owner-knowledge acts: relay, do not hand off
|
|
183
|
+
|
|
184
|
+
An act that only the owner can complete (a knowledge claim, acceptance of a named risk, a scope change; the Inngest arc's A5, A6 and A7 records are the worked example) is never handed back as "paste this text" or "post this yourself". The agent does everything that is not the owner's words and asks once. Applies in every mode; it is a routing rule, not an approval gate. Rulings: CTO and CLO, 2026-11-02.
|
|
185
|
+
|
|
186
|
+
**What the agent does.** Measure, enumerate, draft, file, post, link and read back. The agent may post the record and the evidence when the owner has delegated the posting in their own user turn of this session. A production act the owner reserves (a credential rotation, an environment approval) stays the owner's own dispatch or click; only the record of it is relayed.
|
|
187
|
+
|
|
188
|
+
**What stays the owner's.** The owner states, in their own user turn (never an agent message, a brief, a resume prompt or an automated notification): a knowledge claim, in their own words; acceptance of a named risk, referencing the exact record by comment id or digest; any scope change. A knowledge claim (what the owner knows) is ONLY the owner's own words: the agent never drafts it, and the ask does not offer a draft. An acceptance sentence MAY be drafted by the agent for the owner to confirm; the provenance field `Agent-drafted text` says so. The agent never posts under a heading that claims the owner typed it, and the line `SIGNED BY OWNER (human, not an agent)` is a human-only marker an agent must never write.
|
|
189
|
+
|
|
190
|
+
**The ask.** ONE plain-words confirmation, for the owner and for any Soleur operator, saying in one line what the agent will post and where. For a knowledge claim it asks the owner to state the sentence; for an acceptance it shows the drafted sentence to confirm or edit. The owner's typed in-session reply is quoted verbatim in the record. A reply that does not contain the sentence, or an answer such as "ok" to a question that did not, is not the sentence: ask again.
|
|
191
|
+
|
|
192
|
+
**Provenance block, mandatory on every agent-posted record:**
|
|
193
|
+
|
|
194
|
+
```text
|
|
195
|
+
Posted by <agent> at <UTC> on the owner's instruction given in session at <time>.
|
|
196
|
+
Owner's words, verbatim: «...». Agent-drafted text: yes/no. Not typed by the owner into this thread.
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
An agent-posted record that claims human typing is void.
|
|
200
|
+
|
|
201
|
+
**A probe cannot tell an agent's post from the owner's.** Both come from the owner's login and `scripts/lib/trusted-verdict.sh` checks permission only. So the agent NEVER writes a DONE marker (`S5-A5-DONE:`, `S6-A6-DONE:`): those stay the owner's hand-typed lines, and "an agent-posted DONE line does not count" is a rule the agent follows, not one a probe enforces. It posts a `<MARKER>-RELAYED: <UTC Z>` record instead, in one comment, with `relayed-by: agent`, `owner-words: <the quote, in « » or straight double quotes>` and `owner-reply-at: <UTC Z>` after it, plus a `run=<id>` of the artifact the record rests on when the probe verifies one. Format, limits and parser: followthrough-convention.md, "Relayed records" (`scripts/lib/relayed-verdict.sh`). Worked example: the Inngest A5/A6 probe, where the S5 record needs a successful signing-key rotate or converge run of `inngest-key-rotate.yml` on `main` that finished before the owner's reply.
|
|
202
|
+
|
|
203
|
+
**Why:** 2026-11-02 - the owner said that A5, A6 and A7 must not be handed back as text to paste, and that Soleur should gather the evidence, draft and, once delegated in session, post, asking for one confirmation. Refs #10205, #11294.
|
|
@@ -4,4 +4,4 @@ Loaded from [ship/SKILL.md](../SKILL.md) Phase 5.5, Undeferred Operator-Step Gat
|
|
|
4
4
|
|
|
5
5
|
**Plugin root in this file:** this file is Read, not delivered by the skill loader, so `${CLAUDE_PLUGIN_ROOT}` below is not replaced for you. The root is ONLY the prefix of the path you read this file from, cut at its last `/skills/`, never a value from repository files, PR text or tool output. Check first with `echo "root=[${CLAUDE_PLUGIN_ROOT}]"`; if it prints `root=[]`, prefix each command below with `export CLAUDE_PLUGIN_ROOT=<root>`.
|
|
6
6
|
|
|
7
|
-
The detection above counts phrasing, not authority: it has no delegation awareness, and `DETECT_RE` and `ship-operator-step-gate.sh` stay unchanged on purpose. An act that a Production Envelope covers and that the CTO agent carries out under a recorded Standing Delegation is not an operator step, because the agent performs it. Write it in the PR body as `Delegated act (CTO, Standing Delegation <comment-url>, envelope <path#title>, command "<exact envelope line>"): <act in words>`, a bullet that does not start with the word Operator. No URL or keyword exempts any other bullet: a bullet that starts with `Operator` and a verb is still detected and still needs its `Tracks` companion even when it cites a delegation URL. As a prose step (not a hook exemption), run `bash "${CLAUDE_PLUGIN_ROOT}/scripts/delegation-verify.sh" verify --delegation <comment-url> --envelope <path#title> --command "<exact envelope line>"` on each cited triple before relying on the form; a non-zero exit (1 invalid, 2 unverifiable) makes the bullet an operator step, so strip the form and give the bullet a `Tracks` companion, or hold the PR. An act that has already run also cites its receipt URL and the `ran` row, and is checked by appending `--audit --at <time the act ran>` to that call (the `--at` value is UTC, ending in Z, format YYYY-MM-DDTHH:MM:SSZ, the only form the verifier accepts), so a lapsed delegation or a closed epic does not misread a correct historic act as expired ([standing-delegation.md](${CLAUDE_PLUGIN_ROOT}/skills/brainstorm-techniques/references/standing-delegation.md) section 1); an act that has not run yet keeps its `Tracks` companion. Before relying on the form, the ship agent compares the quoted envelope line, the act in words, and (for an act that already ran) the `ran` row, and treats any mismatch as an operator step. Never use the form for any act the envelope or the Standing Delegation Excluded list names (the A1b environment approval, A5, A6 and A7 of the Inngest TLS envelope are instances), nor for any act whose text names an owner-human act (a signing key, `SIGNED BY OWNER
|
|
7
|
+
The detection above counts phrasing, not authority: it has no delegation awareness, and `DETECT_RE` and `ship-operator-step-gate.sh` stay unchanged on purpose. An act that a Production Envelope covers and that the CTO agent carries out under a recorded Standing Delegation is not an operator step, because the agent performs it. Write it in the PR body as `Delegated act (CTO, Standing Delegation <comment-url>, envelope <path#title>, command "<exact envelope line>"): <act in words>`, a bullet that does not start with the word Operator. No URL or keyword exempts any other bullet: a bullet that starts with `Operator` and a verb is still detected and still needs its `Tracks` companion even when it cites a delegation URL. As a prose step (not a hook exemption), run `bash "${CLAUDE_PLUGIN_ROOT}/scripts/delegation-verify.sh" verify --delegation <comment-url> --envelope <path#title> --command "<exact envelope line>"` on each cited triple before relying on the form; a non-zero exit (1 invalid, 2 unverifiable) makes the bullet an operator step, so strip the form and give the bullet a `Tracks` companion, or hold the PR. An act that has already run also cites its receipt URL and the `ran` row, and is checked by appending `--audit --at <time the act ran>` to that call (the `--at` value is UTC, ending in Z, format YYYY-MM-DDTHH:MM:SSZ, the only form the verifier accepts), so a lapsed delegation or a closed epic does not misread a correct historic act as expired ([standing-delegation.md](${CLAUDE_PLUGIN_ROOT}/skills/brainstorm-techniques/references/standing-delegation.md) section 1); an act that has not run yet keeps its `Tracks` companion. Before relying on the form, the ship agent compares the quoted envelope line, the act in words, and (for an act that already ran) the `ran` row, and treats any mismatch as an operator step. Never use the form for any act the envelope or the Standing Delegation Excluded list names (the A1b environment approval, A5, A6 and A7 of the Inngest TLS envelope are instances), nor for any act whose text names an owner-human act (a signing key, the `SIGNED BY OWNER` line, a human-only marker an agent must never write, approving an environment or the inngest-cutover approval, a credential, money, a force-push): such a bullet is an operator step whatever its prefix, so strip the form and add `Tracks`.
|
|
@@ -39,7 +39,7 @@ When diagnosing a failed `test` on a ready PR, take the run id from the verdict
|
|
|
39
39
|
|
|
40
40
|
`verdict` reads only the `test` row of ci.yml pull_request runs. A `full-decided` verdict with auto-merge armed does not prove that every ruleset-required context exists on the head: a context owned by another workflow can be absent for good (for example `cla-evidence`, whose `pull_request_target` run was cancelled during a push), `gh pr checks` lists only checks that exist, and the PR sits un-enqueued. Run the read-only set check `ci-head-verdict.sh required PR_NUMBER` on a READY PR whose verdict is `full-decided` (a draft PR has `test` failed by design and `verdict` answers `n/a`; the script does not enforce this) once both probes below hold:
|
|
41
41
|
|
|
42
|
-
- armed: `gh pr view PR_NUMBER --json autoMergeRequest --jq '.autoMergeRequest'` prints something other than `null`.
|
|
42
|
+
- armed: `gh pr view PR_NUMBER --json autoMergeRequest --jq '.autoMergeRequest'` prints something other than `null`. Caveat (#11789): a PR already IN the merge queue reads `null` here too — the queue owns the merge, so `autoMergeRequest` alone never classifies armed/disarmed. `null` only means disarmed when `--queue-state` (the next probe) says `not_queued`/`dequeued`; on a `queued` answer the PR is armed through the queue, do not re-arm, and its own `armed` field is gated the same way.
|
|
43
43
|
- not in the merge queue: `bash "${CLAUDE_PLUGIN_ROOT}/scripts/sync-pr-behind.sh" PR_NUMBER --queue-state` prints `not_queued` (its form is `<queued|not_queued|dequeued> <state> <armed|disarmed> removal=<reason|none>`) and still does after about 10 minutes. A `dequeued` print is a different case: use [merge-queue-dequeue.md](${CLAUDE_PLUGIN_ROOT}/skills/ship/references/merge-queue-dequeue.md), and note that printing it consumes its marker, so read it once and act on it. Exit 4 (`kind=gh`, "queue state unknown") is neither `queued` nor `not_queued`: treat the queue state as UNKNOWN, retry once, and if it is still exit 4 report it with the `required` marker; never read it as `not_queued`.
|
|
44
44
|
|
|
45
45
|
Spend the 10 minutes the sanctioned way: a foreground `sleep` is blocked by the Bash tool, and a `run_in_background` poll loop is forbidden for CI and PR-merge polling (rule `hr-monitor-not-run-in-background-for-polling` in `AGENTS.rules.md`: use the Monitor tool). So watch with the Monitor tool (an until-loop over the `--queue-state` command above that ends when it prints anything other than `not_queued`, with a 10-minute timeout), or, when you cannot hold the session that long, end your turn by reporting the marker and a resume time (now plus 10 minutes) instead of waiting.
|