@feigi/fleet-ctl 3.30.21 → 3.30.22
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
package/scripts/review-core.mjs
CHANGED
|
@@ -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
|
|
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");
|
package/scripts/review-eval.mjs
CHANGED
|
@@ -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
|