@feigi/fleet-ctl 3.158.39 → 3.160.0

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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: run-team
3
3
  description: Run an agent fleet — implementers, reviewers, one merge bot — over the ready-for-agent queue. Invoke-only; the fleet writes to a live repo and must never start unasked.
4
- argument-hint: "[in-flight] [cost|speed]"
4
+ argument-hint: "[in-flight] [cost|speed] [merge|no-merge]"
5
5
  disable-model-invocation: true
6
6
  ---
7
7
 
@@ -10,9 +10,8 @@ Label names in this file are roles; the Label map gives the string to type; a me
10
10
  Run `next-ticket`, `review-and-fix`, `run-merge-bot` as one fleet. You are the
11
11
  **controller**, in the main thread, never a member.
12
12
 
13
- `$ARGUMENTS` = `[in-flight] [cost|speed]`, both optional: the In-flight bound,
14
- a positive integer, default 5, and the Objective, default `cost`.
15
- Merge bot is at most one, not configurable.
13
+ `$ARGUMENTS` = `[in-flight] [cost|speed] [merge|no-merge]`, all optional: the In-flight bound, a positive integer, default 5, the Objective, default `cost`, and Merging, default `merge`.
14
+ Merge bot is at most one, none under `no-merge`.
16
15
 
17
16
  A rule ending `See references/<file>` keeps its war story there, read only for the *why*; a rule without that line carries its reasoning inline.
18
17
 
@@ -40,8 +39,8 @@ Nothing in this phase, or in any later one, asks the maintainer which tickets to
40
39
  0. **Once per run, before anything else.** Run phase 0 from a Python eval
41
40
  cell in this main checkout, without `--session`:
42
41
  `subprocess.run([os.path.expanduser("~/.omp/plugins/node_modules/@feigi/fleet-ctl/scripts/fleet-run"),
43
- "phase0.mjs", …], stderr=subprocess.STDOUT)`. Add `--in-flight <n>` and
44
- `--objective <o>` as `$ARGUMENTS` gave them, `--spend-dir <dir>` for the
42
+ "phase0.mjs", …], stderr=subprocess.STDOUT)`. Add `--in-flight <n>`,
43
+ `--objective <o>` and `--merge` or `--no-merge` as `$ARGUMENTS` gave them, `--spend-dir <dir>` for the
45
44
  spend panel, and `--workflow <name>` or `--declare-no-ci`
46
45
  when the repository has no workflow named CI. Its steps and receipt: See
47
46
  references/phase-0.md. Dispatch nothing before it exits 0. Exit 4 is a
@@ -167,8 +166,7 @@ owes beyond its call:
167
166
  on `DISPATCH merge-bot` dispatch the next `merge-bot-<n>` (**The merge bot**).
168
167
  **You own the watcher, not the bot.** Arm one yourself,
169
168
  `persistent: true`, seeded before the loop so handled PRs do not re-fire.
170
- **One rebase per PR, at merge time.** Any behind-count you hand a bot is
171
- expired on arrival; say so. See references/ci-and-staleness.md.
169
+ Under `no-merge` arm none. See references/ci-and-staleness.md.
172
170
  - **Merge-bot pass reports done** → `fleet-event.mjs merge-bot-report merge-bot-<n>`. A label that
173
171
  landed at the last moment reads `DISPATCH
174
172
  merge-bot` again: dispatch the next bot straight away. A conflict needs no
@@ -195,7 +193,7 @@ owes beyond its call:
195
193
  release the rest by hand and run `begin` again.
196
194
  2. Act on the review, fix-applier and merge rows until the tick prints
197
195
  `ACTION: run over → fleet-heartbeat.mjs --stop "<reason>"`, which it does
198
- once the run is draining with no open PR and no live implementer.
196
+ once a draining run has no PR holding it and no live implementer.
199
197
  3. `~/.omp/plugins/node_modules/@feigi/fleet-ctl/scripts/fleet-run closeout.mjs finish --reason "<reason>"`, which
200
198
  records `fleet-heartbeat.mjs --stop` and then merges the Close-out PR. On `NEED merge-wait PR #<n>`,
201
199
  run `finish` again at once. A PR it names `left open` is the next run's: you never label or merge it.
