@feigi/fleet-ctl 3.30.21 → 3.30.23

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.
@@ -69,7 +69,7 @@ jq '.refuted' "$R" # refuted: your
69
69
 
70
70
  **The controller runs the review; everything below is the fallback for when it cannot.**
71
71
 
72
- `eval` loading `scripts/review-eval.mjs` through the Resolver (`fleet-run --path review-eval.mjs`) and calling `runReviewOnOmp({pr, branch, worktree, testCmd, scratch})` is the fleet's **default** review path. Its `scratch` is the scratch root, never `<scratch>/pr<N>`: the review creates that partition itself and refuses a `scratch` already ending in one.
72
+ `eval` loading `scripts/review-eval.mjs` through the Resolver (`fleet-run --path review-eval.mjs`) and calling `runReviewOnOmp({pr, branch, worktree, testCmd, scratch})` is the fleet's **default** review path. Its `scratch` is the scratch root, never `<scratch>/pr<N>`: the review creates that partition itself and refuses a `scratch` already ending in one, or one that is not an absolute path.
73
73
 
74
74
  `$(~/.fleet/bin/fleet-run --root)/skills/run-team/SKILL.md`'s Reviewers section owns its dispatch. It cuts the snapshot, sizes the fan-out, adversarially verifies every **critical/important** finding, and has `agent()` return **into the script**, so no report can go undelivered, the failure that cost one fleet five reports on one PR and four on another. It does **not** verify the `suggestion` band — that gets 0 refuters by policy, which is why step 2 checks each in-scope one itself before applying it, and files the rest. **You cannot run it** — the one member that runs it is the `review-pr-<pr#>` runner (`agents/fleet-review-runner.agent.md`), never a reader of this file; this section is the fallback for a member dispatched without it, the `review-pr-<pr#>-b` reviewer the controller sends after a review failed twice included.
75
75
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feigi/fleet-ctl",
3
- "version": "3.30.21",
3
+ "version": "3.30.23",
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": {
@@ -24,7 +24,8 @@
24
24
  // Two imports. arg.mjs's isDigits(): this file is an ordinary
25
25
  // module, so it consumes the repo's digits rule directly rather than
26
26
  // declaring its own copy. node:path's `posix`, to normalise a
27
- // scratch path before `runnerScratchRefusal` reads its last component.
27
+ // scratch path before `runnerScratchRefusal` reads its last component, and
28
+ // its `isAbsolute`, to refuse a scratch that is not an absolute path.
28
29
  //
29
30
  // `.mjs`, not `.js`: this file was once `review-core.js`, and
30
31
  // nothing that ships declares a `type`, so Node below 20.19.0/22.7.0 —
@@ -32,7 +33,7 @@
32
33
  // review-eval.mjs's import of it failed. A suite sweep keeps a
33
34
  // shipped `.mjs` from importing a relative module under any other extension.
34
35
 
35
- import { posix } from "node:path";
36
+ import { isAbsolute, posix } from "node:path";
36
37
  import { isDigits } from "./arg.mjs";
37
38
 
38
39
  // --- Schemas ----------------------------------------------------------
@@ -699,7 +700,7 @@ export async function runReview(host, args) {
699
700
  const pr = A.pr;
700
701
  const branch = A.branch;
701
702
  const worktree = A.worktree;
702
- const scratch = A.scratch || `/tmp/review-pr-${pr}`;
703
+ const scratch = A.scratch === undefined ? `/tmp/review-pr-${pr}` : A.scratch;
703
704
  const runRootParent = `${scratch}/pr${pr}`;
704
705
  const runRootPrefix = `${runRootParent}/run-`;
705
706
  // Every dispatch label ends in `:pr${pr}`: the member id the harness derives
@@ -735,6 +736,16 @@ export async function runReview(host, args) {
735
736
  const scratchRefusal = runnerScratchRefusal(scratch);
736
737
  if (scratchRefusal) throw new Error(`review-pr: ${scratchRefusal}`);
737
738
 
739
+ // `runnerScratchRefusal` passes any non-string by contract, so a number or
740
+ // array — or a relative path — would otherwise be interpolated into the
741
+ // snapshot prompt's paths. Refused, never coerced: only an absent `scratch`
742
+ // takes the default above, so a falsy one (`0`, `false`, `""`, `null`) is
743
+ // refused here like any other value that is not an absolute path. Below the
744
+ // suffix check so a relative `pr<N>` still hears that it is partitioned.
745
+ if (typeof scratch !== "string" || !isAbsolute(scratch)) {
746
+ throw new Error(`review-pr: args.scratch must be an absolute path, got ${JSON.stringify(scratch)}`);
747
+ }
748
+
738
749
  const explicitDimensions = resolveDimensions(A.dimensions, DEFAULT_DIMENSIONS);
739
750
 
740
751
  phase("Snapshot");
@@ -8,7 +8,7 @@
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.
11
+ // already ends in one or that is not an absolute path.
12
12
  //
13
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
@@ -333,7 +333,12 @@ function fitTickets({ features, members, verdicts, window, cutoff }) {
333
333
  }
334
334
  // A ruling whose date is not YYYY-MM-DD cannot be placed against the cut, and
335
335
  // a string `<=` would drop 'abc' or '2027' unseen: it is left in, so `rulingFor`
336
- // refuses it when its ticket is an input, as `fit --due` does.
336
+ // refuses it when its ticket is an input ticket. An input ticket is one the
337
+ // fit reads — its last in-range row is an exploration row or has `sizing_src`
338
+ // `rule`, which the skip below keeps — not every ticket with an in-range
339
+ // features row. `fit --due` also refuses for a ticket the skip drops:
340
+ // `mergedSince` calls `verdictOf` on every ticket with an in-window row dated
341
+ // after `fitted_through`, with no such skip.
337
342
  const rulings = rulingsByTicket(verdicts.filter((r) => !DATE.test(r.run_date) || upToThrough(r)));
338
343
  const lastPulls = lastPullByTicket(inRange);
339
344
  const out = [];
@@ -536,6 +541,10 @@ function main() {
536
541
  const members = read("members", parseMemberTsv);
537
542
  const verdicts = read("verdicts", parseTierOutcomes);
538
543
  // The join throws on a features row it cannot place and on a ruling of an input ticket it cannot place.
544
+ // For `fit` and `--check` an input ticket is one `fitTickets` reads (its last in-range row is an
545
+ // exploration row or has `sizing_src` `rule`), not every ticket with an in-range features row. `fit --due` also
546
+ // covers a ticket `fitTickets` skips, because `mergedSince` calls `verdictOf` on every ticket with an in-window
547
+ // row dated after `fitted_through`, with no such skip.
539
548
  const joined = (fit) => {
540
549
  try { return fit(); } catch (e) { die(`cannot join --features ${need("features")} with --verdicts ${need("verdicts")}: ${e.message}`); }
541
550
  };