@feigi/fleet-ctl 3.24.38 → 3.24.40

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feigi/fleet-ctl",
3
- "version": "3.24.38",
3
+ "version": "3.24.40",
4
4
  "description": "Agent fleet: run-team controller, merge bot, PR reviewer, and the ticket pipeline they share",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -167,7 +167,7 @@ const EXCLUDE =
167
167
  //
168
168
  // `after` is an inline label only, because `## After the migration` is
169
169
  // ordinary narrative and arming on it invents a blocker, while a heading that
170
- // really does declare one (`## After #12 lands`) still resolves through the
170
+ // really does declare one (`## After #N lands`) still resolves through the
171
171
  // inline pass below. The flag clears at ANY following heading (blocking or
172
172
  // not); inside such a section only LIST-ITEM lines are read — that is the
173
173
  // `## Blocked by` + list form to-tickets publishes, and the restriction is
@@ -177,7 +177,7 @@ const EXCLUDE =
177
177
  // queue. Independently, any line — inside a section or not — carrying the
178
178
  // phrase, then any run of whitespace and asterisks around an optional `:`,
179
179
  // then one or more `#N` refs on that same line is read too — to-tickets'
180
- // local-file `**Blocked by:** #12`, the markdown `Blocked by **#179**` that
180
+ // local-file `**Blocked by:** #N`, the markdown `Blocked by **#N**` that
181
181
  // bolds the REF, and the bare `depends on #5` are all instances of that one
182
182
  // match. The separator is a combined `[\s*]*` run rather than asterisk groups
183
183
  // flanking the colon: those groups sat ahead of the separating whitespace, so
@@ -196,10 +196,10 @@ const EXCLUDE =
196
196
  // suite's dependency-forms fixtures, not only the system jq the
197
197
  // STUB there execs. The engines now agree on every one of those forms,
198
198
  // including the ones that used to split. The separator is `[\t \p{Zs}*]*`
199
- // and not `[\s*]*`, so `Blocked by:<U+00A0>#12` collects `[12]` under BOTH
200
- // engines where it used to collect `[12]` under Oniguruma and `[]` under RE2
199
+ // and not `[\s*]*`, so `Blocked by:<U+00A0>#N` collects `[N]` under BOTH
200
+ // engines where it used to collect `[N]` under Oniguruma and `[]` under RE2
201
201
  // — the ref is ruled a real blocker, because GFM renders that line as
202
- // `Blocked by: #12` and autolinks the ref, so a reader sees a dependency and
202
+ // `Blocked by: #N` and autolinks the ref, so a reader sees a dependency and
203
203
  // an admission gate must not miss one. Since no fixture splits any more, the
204
204
  // gated tests can no longer identify their engine by disagreement: the STUB
205
205
  // records which binary it executed and they assert that recording is gojq.
@@ -272,7 +272,7 @@ const EXCLUDE =
272
272
  // admits end-of-line, `\r?` admits the same position just before a
273
273
  // CRLF line's trailing `\r` (the one `split("\n")` leaves behind).
274
274
  // list-item indent and marker gap — `[ \t]*` … `[ \t]`
275
- // Same GFM rule one level down: `-<U+00A0>#12` and `-<FF>#12` render as
275
+ // Same GFM rule one level down: `-<U+00A0>#N` and `-<FF>#N` render as
276
276
  // paragraphs, so neither is a bullet and neither declares a blocker.
277
277
  // end of a heading line — `[\t\f\r \p{Zs}]*` before the anchor
278
278
  // `armed`'s `dependenc(?:y|ies)` arm and the `spec` predicate. Padding a
@@ -281,13 +281,13 @@ const EXCLUDE =
281
281
  // keeps CRLF bodies working; VERTICAL TAB stays EXCLUDED, because GFM
282
282
  // renders it as U+FFFD and a replacement character is not blank.
283
283
  // inline label/ref separators — `[\t\f\r \p{Zs}*]*`
284
- // `Blocked by:<U+00A0>#12` renders as `Blocked by: #12` and GitHub
284
+ // `Blocked by:<U+00A0>#N` renders as `Blocked by: #N` and GitHub
285
285
  // autolinks the ref, so a reader sees a blocker — and an admission gate
286
286
  // must not be the one thing that misses it. Matches the end-of-heading
