@feigi/fleet-ctl 3.23.29 → 3.23.30

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.23.29",
3
+ "version": "3.23.30",
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,9 +167,11 @@ git rev-parse --verify "origin/main^{commit}" >/dev/null \
167
167
  # Recipe cache by derive-testcmd.sh — the one reader, reused rather than
168
168
  # reimplemented, so the claim and the review snapshot cannot disagree about
169
169
  # the cache's shape or what makes it usable. Nothing here infers either
170
- # command: an absent, unproven or unrunnable cache is derive-testcmd.sh's own
171
- # refusal, passed through in its own words, which name the step that derives
172
- # the Recipe.
170
+ # command: every derive-testcmd.sh refusal is passed through in its own words.
171
+ # A refusal about the cache (absent, unproven or invalid) names the step that
172
+ # derives the Recipe; an exit-3 refusal names an environment fault, and the
173
+ # caller fixes that instead of deriving. Both leave here as this script's exit
174
+ # 2, so only the words tell them apart.
173
175
  #
174
176
  # `2>&1` so the reason travels: the child refuses on its STDERR and `$(...)`
175
177
  # captures stdout only, so without the merge `die` fires with an empty
@@ -199,6 +199,22 @@ test("the snapshot agent is told to derive testCmd AND the schema declares it",
199
199
  );
200
200
  });
201
201
 
202
+ // derive-testcmd.sh's exit-3 refusals are about the environment and name no
203
+ // derivation step, so the prompt must not tell the snapshot agent that every
204
+ // refusal does.
205
+ test("the snapshot agent is told a cache refusal names the derivation step and an exit-3 refusal names an environment fault", () => {
206
+ const snapshot = between(CODE, "const snap = await agent(", "if (snap) {", "the snapshot agent dispatch");
207
+ assert.match(snapshot, /a\s+refusal\s+about\s+the\s+cache\s+names\s+the\s+step\s+that\s+derives\s+it/);
208
+ assert.match(snapshot, /an\s+exit-3\s+refusal\s+names\s+an\s+environment\s+fault,\s+and\s+the\s+caller\s+fixes\s+that\s+instead\s+of\s+deriving/);
209
+ // The two clauses above are the only places the prompt may speak of a
210
+ // refusal: any other sentence about one, however worded or capitalised, is a
211
+ // fresh chance to say that every refusal names the derivation step.
212
+ const outside = snapshot
213
+ .replace(/a\s+refusal\s+about\s+the\s+cache\s+names\s+the\s+step\s+that\s+derives\s+it/, "")
214
+ .replace(/an\s+exit-3\s+refusal\s+names\s+an\s+environment\s+fault/, "");
215
+ assert.doesNotMatch(outside, /\brefusals?\b/i, "the prompt speaks of a refusal outside the two clauses that say which kind names the derivation step");
216
+ });
217
+
202
218
  // #2315. The prompt that RUNS the command is the shared test run's — every
203
219
  // specialist used to run it, which made one review up to six full sweeps.
204
220
  // Bounded at both ends: an unbounded slice runs to EOF, where the specialist
@@ -270,8 +270,10 @@ reads carried 434 KB.`;
270
270
 
271
271
  // The step a missing Test entrypoint is derived by, named in the refusal so the
272
272
  // caller — a controller or a reviewer — knows what to run rather than what went
273
- // wrong (ADR 0015). derive-testcmd.sh's own refusals name the same step; this
274
- // one covers the case where the snapshot agent reported no reason at all.
273
+ // wrong (ADR 0015). derive-testcmd.sh's refusals about the cache name the same
274
+ // step; its exit-3 refusals name an environment fault instead, which the caller
275
+ // fixes rather than deriving. This one covers the case where the snapshot agent
276
+ // reported no reason at all.
275
277
  const DERIVATION_STEP =
276
278
  "run the Recipe derivation step (run-team phase 0, before the first claim — ADR 0015) to derive, prove and write the Recipe cache";
277
279
 
@@ -823,8 +825,9 @@ Then read this repository's Test entrypoint out of its Recipe cache:
823
825
 
824
826
  Report \`testCmd\` = its stdout ONLY if it exited 0. If it exited non-zero,
825
827
  report \`testCmdError\` = its stderr and omit \`testCmd\`. Never derive or
826
- guess a command yourself: a refusal names the step that writes the cache, and
827
- the caller acts on it.
828
+ guess a command yourself: a refusal about the cache names the step that
829
+ derives it; an exit-3 refusal names an environment fault, and the caller fixes
830
+ that instead of deriving.
828
831
 
829
832
  Then size the diff:
830
833