@feigi/fleet-ctl 3.30.19 → 3.30.20

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.
@@ -65,14 +65,20 @@ and revise.
65
65
  **Then prove it, with ONE of:**
66
66
 
67
67
  - **The count proof** — when the runner prints how many tests it ran. Copy
68
- that summary line's text, as printed, into `--count-line`, and the number it
69
- carries into `--test-count`:
68
+ text off that summary line, as printed, into `--count-line`, and the number
69
+ of tests that ran into `--test-count`:
70
70
 
71
71
  ~/.fleet/bin/fleet-run recipe-prove.mjs <repo> --install '<install>' --test '<test>' \
72
72
  --count-line '<literal text of the count line>' --test-count <n>
73
73
 
74
- Copy only text that is the same on every run — the count, not a duration.
75
- A count of 0 is a failed proof, never a pass.
74
+ The number is the tests that ran — never the skipped, the failed, or a
75
+ total that includes skips. A runner whose count includes its skipped tests
76
+ (Maven Surefire's `Tests run:`, node's `# tests`) prints no number that is
77
+ the tests that ran: prove it with the mutation proof instead. Trim the
78
+ literal to the text around that one number, so it carries no other:
79
+ `5 passed` off pytest's `5 passed, 2 skipped in 0.31s`. A literal carrying
80
+ any other number is refused. Copy only text that is the same on every run —
81
+ the count, not a duration. A count of 0 is a failed proof, never a pass.
76
82
  - **The mutation proof** — when the runner prints no count, or prints one
77
83
  you cannot pin. It needs the unmutated run green. Choose one test and write
78
84
  a shell command that breaks it deliberately: change an expected value in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feigi/fleet-ctl",
3
- "version": "3.30.19",
3
+ "version": "3.30.20",
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": {
@@ -22,9 +22,10 @@
22
22
  // execute"/"not found". A red suite is not a failed proof by itself.
23
23
  // 3. Real tests must be shown to have executed, by at least one of:
24
24
  // - the count proof: `--count-line` is a literal the run's own output
25
- // must contain (the runner's summary line, read off a previous run),
26
- // carrying `--test-count`, a positive integer. `tests 0` is a failed
27
- // proof however honestly the runner reports it.
25
+ // must contain (text off the runner's summary line, read off a
26
+ // previous run), carrying `--test-count`, a positive integer, as its
27
+ // one number. `tests 0` is a failed proof however honestly the runner
28
+ // reports it.
28
29
  // - the mutation proof: the unmutated run must be green; `--mutate` is a
29
30
  // shell command that must change a tracked file (the deliberate
30
31
  // failing mutation of one test, or of the code one test covers) — run
@@ -259,8 +260,13 @@ function prove(o, wt, logs) {
259
260
  if (o.countLine !== undefined) {
260
261
  const n = Number(o.testCount);
261
262
  if (n === 0) throw notProven(`vacuous: a test count of 0 is a run that executed no tests; ${where}`);
262
- if (!new RegExp(`(^|[^0-9])0*${n}([^0-9]|$)`).test(o.countLine)) {
263
- throw notProven(`the count line '${o.countLine}' does not carry the test count ${n}; ${where}`);
263
+ // The claim must be the line's ONE number, never merely one of its numbers:
264
+ // a summary line carrying several can carry the claim as its skipped count
265
+ // while the run itself executed none. Its first number is no rule either —
266
+ // a runner may print its skips before its count.
267
+ const numbers = o.countLine.match(/[0-9]+/g) ?? [];
268
+ if (numbers.length !== 1 || BigInt(numbers[0]) !== BigInt(o.testCount)) {
269
+ throw notProven(`the count line '${o.countLine}' does not carry the test count ${o.testCount} as its one number (it carries ${numbers.length ? numbers.join(", ") : "none"}) — trim it to the number of tests that ran; ${where}`);
264
270
  }
265
271
  if (!readFileSync(testLog, "utf8").includes(o.countLine)) {
266
272
  throw notProven(`vacuous: the Test entrypoint's output does not contain the count line '${o.countLine}' — no evidence any test ran; ${where}`);