@feigi/fleet-ctl 3.24.3 → 3.24.5

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,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