@feigi/fleet-ctl 3.24.2 → 3.24.4

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,5 +1,4 @@
1
- // review-core.mjs — the review body for PR review (#1349, per #1303's ruling
2
- // on #1296). Read that ruling before touching this file.
1
+ // review-core.mjs — the review body for PR review.
3
2
  //
4
3
  // This file holds every host-independent declaration PR review needs: the
5
4
  // JSON schemas, `usableDiff`, `readRules`, `resolveTestCmd`,
@@ -22,15 +21,15 @@
22
21
  // `null`, which every guard here — `if (snap) {...}`, `unrunCrashed`,
23
22
  // `verdictFor` — is written against).
24
23
  //
25
- // Two imports. arg.mjs's isDigits(), added by #878: this file is an ordinary
24
+ // Two imports. arg.mjs's isDigits(): this file is an ordinary
26
25
  // module, so it consumes the repo's digits rule directly rather than
27
- // declaring its own copy. node:path's `posix`, added by #2323, to normalise a
26
+ // declaring its own copy. node:path's `posix`, to normalise a
28
27
  // scratch path before `runnerScratchRefusal` reads its last component.
29
28
  //
30
- // `.mjs`, not `.js` (#1763): this file was `review-core.js` until then, and
29
+ // `.mjs`, not `.js`: this file was once `review-core.js`, and
31
30
  // nothing that ships declares a `type`, so Node below 20.19.0/22.7.0 —
32
31
  // inside the declared consumer floor — read it as CommonJS and
33
- // review-eval.mjs's import of it failed. node-floor-sweep.test.mjs keeps a
32
+ // review-eval.mjs's import of it failed. A suite sweep keeps a
34
33
  // shipped `.mjs` from importing a relative module under any other extension.
35
34
 
36
35
  import { posix } from "node:path";
@@ -91,7 +90,7 @@ export const SNAPSHOT_SCHEMA = {
91
90
  path: { type: "string" },
92
91
  head: { type: "string" },
93
92
  pathVerified: { type: "boolean" },
94
- // #1056. `pathVerified` says the tree is THERE; this says the tree is
93
+ // `pathVerified` says the tree is THERE; this says the tree is
95
94
  // MEASURABLE — that the snapshot is a git repository holding the reviewed
96
95
  // commit's tree. Required for `pathVerified`'s reason: an omitted boolean
97
96
  // must not read as a verified environment, because the whole defect was a
@@ -111,7 +110,7 @@ export const SNAPSHOT_SCHEMA = {
111
110
  },
112
111
  };
113
112
 
114
- // #2315. What the review's one shared test run reports back. `command` and the
113
+ // What the review's one shared test run reports back. `command` and the
115
114
  // log path are NOT asked for: the caller handed both out, so it already knows
116
115
  // them, and an agent's echo of either could only disagree. Every count is
117
116
  // optional and stays absent when the log does not state it — an absent
@@ -133,7 +132,7 @@ export const TEST_RUN_SCHEMA = {
133
132
  };
134
133
 
135
134
  // --- Dimension catalog --------------------------------------------------
136
- // #1349, per #1303's gap 3: no dimension carries a `model`/`effort` field —
135
+ // No dimension carries a `model`/`effort` field —
137
136
  // dispatch tier lives ONLY in each fleet-owned agent definition's own
138
137
  // frontmatter. `agentType` is a bare frontmatter `name:` (omp's native
139
138
  // `agent()` lookup is an exact match on one).
@@ -174,14 +173,14 @@ export const DEFAULT_DIMENSIONS = [
174
173
  },
175
174
  ];
176
175
 
177
- // #2102: the omp `fleet-review-runner` agent definition's `spawns:`
176
+ // The omp `fleet-review-runner` agent definition's `spawns:`
178
177
  // frontmatter must allow exactly the agent types dispatched below (the
179
- // snapshot agent, the shared test run's agent (#2315), every
178
+ // snapshot agent, the shared test run's agent, every
180
179
  // DEFAULT_DIMENSIONS entry, and the verifier) — omp denies every spawn by
181
180
  // default, and the runner declared no `spawns` at all until this fix.
182
181
  // Exporting the three literal-only types (snapshot/test-run/verifier have no
183
182
  // DEFAULT_DIMENSIONS entry of their own) plus the derived full set lets
184
- // review-runner-spawns.test.mjs pin the frontmatter against what this file
183
+ // a test pin the frontmatter against what this file
185
184
  // actually dispatches, instead of a hand-copied list that can drift.
186
185
  export const SNAPSHOT_AGENT_TYPE = "fleet-review-snapshot";
187
186
  export const TEST_RUN_AGENT_TYPE = "fleet-review-test-run";