287
287
  // -line class above for the same reasons and the same characters:
288
288
  // `\f` is stripped by GFM, `\r` keeps CRLF bodies working. Missing
289
289
  // either one here silently drops a chained ref (`Blocked by
290
- // #12,\f#13` losing `#13`) — the opposite, worse direction from the
290
+ // #M,\f#N` losing `#N`) — the opposite, worse direction from the
291
291
  // over-collection above: an admission gate must never MISS a blocker.
292
292
  // every digit run — `[0-9]`
293
293
  // Arabic-Indic digits are not refs anyone is trying to support, and this
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
- # Delete a merged PR's head branch from `origin` (#2196). The merge bot owns
2
+ # Delete a merged PR's head branch from `origin`. The merge bot owns
3
3
  # this step: run-merge-bot.md's step 4 calls it after the merge is confirmed.
4
- # Until #2196 nothing did — the fleet leaned on the repo setting "Automatically
4
+ # Until this script nothing did — the fleet leaned on the repo setting "Automatically
5
5
  # delete head branches", which nothing here enforced or checked, so a repo with
6
6
  # it off accumulated every merged branch, and reap.sh (which reaps only a local
7
7
  # branch whose upstream is `[gone]`) never saw one to reap.
@@ -10,7 +10,7 @@
10
10
  # post-merge LOCAL cleanup dies with `fatal: 'main' is already used by worktree
11
11
  # at <path>` whenever the head branch is checked out in a git worktree, and every
12
12
  # fleet-claimed ticket's branch is, by construction
13
- # (`.worktrees/<issue>-<slug>`, docs/requirements.md §3.2). This script runs no
13
+ # (`.worktrees/<issue>-<slug>`). This script runs no
14
14
  # local branch or worktree command at all: it deletes the ref on `origin`, which
15
15
  # leaves the local branch `[gone]` with its worktree still on disk — exactly the
16
16
  # state reap.sh already reaps, worktree first and branch second. So the local
@@ -29,7 +29,7 @@
29
29
  # push — the repo still has auto-delete on, or a re-run — is the same success:
30
30
  # the outcome this step exists for already holds.
31
31
  #
32
- # KEPT while another open PR uses the branch (#2295). Deleting a branch closes
32
+ # KEPT while another open PR uses the branch. Deleting a branch closes
33
33
  # every open PR headed by it, and may close rather than retarget every open PR
34
34
  # based on it — GitHub retargets stacked PRs when IT deletes a merged head, and
35
35
  # nobody has observed whether a push-delete triggers the same. So just before
@@ -94,8 +94,9 @@ esac
94
94
  # entirely — the exact "commits close nothing" misreading the label scan
95
95
  # below already guards against. `awk '{print $0+0}'` strips any
96
96
  # leading zeros before the final sort, so a
97
- # commit-message "#007" reaches the JSON payload below as the bare,
98
- # valid-JSON integer `7` — and correctly dedupes against a plain `7` named
97
+ # zero-padded commit-message ref (`007` after its `#`) reaches the JSON
98
+ # payload below as the bare, valid-JSON integer `7` — and correctly dedupes
99
+ # against a plain `7` named
99
100
  # by the other signal.
100
101
  if union=$(printf '%s\n%s\n' "$issues" "$commit_issues" | grep -Eo '[0-9]+'); then
101
102
  union_rc=0
