cliprobe 0.6.0 → 0.7.0

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/README.md CHANGED
@@ -100,16 +100,18 @@ In JUnit, each check is a test suite and each probe a test case: `FAIL` is a fai
100
100
 
101
101
  A default run does the seven checks below: closed-pipe, color, pipe-escapes, stdin, ctrl-c, restore and control-chars. Each one reports evidence, never a score. Two info checks, startup and baseline, run only when you name them with `--check`.
102
102
 
103
- A command that keeps running, such as a server, a watcher or a full-screen program, is what ctrl-c and restore need. The other checks judge it on what it did before the timeout (`--timeout`, 15 seconds by default): a crash once stdout is closed warns (for now; it becomes a failure once calibrated against real servers), color or a spinner in a pipe still counts, and stdin is skipped. The timeout is paid once: after the first check sees the command still running, the others watch it for 3 seconds.
103
+ A command that keeps running, such as a server, a watcher or a full-screen program, is what ctrl-c and restore need. The other checks judge it on what it did before the timeout (`--timeout`, 15 seconds by default): a crash once stdout is closed still fails, color or a spinner in a pipe still counts, and stdin is skipped. The timeout is paid once: after the first check sees the command still running, the others watch it for 3 seconds.
104
104
 
105
105
  **closed-pipe**. cliprobe runs the command twice: once normally, then with stdout set to a pipe whose reading end is already closed, so the first write fails every time, even for fast native programs. Results:
106
106
 
107
- | Verdict | Meaning |
108
- | ------- | ------------------------------------------------------------------------------------------------------ |
109
- | `PASS` | Exited quietly, or was stopped by SIGPIPE (the Unix convention), or kept running without a write error |
110
- | `FAIL` | Printed an EPIPE error or stack trace and changed its exit code, or hung |
111
- | `WARN` | Printed a write error but kept its exit code, or crashed on it while a normal run kept running |
112
- | `SKIP` | Wrote nothing to stdout for this invocation (or before the timeout), so pass args that print something |
107
+ | Verdict | Meaning |
108
+ | ------- | -------------------------------------------------------------------------------------------------------------------------- |
109
+ | `PASS` | Exited quietly, or was stopped by SIGPIPE (the Unix convention), or kept running without a write error |
110
+ | `FAIL` | Printed an EPIPE error or stack trace and changed its exit code, or hung, or crashed on it while a normal run kept running |
111
+ | `WARN` | Printed a write error but kept its exit code |
112
+ | `SKIP` | Wrote nothing to stdout for this invocation (or before the timeout), so pass args that print something |
113
+
114
+ Servers and watchers crash the same way. Among 38 watch and serve modes of popular npm tools, 8 died with `Error: write EPIPE` as soon as their stdout reader went away, each confirmed by hand: `jest --watchAll`, `live-server`, `mocha --watch`, `nodemon`, `parcel`, `rolldown -w`, `srvx` and `vite build --watch`. None was flagged falsely.
113
115
 
114
116
  **color**. cliprobe runs the command up to three times: into a pipe, under a real terminal (a pseudo-terminal through the system's `script` command, 80×24), and under a terminal with `NO_COLOR=1`. Every run gets `TERM=xterm-256color` and no `CI` variable, so a program can't pass just because the terminal type looks colorless, and color libraries that force color in CI don't fail it. Color codes in piped output end up in log files and agent transcripts as `\x1b[31m` noise. Results:
115
117
 
package/dist/cli.js CHANGED
@@ -291,7 +291,7 @@ const newWriteError = (base, closed) => ERROR_RE.test(closed.stderr) && !ERROR_R
291
291
  */
292
292
  function judgeLongRunning(base, closed) {
293
293
  if (!closed.timedOut && newWriteError(base, closed)) return {
294
- verdict: "warn",
294
+ verdict: "fail",
295
295
  reason: `crashed when stdout was closed, while a normal run kept running (exit ${closed.exitCode})`,
296
296
  evidence: crashEvidence(closed.stderr)
297
297
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cliprobe",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Black-box test any command-line program for terminal-edge bugs: crashes on a closed pipe (| head), color and control codes leaking into pipes, hangs waiting on stdin, broken Ctrl-C handling, a terminal left broken after Ctrl-C, and control characters from file names reaching your terminal.",
5
5
  "type": "module",
6
6
  "bin": {