@@ -381,7 +379,7 @@ It prints `actual/target` and a named ACTION per role. Act on each line as it re
381
379
  - `specs-dropped=#<N> …` — never actionable: log those tickets as specs awaiting to-tickets, not as no work.
382
380
  - `DISPATCH fix-pr PR#<M> …` — a fix-applier for that PR (review findings, a dispositions mismatch no retry has answered, or a conflict hold): render its brief with `dispatch-prompt.mjs render fix-applier --kind <kind>`, `ledger.mjs dispatch <M> fix-pr-<M>` (the next suffix when that name is already on record), then the `task` call.
383
381
  - `DISPATCH review PR#<M> …` — a review per PR, oldest first, off your turn: record `review=member:review-pr-<M>` with `ledger.mjs review <M> …`, then dispatch `review-pr-<M>`.
384
- - `DISPATCH merge-bot` — the next `merge-bot-<n>`: render its brief with `dispatch-prompt.mjs render merge-bot --member merge-bot-<n> …`, `ledger.mjs dispatch merge-bot`, then the `task` call.
382
+ - `DISPATCH merge-bot` — the next `merge-bot-<n>` (**The merge bot**).
385
383
  - `DISPATCH finisher PR#<M> …` — a finisher settled `labelled` with no label on the PR and no `label-off=` to account for it: apply the finisher gate, render the next-suffix finisher's brief with `dispatch-prompt.mjs render finisher --kind repair --member finisher-pr-<M>-<x> …`, `ledger.mjs dispatch <M> finisher-pr-<M>-<x>`, and never add the label yourself.
386
384
  - `ESCALATE unlabelled PR#<M> …` — a second finisher settled `labelled` and the label is still off: not actionable, the maintainer's.
387
385
  - `CONFLICT PR#<M> …` — record the hold with `fleet-event.mjs conflict <M>`, never with the `ledger.mjs row` form; the tick then prints `DISPATCH fix-pr`.
@@ -390,6 +388,7 @@ It prints `actual/target` and a named ACTION per role. Act on each line as it re
390
388
  - `ESCALATE pr-closed #<N> PR#<M>`, `… pr-unchecked …` — the maintainer's: tell them once per ticket per run; no dispatch or comment for #N. Reopening M or closing #N clears it. Only `replace #N` (`NEED resume`, same row) or `release #N` (closed-PR `release-ticket.sh --apply`, settle `released`) acts, once no live member names M.
391
389
  - `HOLD (…)` — the row is held and its detail names the clearing step: dispatch nothing on that row until it clears; a tier mismatch is yours to clear by dispatching the replacement.
392
390
  - `AT CAP`, `IDLE OK` — nothing to do on that row.
391
+ - `IDLE (merging off)` — nothing to do on that row: the maintainer merges.
393
392
  - `MAIN-CHECKOUT-DIRTY …` — dispatch nothing new and tell the maintainer; once they have resolved the paths, `main-checkout.mjs --record`; never revert the paths or re-baseline over them yourself.
394
393
  - `MAIN-CHECKOUT-UNKNOWN …` — the tick could not look: fix what the line names and tick again, and never `--record` over it unless the line itself says re-record (an older-format baseline, or a baseline commit missing from this repository), and then only after resolving the stray paths.
395
394
  - `MAIN-CHECKOUT-NO-BASELINE …` — yours: run `main-checkout.mjs --record`, after reporting a baseline that vanished mid-run.
@@ -751,7 +750,7 @@ decides the rest — two resolve automatically, every other one escalates:
751
750
  | `rebase` | **Escalate** — comment and flag, nothing more. The report's `evidence.replay` reads `pure` only when `git range-diff origin/main <pin> HEAD` pairs every pinned commit with an unchanged one; `changed` (a commit dropped, edited or added, or a stale `origin/main`) or `unknown` means read `evidence.rangeDiff` before acting, and `evidence.remote.state` says whether that head is on the PR. No automatic rule until a live halt shows the case recurring. |
752
751
  | `stray` | **Escalate** — comment and flag; nothing pushes it automatically. Read `evidence.cherry`, `.content` and `.remote`. Push or discard is yours, or the maintainer's if they cannot settle it. A pushed stray is unreviewed: `ledger.mjs review <M>` first. |
753
752
  | `unreadable`, `missing`, `absent`, `other` | **Escalate** — comment and flag, no automatic retry. |