@@ -341,7 +341,7 @@ export function actionable(rows) {
341
341
  export class LedgerError extends Error {}
342
342
 
343
343
  // A row's PR is its first `PR#<n>` mention — ledger.mjs rowPr()'s reading, so
344
- // both the `→ PR#346` arrow and a settled `impl-324=PR#346` name it. A row
344
+ // both the `→ PR#<n>` arrow and a settled `impl-<N>=PR#<n>` name it. A row
345
345
  // with none is keyed by the PR's own number when it is about a PR at all (a PR
346
346
  // this run's implementers did not open) — this is ledger.mjs's
347
347
  // memberRowIndex() fallback specifically, which gates on the member being
@@ -571,7 +571,7 @@ export function deriveRun({ rows, dispatched, drain }, prs, closed = new Set(),
571
571
  // `reviewed=` — one read while no hold stood unresolved. The one read
572
572
  // while a hold did is the conflict fix-applier `ledger.mjs dispatch` named
573
573
  // a `fleet-implementer-<cell>`: it rebases and never sees the review file,
574
- // so it clears the hold and answers no survivor. Each fix-applier
574
+ // so it clears the hold and answers no finding. Each fix-applier
575
575
  // does one of those jobs once, so its landing folds once per PR
576
576
  // (`fixLanded`), however many copies of its token the rows carry.
577
577
  // `fixMembers`: every fix-applier on this PR, wherever its token sits —
@@ -601,7 +601,7 @@ export function deriveRun({ rows, dispatched, drain }, prs, closed = new Set(),
601
601
  const t = parseToken(tok);
602
602
  if (t) {
603
603
  note(t, where, pr);
604
- // A settled `failed`/`killed` fix-applier leaves survivors or a
604
+ // A settled `failed`/`killed` fix-applier leaves review findings or a
605
605
  // conflict unfixed and no successor dispatched — the PR stays fix-due
606
606
  // for a `-b` replacement. Only a live attempt, or one that actually
607
607
  // landed (`applied:`/`no-op`), holds it off. Read the outcome off the
@@ -613,7 +613,7 @@ export function deriveRun({ rows, dispatched, drain }, prs, closed = new Set(),
613
613
  // must not un-settle what actually landed. Which job a landed one did
614
614
  // is read off where its token sits:
615
615
  // after an unresolved hold it was the conflict fix-applier and clears
616
- // that hold; otherwise it answered the latest review's survivors. A
616
+ // that hold; otherwise it answered the latest review's findings. A
617
617
  // hold reopens `conflictOpen` below and a `reviewed=` resets
618
618
  // `reviewFixed`, so only a fix-applier after the latest of each ever
619
619
  // counts. Only ONE copy says where: the first in-place settled one,
@@ -621,7 +621,7 @@ export function deriveRun({ rows, dispatched, drain }, prs, closed = new Set(),
621
621
  // folding again would land the one member twice: a stale bare copy
622
622
  // after the hold its member's in-place copy preceded clearing that
623
623
  // hold, or a second copy after the first cleared the hold answering
624
- // survivors the conflict fix-applier never read. Liveness is not read
624
+ // findings the conflict fix-applier never read. Liveness is not read
625
625
  // here at all: a bare copy read before a later row settles its member
626
626
  // reads unsettled at that point, so `fixMembers` is judged once every
627
627
  // row has been read. A copy reaching this branch has just been
@@ -772,15 +772,16 @@ export function deriveRun({ rows, dispatched, drain }, prs, closed = new Set(),
772
772
  // The in-flight reviews of PRs the open list does not carry: the ones
773
773
  // `finished` could retire, so the caller asks gh about these and no others.
774
774
  reviewsOffList: reviewing.filter(([n]) => !open.has(n)).map(([n]) => n).sort(asc),
775
- // A returned review whose survivors no review fix-applier has answered,
776
- // a conflict hold no fix-applier has cleared, or a dispositions mismatch
777
- // no retry has answered — on a PR still open, with no fix-applier working
778
- // it and no newer review running. The first two are answered apart
779
- // here: a landed conflict fix-applier lifts the hold and leaves
780
- // survivors it never read due for a review one.
775
+ // A returned review whose survived or unverified findings no review
776
+ // fix-applier has answered — `ledger.mjs dispatch` refuses a finisher
777
+ // on either until one has — a conflict hold no fix-applier has cleared,
778
+ // or a dispositions mismatch no retry has answered — on a PR still open,
779
+ // with no fix-applier working it and no newer review running. The first
780
+ // two are answered apart here: a landed conflict fix-applier lifts the
781
+ // hold and leaves findings it never read due for a review one.
781
782
  fixDue: [...byPr.entries()]
782
783
  .filter(([n, st]) => open.has(n)
783
- && ((st.survived > 0 && !st.reviewFixed) || conflictHeld(st) || mismatchDue(st))
784
+ && (((st.survived > 0 || st.unverified > 0) && !st.reviewFixed) || conflictHeld(st) || mismatchDue(st))
784
785
  && !fixRunning(st) && !st.inFlight)
785
786
  .map(([n]) => n).sort(asc),
786
787
  // Open, not signed off, closing an issue (GitHub's own linked set — a
@@ -1602,8 +1602,8 @@ function rowKey(r) {
1602
1602
  return r.split(/\s/)[0];
1603
1603
  }
1604
1604
 
1605
- // A row's PR is its first `PR#<n>` mention: the `→ PR#346` arrow or the
1606
- // implementer's settled `impl-324=PR#346` token, which name the same PR.
1605
+ // A row's PR is its first `PR#<n>` mention: the `→ PR#<n>` arrow or the
1606
+ // implementer's settled `impl-<N>=PR#<n>` token, which name the same PR.
1607
1607
  // compute-board.mjs parseRow() reads the settled token, so the row a
1608
1608
  // PR-bound member lands on is the card the cockpit shows that PR on.
1609
1609
  function rowPr(r) {
@@ -1827,8 +1827,8 @@ function runDispatch() {
1827
1827
 
1828
1828
  function runSettle() {
1829
1829
  const usage = "usage: ledger.mjs settle <member> <outcome>";
1830
- // `settle impl-412 PR#420`, or the one token it writes — `settle
1831
- // impl-412=PR#420` — which is how the spec's record-before-tick table
1830
+ // `settle impl-<N> PR#<n>`, or the one token it writes — `settle
1831
+ // impl-<N>=PR#<n>` — which is how the spec's record-before-tick table
1832
1832
  // spells every settlement.
1833
1833
  if (!(rest.length === 2 || (rest.length === 1 && rest[0].includes("=")))) die(usage);
1834
1834
  refuseStrayInId(rest[0], "a member name");
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // Main-checkout dirty detection (#2210) — the backstop behind #1411's
2
+ // Main-checkout dirty detection — the backstop behind the
3
3
  // member-write-guard. The guard refuses a member's `write`/`edit` into the
4
4
  // main checkout before it runs; it cannot see an `eval` cell (the shared
5
5
  // kernel's cwd IS the main checkout, and `eval` takes no cwd), `bash` command
@@ -19,11 +19,12 @@
19
19
  // hash that changes: `dirty`.
20
20
  //
21
21
  // THE PROTECTED SET is exactly the non-ignored paths of the main checkout —
22
- // what #1411's guard protects. `.fleet/`, `.worktrees/` and `.agent-brain/`
23
- // are gitignored in a fleet repo, so run state, members' worktrees and
24
- // agent-brain's cache never appear in porcelain and never trip this.
22
+ // what the member-write-guard protects. `.fleet/`, `.worktrees/` and
23
+ // `.agent-brain/` are gitignored in a fleet repo, so run state, members'
24
+ // worktrees and agent-brain's cache never appear in porcelain and never trip
25
+ // this.
25
26
  // Explicit `-uall`, never bare `--porcelain`: `status.showUntrackedFiles=no`
26
- // silences untracked files otherwise (#730).
27
+ // silences untracked files otherwise.
27
28
  //
28
29
  // THE RUN'S OWN BOOKKEEPING IS NOT A STRAY WRITE. Two tracked files in the
29
30
  // main checkout are written by the controller itself mid-run:
@@ -48,7 +49,7 @@
48
49
  // absent — no baseline at all: the run never recorded one. A refusal
49
50
  // ("record at run start"), never `clean`.
50
51
  //
51
- // RE-BASELINING OVERWRITES, IT DOES NOT COMPARE (#1058). `--record` writes
52
+ // RE-BASELINING OVERWRITES, IT DOES NOT COMPARE. `--record` writes
52
53
  // whatever the tree looks like now, so it is the maintainer's clear only
53
54
  // AFTER the stray paths are resolved. Over `unknown` it would walk the run
54
55
  // from "could not look" to "certified clean" in one step, so it refuses on
@@ -59,7 +60,7 @@
59
60
  // (git-env.mjs's `workspaceDirFromGitCommonDir`, as fleet-tick.mjs resolves
60
61
  // the shortlist) — never `--show-toplevel`, which answers a WORKTREE's root
61
62
  // from inside one — and every git child gets `gitEnv()`, so an ambient
62
- // GIT_DIR/GIT_WORK_TREE cannot answer for another repository (#1599).
63
+ // GIT_DIR/GIT_WORK_TREE cannot answer for another repository.
63
64
  //
64
65
  // CLI:
65
66
  // main-checkout.mjs --record write the baseline (Phase 0; or the
@@ -88,7 +89,7 @@ const NAME = "main-checkout";
88
89
  const die = makeDie(NAME);
89
90
 
90
91
  // The one git primitive. `gitEnv()` drops an ambient GIT_DIR/GIT_WORK_TREE
91
- // (#1599); LC_ALL=C keeps a failure's last line readable as git wrote it.
92
+ // and LC_ALL=C keeps a failure's last line readable as git wrote it.
92
93
  // `what` names the call in a failure, since `why` is printed to the operator.
93
94
  function git(what, args, cwd, env) {
94
95
  const r = spawnSync("git", args, {
@@ -168,7 +169,7 @@ export function formatBaseline(entries) {
168
169
  * `{status: "unreadable", why}`. ABSENT is only "nothing at that name": a
169
170
  * dangling symlink is present-but-broken, and an unsearchable `.fleet/`
170
171
  * answers EACCES rather than ENOENT, so neither can fall through to
171
- * "no baseline" (#1058's mislabel) — both are `unreadable`.
172
+ * "no baseline" (a mislabel this once made) — both are `unreadable`.
172
173
  */
173
174
  export function readBaseline(path) {
174
175
  let text;
@@ -262,7 +263,7 @@ export function describe(check, live = null) {
262
263
  /**
263
264
  * Write the baseline: `{ok, path, entries}` or `{ok: false, why}`. Refuses
264
265
  * over a baseline that exists but cannot be read — overwriting it blind
265
- * discards evidence nobody read (#1058) — and on any failed read of the tree.
266
+ * discards evidence nobody read — and on any failed read of the tree.
266
267
  * Written to a temporary name and renamed, so a reader never sees half of it.
267
268
  */
268
269
  export function recordBaseline({ cwd = process.cwd(), env = process.env } = {}) {
@@ -1,6 +1,6 @@
1
- // The fleet's member write boundary, enforced (#1411, ADR 0020). An omp
1
+ // The fleet's member write boundary, enforced. An omp
2
2
  // extension: `plugin/package.json#omp.extensions` names this file, and a
3
- // native install (link/npm — ADR 0021; a marketplace cache install loads it
3
+ // native install (link/npm; a marketplace cache install loads it
4
4
  // the same way) loads it into every omp session on the box — the
5
5
  // controller's, every member's, and every unrelated session's — rebinding the
6
6
  // factory below into each subagent session the `task` tool spawns.
@@ -32,7 +32,8 @@
32
32
  // says it is not ignored. `.worktrees/`, `.fleet/` and `.agent-brain/` are
33
33
  // ignored in a fleet repo, so worktrees, run state and agent-brain's cache
34
34
  // stay writable, and what is protected is exactly what the main
35
- // checkout's `git status` would show dirty (#2210 watches the same set).
35
+ // checkout's `git status` would show dirty (main-checkout.mjs watches the
36
+ // same set).
36
37
  // - `bash` cwd, for every `fleet-implementer-<cell>` (ledger-grammar.mjs's
37
38
  // `CELL_DEF`), and for a fix-applier's own id (`fix-pr-<n>`) directly,
38
39
  // since a review fix-applier is a generic `task`: refuse when
@@ -44,7 +45,7 @@
44
45
  // none of them gets this rule.
45
46
  // Never a rewrite: a refusal names the resolved path and tells the member to
46
47
  // re-issue it absolute under its worktree. Relative READS and `eval` are not
47
- // guarded here; #2210's detection covers `eval`.
48
+ // guarded here; main-checkout.mjs's dirty detection covers `eval`.
48
49
  //
49
50
  // WHEN IT CANNOT DECIDE. A cwd outside any git repository is allowed — there
50
51
  // is no main checkout to protect. A git that fails while resolving the main
@@ -58,7 +59,7 @@
58
59
  // `workspaceDirFromGitCommonDir`, as `fleet-tick.mjs` resolves the run's
59
60
  // workspace) — never `--show-toplevel`, which answers a WORKTREE's root from
60
61
  // inside one — and every git child gets `gitEnv()`, so an ambient GIT_DIR
61
- // cannot answer for another repository (#1599).
62
+ // cannot answer for another repository.
62
63
  //
63
64
  // Zero deps: node builtins and sibling scripts only.
64
65
 
@@ -202,7 +203,7 @@ export async function decide({ toolName, input, cwd, agent, mainRoot, isIgnored,
202
203
 
203
204
  // The one git primitive, async so a guarded call never stalls the other
204
205
  // sessions sharing omp's process. `gitEnv()` drops an ambient GIT_DIR /
205
- // GIT_WORK_TREE (#1599); LC_ALL=C keeps "not a git repository" matchable.
206
+ // GIT_WORK_TREE, and LC_ALL=C keeps "not a git repository" matchable.
206
207
  function git(args, cwd) {
207
208
  return new Promise((done) => {
208
209
  let stdout = "";
@@ -21,7 +21,7 @@
21
21
  // 2 input error — nothing is written
22
22
  //
23
23
  // The exit status is the guard's carrier: the verdict never lives only in
24
- // prose. The router (not in the tree yet; ADR 0016) is to read the file, and
24
+ // prose. The router (not in the tree yet) is to read the file, and
25
25
  // fleet-tick's `router` row prints it today; a missing or unparseable file
26
26
  // means the default cell only, so deleting it cannot evade the guard.
27
27
  //
@@ -252,9 +252,9 @@ esac
252
252
  # and its unpushed commit go at exit 0, "released":true, no blockers.
253
253
  # Measured on a real bare-origin fixture; `git rev-parse origin/main` prints the
254
254
  # tag's OID under git's own `refname 'origin/main' is ambiguous` warning, which
255
- # nothing here reads. Pre-#760 `-d` refused this ("not fully merged") — the
256
- # guards were already vacuous under it, so `-d` was the sole backstop, and this
257
- # is the one class its removal reopened.
255
+ # nothing here reads. The `-d` delete this script once used refused this
256
+ # ("not fully merged") — the guards were already vacuous under it, so `-d` was
257
+ # the sole backstop, and this is the one class its removal reopened.
258
258
  #
259
259
  # The fix is to stop MEASURING against a shorthand: the accept-list already
260
260
  # establishes $base names a remote-tracking ref, so qualify it to the full
@@ -1518,7 +1518,7 @@ if [ -n "$wt" ] && [ -d "$wt" ]; then
1518
1518
  fi
1519
1519
  # Ignored files are deliberately not a blocker: the runner claim-ticket.sh
1520
1520
  # writes into a claimed worktree is excluded (ignored) there, and older
1521
- # checkouts hold a `.gitignore`'d `.agent-test.sh` from the pre-ADR-0015
1521
+ # checkouts hold a `.gitignore`'d `.agent-test.sh` from a since-replaced
1522
1522
  # bootstrap, so blocking on ignored files would strand every
1523
1523
  # claim. `git worktree remove` deletes ignored files
1524
1524
  # silently and refuses on modified and untracked ones (verified, git 2.50.1) —
@@ -351,7 +351,7 @@ function fitTickets({ features, members, verdicts, window, cutoff }) {
351
351
  if (UNBOOKED(name)) continue;
352
352
  if (!(keys.has(`${mr.session}\0${mr.agent}`) || mr.ticket === ticket || (verdict && verdict.pr && mr.pr === verdict.pr))) continue;
353
353
  booked++;
354
- // `cost` is a priced member-outcomes column (#2132); a row without it makes
354
+ // `cost` is a priced member-outcomes column; a row without it makes
355
355
  // the ticket's $ unknown, so the fit adopts nothing off a TSV that lacks the column.
356
356
  if (mr.cost === undefined || mr.cost === "" || !Number.isFinite(Number(mr.cost))) costKnown = false;
357
357
  else cost += Number(mr.cost);
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- // Writer and checker for docs/metrics/tier-outcomes.tsv (#2207, split off
3
- // #1398). The `tier` column used to be typed by hand from what the controller
4
- // MEANT to dispatch and was never compared with what ran: #1445 and #1446 say
5
- // `opus` for two implementers dispatched as a generic `task` that ran
2
+ // Writer and checker for docs/metrics/tier-outcomes.tsv. The `tier` column
3
+ // used to be typed by hand from what the controller
4
+ // MEANT to dispatch and was never compared with what ran: two rows said
5
+ // `opus` for implementers dispatched as a generic `task` that ran
6
6
  // sonnet/high, which is neither tier arm.
7
7
  //
8
8
  // append <pr> --closed-own-ticket yes|no --minted-false-claim yes|no
@@ -37,9 +37,9 @@
37
37
  // `impl-<N>=tier-mismatch` outcome, tier-check.mjs's main path for a mismatch
38
38
  // caught while the member is still live.
39
39
  //
40
- // Values are definition SHORT NAMES (ADR 0011: never a vendor family):
40
+ // Values are definition SHORT NAMES, never a vendor family:
41
41
  // `fleet-implementer` is `default`, `fleet-implementer-<x>` is `<x>` (`alt`,
42
- // or a #2030 per-cell name). Rows dated before TIER_SWITCH_DATE hold the old
42
+ // or a per-cell name). Rows dated before TIER_SWITCH_DATE hold the old
43
43
  // `opus`/`sonnet` spelling and are never checked; the header records the
44
44
  // switch and how the old values map.
45
45
  //
@@ -67,7 +67,7 @@ const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url));
67
67
  const LEDGER_SCRIPT = join(SCRIPT_DIR, "ledger.mjs");
68
68
 
69
69
  // ---------------------------------------------------------------------------
70
- // pure core — exercised through the CLI by tier-outcomes.test.mjs; only
70
+ // pure core — exercised through the CLI by its tests; only
71
71
  // COLUMNS, LEGACY_WIDTH, TIER_SWITCH_DATE, parseTierOutcomes, rulingsByTicket,
72
72
  // rulingFor and lastPullByTicket are imported directly, the rest through argv
73
73
  // ---------------------------------------------------------------------------
@@ -94,7 +94,7 @@ export const VERDICT = Object.freeze(["yes", "no"]);
94
94
  export const VERDICT_COLUMNS = Object.freeze(["closed_own_ticket", "minted_false_claim"]);
95
95
 
96
96
  // `fleet-implementer` -> `default`, `fleet-implementer-<x>` -> `<x>`, anything
97
- // else (a generic `task`, a blank pre-#1066 subagent_type) -> null.
97
+ // else (a generic `task`, a blank subagent_type on an older row) -> null.
98
98
  export function shortName(definition) {
99
99
  const d = String(definition ?? "");
100
100
  if (d === BASE_DEFINITION) return "default";
@@ -51,10 +51,10 @@ const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url));
51
51
  // process access below this line until main()
52
52
  // ---------------------------------------------------------------------------
53
53
 
54
- // Role names in print order — a fixed list, not derived from anything: ADR
55
- // 0014 retired the tier->role map this used to come from (OMP_ROLE_FOR_MODEL
56
- // with its opus/sonnet/haiku keys), and the fleet only ever names these
57
- // three roles.
54
+ // Role names in print order — a fixed list, not derived from anything: making
55
+ // omp the only harness retired the tier->role map this used to come from
56
+ // (OMP_ROLE_FOR_MODEL with its opus/sonnet/haiku keys), and the fleet only
57
+ // ever names these three roles.
58
58
  const ROLE_ORDER = ["slow", "task", "smol"];
59
59
 
60
60
  const MODEL_ROUTE_RE = /^@(slow|task|smol):(minimal|low|medium|high|xhigh|max)$/;
@@ -1521,8 +1521,8 @@ owes beyond its row:
1521
1521
  whichever point the ticket fails them.
1522
1522
  - **A review result lands** → see the result file written (by you or by the
1523
1523
  runner — **Reviewers** says which, per harness) and record `reviewed=` off its
1524
- digest, then run the tick: a PR with survivors prints as
1525
- `DISPATCH fix-pr PR#<M>`. Nothing survived and nothing to file → skip the
1524
+ digest, then run the tick: a PR with survived or unverified findings prints as
1525
+ `DISPATCH fix-pr PR#<M>`. No survived or unverified finding and nothing to file → skip the
1526
1526
  fix-applier and dispatch the **finisher** directly: no member will touch that
1527
1527
  PR, so no push is coming and nothing will wake you. A review that failed is
1528
1528
  not a result — **Reviewers** says who retries it and what takes over.
@@ -1643,7 +1643,7 @@ depth** guard table applied in code. Act on each line as it reads:
1643
1643
  blind until it can.
1644
1644
  - `SUGGEST /triage, hold idle` — nothing is admissible after the refresh.
1645
1645
  Suggest, never run (**Queue depth**).
1646
- - `DISPATCH fix-pr PR#<M> …` — a fix-applier per PR, for a review's survivors,
1646
+ - `DISPATCH fix-pr PR#<M> …` — a fix-applier per PR, for a review's survived or unverified findings,
1647
1647
  a dispositions mismatch no retry has answered, or a merge bot's `conflict-hold:#<M>` (**Reviewers**). Printed
1648
1648
  ahead of reviews on purpose: finishing what is started beats starting more.
1649
1649
  - `DISPATCH review PR#<M> …` — a review per PR, oldest first, off your turn
@@ -2125,7 +2125,8 @@ cap. A runner member that is killed rather than failed follows **Failure
2125
2125
  handling** (fresh name, inherited state stated).
2126
2126
 
2127
2127
  **Then dispatch a fix-applier** — on `DISPATCH fix-pr PR#<M>`, which the tick
2128
- prints for a PR whose `reviewed=` counts survivors that no review fix-applier
2128
+ prints for a PR whose `reviewed=` counts survived or unverified findings that
2129
+ no review fix-applier
2129
2130
  has landed `applied:`/`no-op` on since, with no fix-applier live on it — one
2130
2131
  named member per PR, `fix-pr-<pr#>` (the next suffix when that name is already
2131
2132
  on record), never the PR's
@@ -2156,7 +2157,7 @@ bring `<branch>` current with `origin/main`, resolving every conflict by
2156
2157
  head. Settle it `applied:<head>` — `no-op` if no conflict was left — which is
2157
2158
  what lifts the tick's merge hold; a dispatched-but-live one does not, and
2158
2159
  `failed`/`killed` leave the PR fix-due for a replacement. It answers the
2159
- hold and nothing else: survivors of a returned review the row also carries
2160
+ hold and nothing else: survived or unverified findings of a returned review the row also carries
2160
2161
  stay unanswered through its settle, so the tick prints `DISPATCH fix-pr
2161
2162
  PR#<M>` again once it lands, and that one — `dispatch` now prints `null` —
2162
2163
  is a review fix-applier, dispatched as above. The push moves the
@@ -2526,7 +2527,10 @@ latest `reviewed=` counts a survived or unverified finding, unless the
2526
2527
  dispositions verdict answering that review's head is `ok`**: among the
2527
2528
  `dispositions-*=fix-pr-<M>[-x]:<head>` tokens whose head matches it, the one
2528
2529
  from the highest-suffixed fix-applier. A PR whose latest review counts
2529
- `0/<n>/0` is not gated. The refusal names its cause. `dispositions
2530
+ `0/<n>/0` is not gated. One counting `0/<n>/<u>` with `<u>` above zero is
2531
+ gated like survivors, and the tick prints `DISPATCH fix-pr PR#<M>` for it: that
2532
+ fix-applier's `no-op` and its `ok` verdict are what open the finisher. The
2533
+ refusal names its cause. `dispositions
2530
2534
  unchecked` — no verdict answers that head: run `dispositions-check.mjs` for
2531
2535
  the fix-applier that answered the review, as the Fix-applier report edge
2532
2536
  states, then dispatch again. `dispositions mismatch` — no finisher: the tick
@@ -2975,7 +2979,8 @@ touch, and to read each corrected sentence literally, clause by clause. It then
2975
2979
  does the fix-applier's job too:
2976
2980
  apply, defer, file, push, report, exit. On its report, record
2977
2981
  `reviewed=<head>:0/<refuted>/<deferred>` against the head it pushed — it applied
2978
- its own survivors, so the zero is what tells the tick no fix-applier is owed —
2982
+ its own survivors, so the zero is what tells the tick no fix-applier is owed for
2983
+ them; a nonzero `<deferred>` is still fix-due, as any review's unverified band is —
2979
2984
  and it reaches a finisher through the same gate as any other PR.
2980
2985
 
2981
2986
  **Authorize the fan-out explicitly.** State that the full specialist set IS the