@@ -197,15 +196,17 @@ export const SPAWNED_AGENT_TYPES = [
197
196
  // computeStats owns both thresholds).
198
197
  export const SIZE_TIER_PROFILES = new Set(["single-file", "small"]);
199
198
  // The refuter-budget floor: `correctness`/`silent-failure` miss silently and
200
- // permanently; `comments` sits beside them for a different reason (#218).
199
+ // permanently; `comments` sits beside them because a comment-only edit to a
200
+ // code file classifies as `src`, never `docs`, and would otherwise get no
201
+ // comment review at all.
201
202
  // Keyed on recoverability of a MISS, never on tier — `verifiersFor` takes a
202
203
  // severity and nothing else.
203
204
  export const SIZE_TIER_DIMS = new Set(["correctness", "silent-failure", "comments"]);
204
205
 
205
206
  // The refuter budget per severity, derived once per run from the caller's
206
207
  // own `A.verifiers`/`A.verifiersBySeverity` overrides (or the defaults) and
207
- // bound to a `(severity) => count` closure — `select-dimensions.test.mjs`
208
- // imports this directly rather than re-deriving it from a lifted copy.
208
+ // bound to a `(severity) => count` closure — the suite imports this directly
209
+ // rather than re-deriving it from a lifted copy.
209
210
  export function verifiersFor(A) {
210
211
  const verifiers = A.verifiers || 2;
211
212
  const by = A.verifiersBySeverity || { critical: verifiers, important: verifiers, suggestion: 0 };
@@ -214,8 +215,8 @@ export function verifiersFor(A) {
214
215
 
215
216
  // --- Pure functions -------------------------------------------------------
216
217
  // Every function below was ported byte-identical (function body) from this
217
- // repo's retired pre-cutover review workflow script's own declaration, before
218
- // ADR 0014 retired that file — see this repo's git history for the full
218
+ // repo's pre-cutover review workflow script's own declaration, before that
219
+ // file was retired — see this repo's git history for the full
219
220
  // historical rationale on each; it is not repeated here to avoid a second
220
221
  // copy of PROSE disconnecting the way this repo's own "recurring pin defect"
221
222
  // comment warns a second copy of CODE does.
@@ -270,12 +271,12 @@ reads carried 434 KB.`;
270
271
 
271
272
  // The step a missing Test entrypoint is derived by, named in the refusal so the
272
273
  // caller — a controller or a reviewer — knows what to run rather than what went
273
- // wrong (ADR 0015). derive-testcmd.sh's refusals about the cache name the same
274
+ // wrong. derive-testcmd.sh's refusals about the cache name the same
274
275
  // step; its exit-3 refusals name an environment fault instead, which the caller
275
276
  // fixes rather than deriving. This one covers the case where the snapshot agent
276
277
  // reported no reason at all.
277
278
  const DERIVATION_STEP =
278
- "run the Recipe derivation step (run-team phase 0, before the first claim — ADR 0015) to derive, prove and write the Recipe cache";
279
+ "run the Recipe derivation step (run-team phase 0, before the first claim) to derive, prove and write the Recipe cache";
279
280
 
280
281
  export function resolveTestCmd(explicit, snap) {
281
282
  if (explicit) return explicit;
@@ -323,12 +324,12 @@ export function selectDimensions(all, stats) {
323
324
  // documents `args.dimensions` as accepting "keys or dimension objects" — but
324
325
  // until now only objects worked: a key array passed straight through and
325
326
  // every dereference below (`d.key`, `d.prompt`, `d.agentType` — three) came
326
- // back `undefined`, with no throw and no warning (#113). Resolve strings
327
+ // back `undefined`, with no throw and no warning. Resolve strings
327
328
  // against the workflow's own catalog, and check every object has the three
328
329
  // fields it REQUIRES AND that each of those is a string — presence alone let
329
330
  // a non-string field reach the specialist dispatch machinery downstream
330
331
  // instead of failing at this validated boundary. `model` is no longer a
331
- // fourth optional field (#1349): an override entry that still sends one is
332
+ // fourth optional field: an override entry that still sends one is
332
333
  // refused outright, loudly, rather than silently accepted and ignored — see
333
334
  // the check below.
334
335
  // Anything unresolvable stops the run and names what was not recognised — a
@@ -394,7 +395,7 @@ export function snapshotMissing(snap, runRootPrefix) {
394
395
  return null;
395
396
  }
396
397
 
397
- // #1056. What a suite run inside the snapshot is evidence ABOUT, in one
398
+ // What a suite run inside the snapshot is evidence ABOUT, in one
398
399
  // paragraph every specialist prompt and the returned payload both carry.
399
400
  //
400
401
  // `repoVerified` false is deliberately NOT a refusal (`snapshotMissing` says
@@ -434,7 +435,7 @@ validation of the tree: its counts are snapshot-measured, and a failure in it
434
435
  cannot be told apart from a regression.`;
435
436
  }
436
437
 
437
- // #2315. Every run-quality verdict below reads the review's ONE shared test
438
+ // Every run-quality verdict below reads the review's ONE shared test
438
439
  // run — `{command, logPath, exitCode?, tests?, pass?, fail?, cancelled?,
439
440
  // skipped?, error?}`, `command`/`logPath` the caller's own and the rest the
440
441
  // test-run agent's report — never a specialist's own run: no specialist runs
@@ -474,7 +475,7 @@ function failingDesc(run) {
474
475
  return run.cancelled ? `${run.fail || 0} failing and ${run.cancelled} cancelled tests` : `${run.fail} failing tests`;
475
476
  }
476
477
 
477
- // Failing tests are owned by the review as a whole (#2315): `findings` is
478
+ // Failing tests are owned by the review as a whole: `findings` is
478
479
  // every finding that reached the payload, and ONE from any dimension
479
480
  // satisfies the check for all — no dimension is asked to duplicate a
480
481
  // sibling's, and none is marked unrun because a sibling filed it. A refuted
@@ -509,7 +510,7 @@ function countsOf(run) {
509
510
  .join(", ");
510
511
  }
511
512
 
512
- // #2315. The Tests paragraph of every specialist prompt: the shared run's
513
+ // The Tests paragraph of every specialist prompt: the shared run's
513
514
  // command, counts, exit status and log path, in place of the instruction to
514
515
  // run the full suite that each specialist used to follow — one review was up
515
516
  // to six full sweeps of one immutable snapshot. `owner` is the one dimension
@@ -547,7 +548,7 @@ bears on your own lens.`,
547
548
  return lines.join("\n");
548
549
  }
549
550
 
550
- // #1433 gap: the CWD-AUDIT line the Review dispatch below asks a specialist
551
+ // The CWD-AUDIT line the Review dispatch below asks a specialist
551
552
  // to fold into `scope_searched` is a convention, not schema — FINDINGS_SCHEMA
552
553
  // accepts any string there, so a specialist that satisfies the schema while
553
554
  // never emitting the line, or misspelling it, produces a fully valid,
@@ -574,7 +575,7 @@ export function verdictFor(dispatched, votes) {
574
575
  return { verdict, votes: live, refutersDispatched: dispatched };
575
576
  }
576
577
 
577
- // #1802. One in-run re-dispatch for a crashed dispatch, before the result is
578
+ // One in-run re-dispatch for a crashed dispatch, before the result is
578
579
  // assembled — the specialist call and the refuter PAIR are the two units it
579
580
  // wraps. `crashed(value)` says whether a settled first attempt counts as a
580
581
  // crash; a THROWN first attempt is handed to it as `null`, because a
@@ -589,21 +590,21 @@ export function retryCrashed(dispatch, crashed) {
589
590
  .then(again, () => again(null));
590
591
  }
591
592
 
592
- // omp has no cached-replay mechanism (ADR 0004/0005, #1349 gap 1): a fresh
593
+ // omp has no cached-replay mechanism: a fresh
593
594
  // review re-dispatches every agent() live rather than only the crashed
594
595
  // legs, and the one re-dispatch this run gets was already spent in-run
595
- // (#1802) — a crashed finding is reported and deferred, never resumed.
596
+ // — a crashed finding is reported and deferred, never resumed.
596
597
  export function resumeFor(unverified) {
597
598
  const crashed = unverified.filter((f) => f.refutersDispatched > 0);
598
599
  if (!crashed.length) return { crashed, resume: null };
599
600
  const claim =
600
601
  "Findings in `unverified` with `refutersDispatched` above zero and no surviving vote had every refuter die, and die again on the in-run retry — nothing looked at them. ";
601
602
  const verb =
602
- "Defer them as crashed — reported, not acted on: omp's eval has no cached-replay mechanism (ADR 0004/0005, #1349 gap 1), so a fresh review re-dispatches every agent() live rather than only the crashed legs, and the in-run retry was this review's one re-dispatch. Re-run nothing for them.";
603
+ "Defer them as crashed — reported, not acted on: omp's eval has no cached-replay mechanism, so a fresh review re-dispatches every agent() live rather than only the crashed legs, and the in-run retry was this review's one re-dispatch. Re-run nothing for them.";
603
604
  return { crashed, resume: claim + verb };
604
605
  }
605
606
 
606
- // #1802. The digest: every field a controller acts on, and nothing bulky.
607
+ // The digest: every field a controller acts on, and nothing bulky.
607
608
  // The result object LEADS with exactly these keys, in this order
608
609
  // (`runReview`'s return below) — historically so the pre-cutover harness's
609
610
  // ~8 KB inline `<result>` cut landed in the finding arrays, never in the
@@ -621,18 +622,17 @@ export function digestOf(result) {
621
622
  return Object.fromEntries(DIGEST_KEYS.map((k) => [k, result[k]]));
622
623
  }
623
624
 
624
- // #1802. The digits refusal review-eval.mjs's `runReviewToFile` runs before
625
+ // The digits refusal review-eval.mjs's `runReviewToFile` runs before
625
626
  // its first attempt, so a dispatch mistake is refused once instead of being
626
627
  // retried and sent to the fallback reviewer. It lives here, not there, because
627
628
  // review-eval.mjs is a library and arg.mjs's `scripts/*.mjs` importers are its
628
- // CLI roster, each one probed to refuse a stray flag
629
- // (arg-header-probes-prose.test.mjs); this module already consumes the digits
630
- // rule on the review path. Null when `pr` is a PR number.
629
+ // CLI roster, each one probed to refuse a stray flag; this module already
630
+ // consumes the digits rule on the review path. Null when `pr` is a PR number.
631
631
  export function runnerPrRefusal(pr) {
632
632
  return isDigits(pr) ? null : `args.pr must be a PR number, got ${JSON.stringify(pr)}`;
633
633
  }
634
634
 
635
- // #2323. `runReview` owns the review side's `pr<N>/` partition — it appends
635
+ // `runReview` owns the review side's `pr<N>/` partition — it appends
636
636
  // `/pr${pr}` to the scratch it is given — so a scratch whose last component
637
637
  // is already `pr` plus digits is a caller that partitioned too, and its run
638
638
  // roots would nest at `<root>/pr<N>/pr<N>/run-*`, below the snapshot prompt's
@@ -662,7 +662,7 @@ export function runnerScratchRefusal(scratch) {
662
662
  // contract every guard below is written against), `phase(title)`,
663
663
  // `log(message)`, and OPTIONALLY `pipeline`/`parallel` (see
664
664
  // defaultPipeline/defaultParallel below for the omp shim's implementation
665
- // of both, built from #1296 Q3's analysis).
665
+ // of both).
666
666
  function defaultParallel(fns) {
667
667
  return Promise.all(fns.map((fn) => fn()));
668
668
  }
@@ -670,7 +670,7 @@ function defaultParallel(fns) {
670
670
  // Per-item independence, INCLUDING the null short-circuit: a stage-1 throw
671
671
  // or a stage-1 falsy result must land in the SAME null slot a stage-2 throw
672
672
  // would, so `unrunCrashed`'s index-aligned read of the pipeline result sees
673
- // one uniform shape for every crash cause (#1296 Q3).
673
+ // one uniform shape for every crash cause.
674
674
  async function defaultPipeline(items, stage1, stage2) {
675
675
  return Promise.all(
676
676
  items.map(async (item) => {
@@ -710,7 +710,7 @@ export async function runReview(host, args) {
710
710
 
711
711
  if (!pr || !worktree) throw new Error("review-pr: args.pr and args.worktree are required");
712
712
 
713
- // #878. The truthiness check above is what made the CLI fail-open REACHABLE:
713
+ // The truthiness check above is what made the CLI fail-open REACHABLE:
714
714
  // `pr` is interpolated into `gh pr diff ${pr}`, `gh pr view ${pr}` and
715
715
  // `diff-stats.mjs --pr ${pr}` in the snapshot prompt below, and a branch name
716
716
  // passes all three — `gh` resolves a non-numeric ref as a BRANCH, so the
@@ -771,7 +771,7 @@ both hashes — in \`repoError\`. The init is what makes the snapshot MEASURABLE
771
771
  the review runs this repository's own suite in there, and a suite with tests
772
772
  that need a working tree reports fewer passes and more failures in a bare
773
773
  extraction than in a checkout at the same commit, with nothing in the payload
774
- saying the measurement happened somewhere else (#1056). The tree-hash compare is
774
+ saying the measurement happened somewhere else. The tree-hash compare is
775
775
  the verification: two commits whose trees hash the same hold byte-identical
776
776
  content, so a match settles that the snapshot IS the reviewed tree — a stronger
777
777
  check than reading a few files, and the reason the commit comes BEFORE the
@@ -785,7 +785,7 @@ every file in the tree rather than a couple of them. Do not modify ${worktree}.
785
785
  Every path in the block above is absolute or \`-C\`-anchored on purpose: this
786
786
  dispatch carries no working directory of its own either, so you start in the
787
787
  controller's own checkout, and a relative path — a \`tar -x\` with no \`-C\`, a
788
- bare \`git\` — reads or writes THERE (#1433). Add nothing relative to it, and
788
+ bare \`git\` — reads or writes THERE. Add nothing relative to it, and
789
789
  chain a \`cd\` into "$RUN" or "$SNAP" for anything you run beyond it.
790
790
 
791
791
  Then capture the PR's diff for the specialists, plus the three facts the caller
@@ -811,7 +811,7 @@ as before. A cross-repo PR (a fork) skips the branch-ref read entirely and goes
811
811
  straight to 'refs/pull/${pr}/head' — the base repo's own copy of the PR head —
812
812
  because a fork's branch NAME is not guaranteed unique against the base
813
813
  repository, and a same-named hit on 'origin' would silently answer for the
814
- wrong repository rather than for the fork (#1616). The fallback to
814
+ wrong repository rather than for the fork. The fallback to
815
815
  'refs/pull/${pr}/head' also still fires for a same-repo PR whose branch ref
816
816
  came back empty, unchanged from before. Omit \`refHead\` when every read this
817
817
  PR was entitled to came back empty or was skipped: an absent value is neither
@@ -886,7 +886,7 @@ a false repoVerified.`,
886
886
  );
887
887
  log(`agents dispatched ${dimensions.map((d) => `${d.key}=${d.agentType}`).join(" ")}`);
888
888
 
889
- // #2315. The review's ONE run of the test command, before any specialist is
889
+ // The review's ONE run of the test command, before any specialist is
890
890
  // dispatched: every dimension used to run the full suite itself, so one
891
891
  // review was up to six full sweeps of one immutable snapshot. NOT wrapped in
892
892
  // `retryCrashed`: a crashed dispatch may already have launched the command,
@@ -946,7 +946,7 @@ learns the run produced none.`,
946
946
  const failureOwner = dimensions[0].key;
947
947
 
948
948
  const dimensionsUnrun = [];
949
- // #1433. Per-dimension record of the specialist's own CWD-AUDIT line (see
949
+ // Per-dimension record of the specialist's own CWD-AUDIT line (see
950
950
  // `cwdAuditFrom` above) — `{dimension, state, line}`, `state` one of
951
951
  // "clean"/"dirty"/"unrepo"/"missing". Populated for every dispatched
952
952
  // review that returned at all (a crashed dispatch has nothing to audit,
@@ -955,10 +955,10 @@ learns the run produced none.`,
955
955
  // dead-ending inside `scope_searched`.
956
956
  const cwdAudit = [];
957
957
 
958
- // #1433. Both prompts below carry the inherited-cwd rule, and it is stated in
958
+ // Both prompts below carry the inherited-cwd rule, and it is stated in
959
959
  // each rather than shared: review-eval.mjs's own header holds the measurement
960
960
  // and the reason this is prompt prose at all (no dispatch primitive takes a
961
- // per-call cwd), and #496's brief rules the shared-source route out for
961
+ // per-call cwd), and the shared-source route is ruled out for
962
962
  // exactly these blocks. Three parts, in this order, because the last two are
963
963
  // inert without the first: the cwd the specialist starts in is NAMED as a
964
964
  // tree it must not write to, `pwd` fixes which directory that is, and the
@@ -968,7 +968,7 @@ learns the run produced none.`,
968
968
  phase("Review");
969
969
  const reviewed = await pipeline(
970
970
  dimensions,
971
- // #1802: a crashed specialist (null or thrown) is re-dispatched once
971
+ // A crashed specialist (null or thrown) is re-dispatched once
972
972
  // before it counts as unrun. A specialist that RETURNED is never re-run
973
973
  // here — the shared run, not the specialist, is what `unrunEntries` judges.
974
974
  (d) =>
@@ -1022,7 +1022,7 @@ beginning \`CWD-AUDIT:\` — \`CWD-AUDIT: clean <path>\` when it printed nothing
1022
1022
  every run, clean or not: a clean tree is the result this check exists to
1023
1023
  produce, and an omitted line reads exactly like a check never run. Three PRs
1024
1024
  reviewed from one cell left four files modified in that checkout with nothing in
1025
- any payload saying so (#1433), so a path you cannot account for is still yours
1025
+ any payload saying so, so a path you cannot account for is still yours
1026
1026
  to name.`,
1027
1027
  { label: `review:${d.key}${forPr}`, phase: "Review", agentType: d.agentType, schema: FINDINGS_SCHEMA },
1028
1028
  ),
@@ -1036,7 +1036,7 @@ to name.`,
1036
1036
  (review && review.findings ? review.findings : []).map((f, fi) => () => {
1037
1037
  const n = verifiersForRun(f.severity);
1038
1038
  if (n === 0) return Promise.resolve({ ...f, dimension: d.key, ...verdictFor(0, []) });
1039
- // #1802: a pair whose EVERY vote died (or whose dispatch threw) is
1039
+ // A pair whose EVERY vote died (or whose dispatch threw) is
1040
1040
  // re-dispatched once, as a pair, before `verdictFor` reads it — one
1041
1041
  // live vote means the pair did not crash and is ruled on that vote.
1042
1042
  return retryCrashed(
@@ -1113,8 +1113,7 @@ Report it in \`reason\` as one line beginning \`CWD-AUDIT:\` —
1113
1113
  <what it printed>\` when it printed anything, \`CWD-AUDIT: unrepo <path>\` when
1114
1114
  git answered \`fatal: not a git repository\` — every run, clean or not: an
1115
1115
  omitted line reads exactly like a check never run, and applying a mutation is
1116
- how three reviews from one cell left four files modified in that checkout
1117
- (#1433).`,
1116
+ how three reviews from one cell left four files modified in that checkout.`,
1118
1117
  { label: `verify:${d.key}${forPr}`, phase: "Verify", agentType: VERIFIER_AGENT_TYPE, schema: VERDICT_SCHEMA },
1119
1118
  ),
1120
1119
  ),
@@ -1122,7 +1121,7 @@ how three reviews from one cell left four files modified in that checkout
1122
1121
  (votes) => !(votes && votes.some(Boolean)),
1123
1122
  ).then(
1124
1123
  (votes) => ({ ...f, dimension: d.key, ...verdictFor(n, votes) }),
1125
- // #1813: a rejection here means retryCrashed's OWN final attempt
1124
+ // A rejection here means retryCrashed's OWN final attempt
1126
1125
  // rejected — both dispatches of this finding's refuter pair
1127
1126
  // crashed, not just returned no votes. Left unhandled, that
1128
1127
  // rejection propagates into the shared `parallel()` above (a bare
@@ -1147,7 +1146,7 @@ how three reviews from one cell left four files modified in that checkout
1147
1146
  const refuted = all.filter((f) => f.verdict === "refuted");
1148
1147
  const unverified = all.filter((f) => f.verdict === "unverified");
1149
1148
 
1150
- // #2315. One verdict on the shared run, for every dimension whose chain did
1149
+ // One verdict on the shared run, for every dimension whose chain did
1151
1150
  // not die — a crashed one is named below with its own reason instead, so no
1152
1151
  // key is listed twice. Read only once every dimension has been verified: the
1153
1152
  // failing-tests check reads the findings that reached the payload, across
@@ -1174,10 +1173,10 @@ how three reviews from one cell left four files modified in that checkout
1174
1173
  // `dimensionsRun` names what was DISPATCHED after the size trim: a trimmed
1175
1174
  // fan-out must say so, never read as full coverage. It is not a coverage claim
1176
1175
  // on its own and never was — a specialist can be dispatched and die, or the
1177
- // review's one shared test run can execute nothing (#2315) — so
1176
+ // review's one shared test run can execute nothing — so
1178
1177
  // `dimensionsUnrun` names which of those keys did not cover their ground,
1179
1178
  // and why. A key in the first and NOT in the second ran a suite — not that
1180
- // it is covered (#535). `unrunReason` reads the shared run's counts and
1179
+ // it is covered. `unrunReason` reads the shared run's counts and
1181
1180
  // quotes its command into its message; it never checks that the test-run
1182
1181
  // agent ran the command it was handed rather than a narrower one, so a
1183
1182
  // substituted runner is not classified unrun.
@@ -1187,7 +1186,7 @@ how three reviews from one cell left four files modified in that checkout
1187
1186
  // make a crashed dimension indistinguishable from one the size tier never
1188
1187
  // dispatched — this ticket set's own defect, moved one field over.
1189
1188
  //
1190
- // #1802. Digest first, in DIGEST_KEYS order, bulk last — see DIGEST_KEYS
1189
+ // Digest first, in DIGEST_KEYS order, bulk last — see DIGEST_KEYS
1191
1190
  // above for why the order is the contract.
1192
1191
  return {
1193
1192
  pr,
@@ -1195,13 +1194,13 @@ how three reviews from one cell left four files modified in that checkout
1195
1194
  // The recovery, next to the fields a controller reads first; null unless
1196
1195
  // a refuter pair crashed again after the in-run retry.
1197
1196
  resume,
1198
- // #1056. Always present, in both regimes: a reader of this payload can
1197
+ // Always present, in both regimes: a reader of this payload can
1199
1198
  // never be left unable to tell an environment artifact from a regression,
1200
1199
  // and that costs nothing when there is nothing wrong to report.
1201
1200
  testEnvironment: environmentNote(snap),
1202
1201
  dimensionsRun: dimensions.map((d) => d.key),
1203
1202
  dimensionsUnrun,
1204
- // #1433. `cwdAuditFrom`'s per-dimension read of the specialist's own
1203
+ // `cwdAuditFrom`'s per-dimension read of the specialist's own
1205
1204
  // CWD-AUDIT line — the fact a dirty or unrepo'd inherited checkout is
1206
1205
  // otherwise reported into `scope_searched` and read by nothing.
1207
1206
  cwdAudit,
@@ -1,5 +1,5 @@
1
- // review-eval.mjs — the shim for the PR review port (#1349, per #1303's
2
- // ruling on #1296). It is loaded (never review-core.mjs directly) through
1
+ // review-eval.mjs — the shim for the PR review port. It is loaded (never
2
+ // review-core.mjs directly) through
3
3
  // the Resolver, from an `eval` cell:
4
4
  //
5
5
  // const path = (await Bun.$`~/.fleet/bin/fleet-run --path review-eval.mjs`.text()).trim();
@@ -8,9 +8,9 @@
8
8
  //
9
9
  // `scratch` is the scratch ROOT, never the review side's `<root>/pr<N>`:
10
10
  // runReview creates `pr<N>/` under it itself, and refuses a scratch that
11
- // already ends in one (#2323).
11
+ // already ends in one.
12
12
  //
13
- // Since #1802 the cell that does this is the `review-pr-<pr#>` member's own —
13
+ // The cell that does this is the `review-pr-<pr#>` member's own —
14
14
  // agents/fleet-review-runner.agent.md, off the controller's turn — and it calls
15
15
  // `runReviewToFile` (bottom of this file), which wraps `runReviewOnOmp` with the
16
16
  // one retry and writes the result file. A controller holding its own turn can
@@ -20,12 +20,12 @@
20
20
  // together under the same Install root) with a RELATIVE specifier, so the
21
21
  // Resolver is only needed ONCE, to find this file itself — the relationship
22
22
  // between the two is an ordinary same-install sibling import, which eval's
23
- // Bun VM permits without restriction (#1296 Q6). Never resolve
23
+ // Bun VM permits without restriction. Never resolve
24
24
  // review-core.mjs's own path through the Resolver a second time — that would
25
25
  // be two doors where CONTEXT.md's Resolver entry says there is exactly one.
26
26
  //
27
- // No `model`/`effort` appears anywhere below (#1349 gap 3; audited by
28
- // review-tier-audit.test.mjs). Every dispatch names a bare fleet-owned
27
+ // No `model`/`effort` appears anywhere below, and a suite audit holds it
28
+ // there. Every dispatch names a bare fleet-owned
29
29
  // `agentType` from review-core.mjs's DEFAULT_DIMENSIONS or from
30
30
  // runReview's own snapshot/verifier dispatch, unmodified — omp's `agent()`
31
31
  // resolves a bare frontmatter `name:` exactly, which is already what those
@@ -34,7 +34,7 @@ import { mkdir, writeFile } from "node:fs/promises";
34
34
  import { isAbsolute, join } from "node:path";
35
35
  import { digestOf, runReview, runnerPrRefusal, runnerScratchRefusal } from "./review-core.mjs";
36
36
 
37
- // eval's `agent()` returns a HANDLE, not data (#1296 Q2): `agent(prompt,
37
+ // eval's `agent()` returns a HANDLE, not data: `agent(prompt,
38
38
  // opts)` resolves near-instantly to an `AgentHandle` with `.wait()`, and only
39
39
  // `.wait()` unwraps the schema-validated `structuredOutput.data`. This
40
40
  // wrapper is what makes review-core.mjs's `await host.agent(...)` read like
@@ -45,7 +45,7 @@ import { digestOf, runReview, runnerPrRefusal, runnerScratchRefusal } from "./re
45
45
  // in review-core.mjs (`if (snap) {...}`, `unrunCrashed`, `verdictFor`) is
46
46
  // written against. eval's DEFAULT `schemaMode` is "permissive": an exhausted
47
47
  // structured-output retry is ACCEPTED anyway, carrying `schemaOverridden:
48
- // true` on invalid data (#1296 Q2) rather than nulling out. `schemaMode:
48
+ // true` on invalid data rather than nulling out. `schemaMode:
49
49
  // "strict"` turns that same exhaustion into a thrown/rejected result
50
50
  // instead — still not a null — so this wrapper treats a REJECTED `.wait()`
51
51
  // as the crash signal (`agent()`'s only way to fail loudly under omp) and
@@ -56,7 +56,7 @@ import { digestOf, runReview, runnerPrRefusal, runnerScratchRefusal } from "./re
56
56
  // gave up correcting is not this shim's contract to relitigate.
57
57
  //
58
58
  // NO PER-CALL WORKING DIRECTORY HERE, AND WHY THE ISOLATION RULE LIVES IN THE
59
- // PROMPTS INSTEAD (#1433). Three PRs reviewed back-to-back from one eval cell
59
+ // PROMPTS INSTEAD. Three PRs reviewed back-to-back from one eval cell
60
60
  // left FOUR files modified in the checkout that cell was standing in — a
61
61
  // specialist's mutation-test experiment reached through a RELATIVE path, in the
62
62
  // tree the controller reads instruments.sh, ci-state.mjs and every gate
@@ -101,7 +101,7 @@ async function ompAgent(prompt, opts) {
101
101
  }
102
102
  }
103
103
 
104
- // `pipeline()`/`parallel()` have no omp counterpart (#1296 Q3) — this is the
104
+ // `pipeline()`/`parallel()` have no omp counterpart — this is the
105
105
  // same hand-rolled pair review-core.mjs exports as its own default (see
106
106
  // `defaultPipeline`/`defaultParallel` there), passed through explicitly here
107
107
  // rather than left to the default so a reader of THIS file, the one the
@@ -137,9 +137,8 @@ export async function runReviewOnOmp(args) {
137
137
  return runReview({ agent: ompAgent, phase, log, pipeline, parallel }, args);
138
138
  }
139
139
 
140
- // #1802 (spec 2026-09-24-slot-based-fleet-loop-design.md § 3 §1, §2, §5, §7).
141
140
  // The whole of the omp review runner's job, so the agent's own cell is three
142
- // lines and this contract can be run (review-runner.test.mjs): the full result
141
+ // lines and this contract can be run by a test: the full result
143
142
  // object goes to `<scratch>/review-<pr>.json` — the one artefact handed to
144
143
  // the fix-applier — and only the digest comes back, because the digest is
145
144
  // all the controller reads and a 26–61 KB result is what the file exists to
@@ -150,7 +149,7 @@ export async function runReviewOnOmp(args) {
150
149
  // reviewer's name (`review-pr-<pr>-b`), and writes no file, so nothing reads a
151
150
  // half-review as a review. A dispatch mistake — a pr that is not a PR number, a
152
151
  // scratch that is not absolute (eval's cwd is the MAIN CHECKOUT, so a relative
153
- // one would put the file there), a scratch that already ends in `pr<N>` (#2323)
152
+ // one would put the file there), a scratch that already ends in `pr<N>`
154
153
  // — throws before any run: it is not a review failure, and retrying or falling
155
154
  // back would only repeat it. `run` is the seam the test injects; nothing else
156
155
  // passes it.
@@ -173,7 +172,7 @@ export async function runReviewToFile(args, run = runReviewOnOmp) {
173
172
  errors.push(`attempt ${attempt}: ${e?.message ?? String(e)}`);
174
173
  continue;
175
174
  }
176
- // #1813: `result.counts` is read below to build the digest and the ledger
175
+ // `result.counts` is read below to build the digest and the ledger
177
176
  // token, but that read happens AFTER `mkdir`/`writeFile` have already put
178
177
  // the file on disk — so a `run` that resolves to a truthy, object-shaped
179
178
  // result missing `.counts` would otherwise throw on the destructure below
@@ -11,7 +11,7 @@ set -eu
11
11
  NAME=verify-sha
12
12
  die() { printf '%s: %s\n' "$NAME" "$1" >&2; exit 2; }
13
13
 
14
- # The escaping helpers (#119). json.sh's header holds the sourcing contract and
14
+ # The escaping helpers. json.sh's header holds the sourcing contract and
15
15
  # the measurements behind it. Exit 1 out of THIS script means "the sha is not
16
16
  # reachable", the one distinction it exists to make, so a missing library would
17
17
  # report a member's PR as sitting somewhere it does not — which is why `[ -r ]`
@@ -22,7 +22,7 @@ json_lib="$(dirname "$0")/json.sh"
22
22
  # shellcheck source=json.sh
23
23
  . "$json_lib" || die "$json_lib failed to load"
24
24
 
25
- # The bounded, prompt-suppressed git transport (#92, #346, #347). The fetch
25
+ # The bounded, prompt-suppressed git transport. The fetch
26
26
  # below is unattended: with no bound it can prompt for a credential or a host
27
27
  # key, or stall on a transport that connects and then goes quiet, and either
28
28
  # holds a fleet slot until something outside kills it. net.sh's header holds the
@@ -43,7 +43,7 @@ sha=$2
43
43
  # leaves the die message asserting a cause the script cannot know. A bad remote
44
44
  # URL and a removed remote are both "cannot fetch"; only git can say which.
45
45
  #
46
- # `printf`, not `echo`, on THIS line alone (#484): `$branch` is still raw argv
46
+ # `printf`, not `echo`, on THIS line alone: `$branch` is still raw argv
47
47
  # here — `[ $# -eq 2 ]` is the only guard it has passed — so a `\c` in it
48
48
  # truncated the trace AND swallowed its newline, welding git's own `fatal:`
49
49
  # onto the tail of a line that had already lied about the command being run.
@@ -65,7 +65,7 @@ if [ "$fetch_rc" -ne 0 ]; then
65
65
  die "cannot fetch origin/$branch"
66
66
  fi
67
67
 
68
- # --verify (#1146): without it, an unresolvable "origin/$branch" falls back to
68
+ # --verify: without it, an unresolvable "origin/$branch" falls back to
69
69
  # treating the argument as a PATH — if a file or dir of that name sits in the
70
70
  # cwd, rev-parse prints it and exits 0, and this guard's `|| die` never fires.
71
71
  # Measured: a real ref still wins over a same-named path either way, so