754
- | `human` | **Escalate** — no retry. A Ticketless PR whose diff is not inert: the maintainer labels it (references/finisher.md). |
753
+ | `human` | **Escalate** — no retry. A Ticketless PR whose diff is not inert: the maintainer labels it (references/finisher.md), or under `no-merge` merges it by hand. |
755
754
 
756
755
  ### Resolving a finisher that died
757
756
 
@@ -189,3 +189,4 @@ worktree has to happen first. **You own the watcher, not the bot.** Arm one
189
189
  yourself, `persistent: true`, seeded before the loop so handled PRs do not
190
190
  re-fire. **One rebase per PR, at merge time.** Any behind-count you hand a bot
191
191
  is expired on arrival; say so.
192
+ Under `no-merge` there is no bot, so arm no watcher.
@@ -1,5 +1,7 @@
1
1
  # Close-out: what each metrics step does and why
2
2
 
3
+ Label names in this file are roles; the Label map gives the string to type; a member never derives the map.
4
+
3
5
  `closeout.mjs finish` runs the scrape, the tier-outcomes check, the metrics refresh, the gather of the run records and the review evidence, the commit of the metrics and record files, and the phase-0 receipt move, and SKILL.md's **End of run** says how to drive it. This file is how each of those works, for the controller to read when a step refuses, and how `closeout.mjs reopen` undoes a drain. The verdict rules — what `closed_own_ticket` and `minted_false_claim` mean, and that a value not in hand is left blank — stay in SKILL.md under **Guard: accumulate per PR**, because the controller still rules them.
4
6
 
5
7
  - **The run ends, or the maintainer says drain** → `fleet-event.mjs drain --reason "<reason>"`
@@ -17,6 +19,10 @@
17
19
  2. Act on the review, fix-applier and merge rows until the tick prints
18
20
  `ACTION: run over → fleet-heartbeat.mjs --stop "<reason>"`, which it does
19
21
  once the run is draining with no open PR and no live implementer.
22
+ Under `no-merge` a PR carrying `ready-to-merge` holds nothing once GitHub reads it
23
+ MERGEABLE, no conflict hold stands on it and no finisher, fix-applier or review is
24
+ still at work on it: those PRs stay open for the maintainer, or for a later run's
25
+ phase 0 to fold in.
20
26
  3. `~/.omp/plugins/node_modules/@feigi/fleet-ctl/scripts/fleet-run closeout.mjs finish --reason "<reason>"` — scrapes
21
27
  the run's member facts, checks the tier-outcomes rows, refreshes the
22
28
  metrics, gathers the earlier runs' records and the review evidence,
@@ -392,6 +392,7 @@ as for a `past-pin` re-review below, before any finisher is dispatched.
392
392
  A `human` halt is a Ticketless PR whose diff is not inert: the maintainer adds
393
393
  `ready-to-merge` at the pinned head, which the merge bot merges off the
394
394
  finisher's `ready-to-merge-head:` comment; a moved head is merged by hand.
395
+ Under `no-merge` no bot runs: the maintainer merges it by hand, labelled or not.
395
396
 
396
397
  The tick prints `DISPATCH review PR#<M>` for a PR whose latest finisher is `halted:past-pin` and whose latest `reviewed=<head>` is not its current head, until a review of it is running or has returned; record that review's launch as any review's, with `ledger.mjs review <M>` onto the PR's row, its runner under the next letter the PR's rows do not carry yet (`review-pr-<M>-b`, or `-c` where a retry already took `-b`) — `review` refuses a second `review-pr-<M>` and names the free one — and its result, recorded by the `review-result` wake, reaches a fresh finisher through the same gate.
397
398
 
@@ -23,6 +23,17 @@ by it. It is fixed for the run: a resumed receipt keeps the one it records —
23
23
  other exits 2 naming both, leaving the receipt as it was. A resumed receipt
24
24
  recording anything other than `cost` or `speed` exits 3 naming the value.
25
25
 
