test(ping-default-count): read every Sending N, against the command above it #1850

Merged
jaylouisw merged 1 commit from fix/1117-1305 into main 2026-11-17 13:37:18 +00:00
Owner

Fixes #1845.

The guard added for #1712 was a bare substring test on docs/CLI.md - Sending 4, may appear nowhere - so it also rejected a transcript that types the count on purpose:

r1> ping 10.0.0.10 4
Sending 4, 100-byte ICMP Echos to 10.0.0.10, timeout is 2 seconds:

That is the example #1840 adds, in the section whose point is the explicit count. The guard now keeps its meaning - no example shows four as the default - by reading each Sending N, line against the command echoed above it: the command must type N, or type no count and send the documented default of five. A header disagreeing with the typed count is still rejected, so the guard is not vacuous, and a fragment with no command above it may only show the default.

Seven fixtures pin the rule itself (bare five accepted, bare four rejected, typed four accepted across the console filler line, typed five with at accepted, mismatch rejected, fragments both ways), and the doc assertion now reports the offending lines instead of a bare boolean.

Verified against both trees: 25 passed on main, 25 passed with #1840's docs/CLI.md substituted in, so #1840 stops being blocked by this file.

Gates

  • node scripts/syntax-check.js: 387 files, all OK
  • full suite, serial: 315 suites, 10,976 assertions, 0 failures (run in two halves because the serial run exceeds one tool call; the two suites that fail under --concurrency=6 - canonical-urls, board-id-is-a-name - pass serially and are concurrency artifacts, unrelated to this change)
Fixes #1845. The guard added for #1712 was a bare substring test on `docs/CLI.md` - `Sending 4,` may appear nowhere - so it also rejected a transcript that types the count on purpose: ``` r1> ping 10.0.0.10 4 Sending 4, 100-byte ICMP Echos to 10.0.0.10, timeout is 2 seconds: ``` That is the example #1840 adds, in the section whose point is the explicit count. The guard now keeps its meaning - no example shows four as the *default* - by reading each `Sending N,` line against the command echoed above it: the command must type N, or type no count and send the documented default of five. A header disagreeing with the typed count is still rejected, so the guard is not vacuous, and a fragment with no command above it may only show the default. Seven fixtures pin the rule itself (bare five accepted, bare four rejected, typed four accepted across the console filler line, typed five with `at` accepted, mismatch rejected, fragments both ways), and the doc assertion now reports the offending lines instead of a bare boolean. Verified against both trees: 25 passed on `main`, 25 passed with #1840's `docs/CLI.md` substituted in, so #1840 stops being blocked by this file. ## Gates - `node scripts/syntax-check.js`: 387 files, all OK - full suite, serial: 315 suites, 10,976 assertions, 0 failures (run in two halves because the serial run exceeds one tool call; the two suites that fail under `--concurrency=6` - canonical-urls, board-id-is-a-name - pass serially and are concurrency artifacts, unrelated to this change)
test(ping-default-count): read every Sending N, against the command above it (#1845)
All checks were successful
CI / Classify the change (pull_request) Successful in 9s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 14s
CI / Server smoke test (pull_request) Successful in 7s
CI / Docker build (pull_request) Successful in 25s
CI / Test (Node 20) (pull_request) Successful in 49s
CI / Test (Node 22) (pull_request) Successful in 53s
CI / Test (Node 18) (pull_request) Successful in 57s
CI / Arm auto-merge (pull_request) Successful in 8s
4f153603ff
The guard for #1712 was a bare substring test on docs/CLI.md: `Sending 4,` may appear nowhere. That also rejected a transcript that types the count on purpose, which is the example #1840 adds right after `ping 10.0.0.99 1`.

The assertion now keeps its meaning - no example shows four as the *default* - by reading each `Sending N,` line against the command echoed above it: the command must type N, or type no count and send the documented default of five. A mismatch (`ping ... 4` above `Sending 5,`) is rejected, so the guard is not vacuous, and seven fixtures pin the rule itself.
jaylouisw force-pushed fix/1117-1305 from 4f153603ff
All checks were successful
CI / Classify the change (pull_request) Successful in 9s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 14s
CI / Server smoke test (pull_request) Successful in 7s
CI / Docker build (pull_request) Successful in 25s
CI / Test (Node 20) (pull_request) Successful in 49s
CI / Test (Node 22) (pull_request) Successful in 53s
CI / Test (Node 18) (pull_request) Successful in 57s
CI / Arm auto-merge (pull_request) Successful in 8s
to 560412df50
All checks were successful
CI / Classify the change (pull_request) Successful in 10s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 8s
CI / Server smoke test (pull_request) Successful in 8s
CI / Docker build (pull_request) Successful in 20s
CI / Test (Node 20) (pull_request) Successful in 49s
CI / Test (Node 22) (pull_request) Successful in 53s
CI / Test (Node 18) (pull_request) Successful in 59s
CI / Arm auto-merge (pull_request) Successful in 16s
2026-11-17 13:35:16 +00:00
Compare
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!1850
No description provided.