@feigi/fleet-ctl 3.30.29 → 3.30.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.30.29",
3
+ "version": "3.30.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": {
@@ -126,6 +126,7 @@ export const TEST_RUN_SCHEMA = {
126
126
  tests: { type: "integer" },
127
127
  pass: { type: "integer" },
128
128
  fail: { type: "integer" },
129
+ expectedFail: { type: "integer", description: "Tests the runner reports as failing by design (vitest's `expected fail`), never folded into `fail`." },
129
130
  cancelled: { type: "integer" },
130
131
  skipped: { type: "integer" },
131
132
  error: { type: "string", description: "Only when no summary was printed: what happened instead." },
@@ -437,10 +438,11 @@ cannot be told apart from a regression.`;
437
438
  }
438
439
 
439
440
  // Every run-quality verdict below reads the review's ONE shared test
440
- // run — `{command, logPath, exitCode?, tests?, pass?, fail?, cancelled?,
441
- // skipped?, error?}`, `command`/`logPath` the caller's own and the rest the
442
- // test-run agent's report — never a specialist's own run: no specialist runs
443
- // the full suite any more, so a verdict on one would judge a copy of this.
441
+ // run — `{command, logPath, exitCode?, tests?, pass?, fail?, expectedFail?,
442
+ // cancelled?, skipped?, error?}`, `command`/`logPath` the caller's own and the
443
+ // rest the test-run agent's report — never a specialist's own run: no
444
+ // specialist runs the full suite any more, so a verdict on one would judge a
445
+ // copy of this.
444
446
  // `run` null is a caller holding no run at all — runReview always hands one
445
447
  // over, a null or thrown test-run dispatch arriving as `{error}` — and `tests`
446
448
  // absent is a run that returned without a count. Both are "no counts", and
@@ -455,8 +457,9 @@ function testRunReason(run) {
455
457
  if (typeof run.tests !== "number")
456
458
  return `\`${cmd}\` produced no counts — the shared test run crashed, hit its deadline, or printed no summary${run.error ? ` (${run.error})` : ""} — a failed run, not a pass`;
457
459
  if (!run.tests) return `\`${cmd}\` produced 0 tests — a failed run, not a pass`;
458
- if (run.pass === 0 && !run.fail) return `\`${cmd}\` passed nothing and failed nothing — every test skipped, not a pass`;
459
- const executed = run.pass + (run.fail ?? 0);
460
+ // An expected fail ran: the runner executed it and it failed as declared.
461
+ const executed = run.pass + (run.fail ?? 0) + (run.expectedFail ?? 0);
462
+ if (run.pass === 0 && executed === 0) return `\`${cmd}\` passed nothing and failed nothing — every test skipped, not a pass`;
460
463
  if (typeof run.pass === "number" && executed * 2 < run.tests)
461
464
  return `\`${cmd}\` passed ${run.pass} and failed ${run.fail ?? 0} of the ${run.tests} tests it collected — most of what it collected never ran`;
462
465
  if (typeof run.exitCode !== "number")
@@ -505,7 +508,7 @@ export function unrunCrashed(reviewed, dimensions) {
505
508
  }
506
509
 
507
510
  function countsOf(run) {
508
- return ["tests", "pass", "fail", "cancelled", "skipped"]
511
+ return ["tests", "pass", "fail", "expectedFail", "cancelled", "skipped"]
509
512
  .filter((k) => typeof run[k] === "number")
510
513
  .map((k) => `${k} ${run[k]}`)
511
514
  .join(", ");
@@ -938,11 +941,12 @@ knows what the full tree reports.
938
941
  Then read the summary the runner printed at the end of the log —
939
942
  \`tail -n 40 "${logPath}"\`, ignoring any color escapes — and report
940
943
  \`exitCode\` = the TEST_RUN_EXIT value, and \`tests\`, \`pass\`, \`fail\`,
941
- \`cancelled\`, \`skipped\` = the counts that summary states, each copied as
942
- printed; omit any the runner does not print. Copy the counts, never judge them:
943
- 'tests 0' is a FAILED run, not a pass, and 0 passes with no failures is
944
- everything skipped — report both exactly as printed, and the caller reports
945
- every dimension unrun for them.
944
+ \`expectedFail\`, \`cancelled\`, \`skipped\` = the counts that summary states, each
945
+ copied as printed; omit any the runner does not print. A test the runner reports
946
+ as failing by design (vitest's \`expected fail\`) goes in \`expectedFail\`, never in
947
+ \`fail\`. Copy the counts, never judge them: 'tests 0' is a FAILED run, not a
948
+ pass, and 0 passes with no failures is everything skipped — report both
949
+ exactly as printed, and the caller reports every dimension unrun for them.
946
950
 
947
951
  If the command hit its deadline, crashed before printing a summary, or printed
948
952
  no counts at all, omit every count and say what happened in \`error\`. Never