26
+ `--merge` or `--no-merge` is whether the run's merge bot merges, which phase 0
27
+ records in its receipt as `merge: true` or `merge: false`, `true` when neither
28
+ is given; both together exit 2. With `no-merge` the fleet takes each PR as far
29
+ as `ready-to-merge` and the maintainer merges it: the tick dispatches no merge
30
+ bot, a draining run can be over with `ready-to-merge` PRs still open, and it reaps
31
+ after each PR it reads merged. It is fixed for the run: a resumed receipt keeps
32
+ the one it records — `merge` when it records none — and a resume that names the
33
+ other exits 2 naming both, leaving the receipt as it was. A resumed receipt
34
+ recording anything but `true` or `false` exits 3 naming the value. The tick
35
+ reads it from this receipt and from no flag of its own.
36
+
26
37
  Exit 3 is a step that failed: its line carries the refusal, so fix the cause
27
38
  and run it again.
28
39
 
@@ -250,7 +250,7 @@ terminating in exactly one dispatch or an empty shortlist:
250
250
  7. **Route, row, then dispatch** — `~/.omp/plugins/node_modules/@feigi/fleet-ctl/scripts/fleet-run ticket-router.mjs route
251
251
  --session <session> --ticket <N> --arm <A|B> --impl-row <k>[ --chain-head] --issue
252
252
  <scratch>/impl-<N>/issue.json --guard .fleet/cost-guard.json` prints the Pull's
253
- Routing, `POLICY=… CELL=… DRAW=… BY=… STRATUM=… BRIEF=… CRITERIA=… PARENT=… SIZED=… OBJECTIVE=… TRIPPED=… REASON=…`
253
+ Routing, `POLICY=… CELL=… DRAW=… BY=… STRATUM=… BRIEF=… CRITERIA=… PARENT=… SIZED=… OBJECTIVE=… TRIPPED=… UNRUNNABLE=… REASON=…`
254
254
  (the router's arguments paragraph below the list says what each argument is);
255
255
  then `ledger.mjs row <N> "<member>[ · tier=<CELL>]" --routing "<that line>"`,
256
256
  `<member>` the name the Pull printed, `tier=<CELL>` exactly when `DRAW` is not `-`, which writes the row and files
@@ -163,7 +163,21 @@ The full text of each row `fleet-tick.mjs` prints and what it asks of the contro
163
163
  caller's. `transcript`/`session` resolve relative to `--repo` (defaults to
164
164
  the plugin's own root), and the check reads and writes the run's own ledger
165
165
  unless `--ledger` names another.
166
+ With merging off the In-flight hold reads `HOLD (in-flight <n>/<B>, awaiting
167
+ human merge)`: the merge that brings n below B is the maintainer's, and
168
+ a replacement the detail names is still yours to dispatch.
166
169
  - `AT CAP`, `IDLE OK` — nothing to do on that row.
170
+ - `IDLE (merging off)` — the run's merge bot is off (`--no-merge`, which phase
171
+ 0 records in its receipt as `merge: false`), so the merge-bot row prints it
172
+ whatever the queue holds and never `DISPATCH merge-bot`. Nothing to do on
173
+ that row: the maintainer merges what carries `ready-to-merge`. Such a PR
174
+ still counts toward the In-flight bound until then, a `CONFLICT PR#<M> …`
175
+ line still reaches a fix-applier, and `tick --apply` reaps, reclaims and
176
+ evicts once after each PR the run tracks that gh reads MERGED. A draining
177
+ run is over with only `ready-to-merge` PRs open; one that GitHub has not
178
+ read MERGEABLE (CONFLICTING, or UNKNOWN until it answers), one a conflict
179
+ hold stands on, and one a finisher, fix-applier or review is still at work
180
+ on each still hold it.
167
181
  - `MAIN-CHECKOUT-DIRTY <paths> …`, printed above the rows, with every
168
182
  dispatching row (implementers, reviewers, merge-bot) reading
169
183
  `HOLD (main checkout dirty)` — the main checkout changed since the Phase 0
@@ -299,6 +313,8 @@ a guess is the over- or under-dispatch it exists to prevent — so correct that
299
313
  row with `ledger.mjs row` and tick again. The In-flight bound defaults to 5
300
314
  and is fixed for the run: pass `--in-flight` on every tick when `$ARGUMENTS`
301
315
  set it, and never otherwise.
316
+ Whether the merge bot merges is the phase-0 receipt's `merge`, `true` when it
317
+ records none, and never a flag of the tick's.
302
318
 
303
319
  ## Refresh is the tick's
304
320