cliprobe 0.10.0 → 1.0.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
@@ -31,7 +31,7 @@ npx cliprobe -- esbuild
31
31
  ```
32
32
 
33
33
  ```
34
- cliprobe 0.10.0: closed-pipe, color, pipe-escapes, stdin, ctrl-c, sigterm, restore, control-chars checks for esbuild
34
+ cliprobe 1.0.0: closed-pipe, color, pipe-escapes, stdin, ctrl-c, sigterm, restore, control-chars checks for esbuild
35
35
 
36
36
  closed-pipe
37
37
  FAIL esbuild --version crashed when stdout was closed (exit 0 -> 1)
@@ -87,6 +87,8 @@ The other checks cover the rest of what goes wrong between a program and the thi
87
87
  - [Usage](#usage)
88
88
  - [Exit codes](#exit-codes)
89
89
  - [In CI](#in-ci)
90
+ - [JSON output](#json-output)
91
+ - [Stability](#stability)
90
92
  - [Checks](#checks): [closed-pipe](#closed-pipe), [color](#color), [pipe-escapes](#pipe-escapes), [stdin](#stdin), [ctrl-c](#ctrl-c), [sigterm](#sigterm), [restore](#restore), [control-chars](#control-chars), [info checks](#info-checks)
91
93
  - [Fixing a failure in a Node.js CLI](#fixing-a-failure-in-a-nodejs-cli)
92
94
  - [Safety](#safety)
@@ -147,13 +149,13 @@ A failed check exits 1, so the step fails. In GitHub Actions, write a Markdown r
147
149
 
148
150
  ```yaml
149
151
  - name: Check the CLI for terminal-edge bugs
150
- run: npx --yes cliprobe@0 --format markdown --output-file "$GITHUB_STEP_SUMMARY" -- node ./dist/cli.js
152
+ run: npx --yes cliprobe@1 --format markdown --output-file "$GITHUB_STEP_SUMMARY" -- node ./dist/cli.js
151
153
  ```
152
154
 
153
155
  For CI systems that read test results, write JUnit XML instead and keep it even when the step fails:
154
156
 
155
157
  ```yaml
156
- - run: npx --yes cliprobe@0 --format junit --output-file reports/cliprobe.xml -- node ./dist/cli.js
158
+ - run: npx --yes cliprobe@1 --format junit --output-file reports/cliprobe.xml -- node ./dist/cli.js
157
159
  - uses: actions/upload-artifact@v7
158
160
  if: always()
159
161
  with:
@@ -163,6 +165,47 @@ For CI systems that read test results, write JUnit XML instead and keep it even
163
165
 
164
166
  In JUnit, each check is a test suite and each probe a test case: `FAIL` is a failure, could-not-run an error, `SKIP` skipped; `WARN`, `INFO` and `PASS` pass, with the verdict and reason in the case's output.
165
167
 
168
+ ## JSON output
169
+
170
+ `--format json` (or `--json`) writes one report, described by a JSON Schema that ships in the package as `cliprobe/schema.json`:
171
+
172
+ ```json
173
+ {
174
+ "tool": "cliprobe",
175
+ "schemaVersion": 1,
176
+ "version": "1.0.0",
177
+ "command": "node",
178
+ "checks": ["ctrl-c"],
179
+ "summary": { "pass": 0, "fail": 1, "warn": 0, "skip": 0, "error": 0, "info": 0 },
180
+ "results": [
181
+ {
182
+ "check": "ctrl-c",
183
+ "invocation": ["node", "server.js"],
184
+ "verdict": "fail",
185
+ "reason": "ignored Ctrl-C: still running 3 s later",
186
+ "details": {
187
+ "sentAfterMs": 1003,
188
+ "exitedAfterMs": null,
189
+ "exitCode": null,
190
+ "signal": "SIGKILL",
191
+ "stderrAfter": ""
192
+ }
193
+ }
194
+ ]
195
+ }
196
+ ```
197
+
198
+ Every result has the same five fields: `check`, `invocation` (the command and arguments that ran), `verdict` (`pass`, `fail`, `warn`, `skip`, `error` for could-not-run, or `info`), `reason` (a sentence for a person) and `details`, plus `evidence` when there is a line to quote. `details` holds the check's own measurements, such as exit codes, timings, the terminal modes left on or the processes left running; the schema describes each check's. Text from the program under test is escaped: control characters, line separators and bidi overrides appear as `\u` escapes, so the report can't drive a terminal when printed.
199
+
200
+ ## Stability
201
+
202
+ From 1.0, cliprobe follows semantic versioning, and these hold for every 1.x release:
203
+
204
+ - **No new failures.** A minor release never makes a passing or warning program fail. New checks, and new things an existing check notices, only warn until the next major release. So `cliprobe@1` in CI turns red only when your program changes.
205
+ - **Names and exit codes.** Check names, verdicts, options and exit codes stay as they are.
206
+ - **JSON.** `schemaVersion` stays `1`. Fields are only added, never removed, renamed or given a new type.
207
+ - **Not covered.** The wording of `reason` and `evidence`, and the human and Markdown output, are for people and may change. Match on `check` and `verdict`, not on text.
208
+
166
209
  ## Checks
167
210
 
168
211
  A default run does the eight checks below: closed-pipe, color, pipe-escapes, stdin, ctrl-c, sigterm, 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`.
@@ -269,7 +312,7 @@ Put `{fixture}` in the arguments where your command takes a path, for example `n
269
312
  | `WARN` | Printed a C1 control, carriage return or newline from a file name unescaped, which can hide or forge output |
270
313
  | `SKIP` | No `{fixture}` in the arguments, the command never printed the file names (before the timeout, for one that keeps running), or no usable `script` |
271
314
 
272
- Only the terminal run is judged. Into a pipe, `ls` and `find` print names exactly, by design; that is recorded in the JSON (`pipeRaw`) but doesn't affect the verdict. BSD `find` on macOS fails this check: unlike GNU `find`, it prints names raw even to a terminal.
315
+ Only the terminal run is judged. Into a pipe, `ls` and `find` print names exactly, by design; that is recorded in the JSON (`details.pipeRaw`) but doesn't affect the verdict. BSD `find` on macOS fails this check: unlike GNU `find`, it prints names raw even to a terminal.
273
316
 
274
317
  ### Info checks
275
318
 
package/dist/cli.js CHANGED
@@ -1882,14 +1882,26 @@ function formatHuman({ version, command, checks, results }, { color }) {
1882
1882
  lines.push("", summaryLine(countVerdicts(results)));
1883
1883
  return lines.join("\n") + "\n";
1884
1884
  }
1885
- // src/report/json.ts
1885
+ /**
1886
+ * The report as JSON. Each result keeps the fields every check shares at the top
1887
+ * and moves the check's own measurements into `details`.
1888
+ */
1886
1889
  function formatJson({ version, command, checks, results }) {
1887
1890
  return safeJson({
1888
1891
  tool: "cliprobe",
1892
+ schemaVersion: 1,
1889
1893
  version,
1890
1894
  command,
1891
1895
  checks,
1892
- results
1896
+ summary: countVerdicts(results),
1897
+ results: results.map(({ check, invocation, verdict, reason, evidence, ...details }) => ({
1898
+ check,
1899
+ invocation,
1900
+ verdict,
1901
+ reason,
1902
+ ...evidence === void 0 ? {} : { evidence },
1903
+ details
1904
+ }))
1893
1905
  }) + "\n";
1894
1906
  }
1895
1907
  // src/report/junit.ts
package/package.json CHANGED
@@ -1,14 +1,19 @@
1
1
  {
2
2
  "name": "cliprobe",
3
- "version": "0.10.0",
3
+ "version": "1.0.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, child processes left running after SIGTERM, a terminal left broken after Ctrl-C, and control characters from file names reaching your terminal.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "cliprobe": "dist/cli.js"
8
8
  },
9
9
  "files": [
10
- "dist"
10
+ "dist",
11
+ "schema.json"
11
12
  ],
13
+ "exports": {
14
+ "./schema.json": "./schema.json",
15
+ "./package.json": "./package.json"
16
+ },
12
17
  "scripts": {
13
18
  "build": "tsdown",
14
19
  "dev": "node src/cli/main.ts",
@@ -83,6 +88,7 @@
83
88
  "@types/markdown-it": "^14.2.0",
84
89
  "@types/node": "^22.20.5",
85
90
  "@vitest/coverage-v8": "^5.1.0",
91
+ "ajv": "^8.20.0",
86
92
  "conventional-changelog-conventionalcommits": "^9.3.1",
87
93
  "fast-xml-parser": "^5.12.0",
88
94
  "husky": "^9.1.7",
package/schema.json ADDED
@@ -0,0 +1,595 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://unpkg.com/cliprobe@1/schema.json",
4
+ "title": "cliprobe JSON report",
5
+ "description": "Output of cliprobe --format json, schemaVersion 1. Within 1.x, fields are only added, never removed, renamed or retyped.",
6
+ "type": "object",
7
+ "required": ["tool", "schemaVersion", "version", "command", "checks", "summary", "results"],
8
+ "properties": {
9
+ "tool": {
10
+ "const": "cliprobe"
11
+ },
12
+ "schemaVersion": {
13
+ "const": 1
14
+ },
15
+ "version": {
16
+ "type": "string",
17
+ "description": "The cliprobe version that wrote the report."
18
+ },
19
+ "command": {
20
+ "type": "string",
21
+ "description": "The command under test, as given."
22
+ },
23
+ "checks": {
24
+ "type": "array",
25
+ "items": {
26
+ "$ref": "#/$defs/checkName"
27
+ },
28
+ "description": "The checks that ran, in order."
29
+ },
30
+ "summary": {
31
+ "type": "object",
32
+ "description": "How many results have each verdict.",
33
+ "required": ["pass", "fail", "warn", "skip", "error", "info"],
34
+ "properties": {
35
+ "pass": {
36
+ "type": "integer",
37
+ "minimum": 0
38
+ },
39
+ "fail": {
40
+ "type": "integer",
41
+ "minimum": 0
42
+ },
43
+ "warn": {
44
+ "type": "integer",
45
+ "minimum": 0
46
+ },
47
+ "skip": {
48
+ "type": "integer",
49
+ "minimum": 0
50
+ },
51
+ "error": {
52
+ "type": "integer",
53
+ "minimum": 0
54
+ },
55
+ "info": {
56
+ "type": "integer",
57
+ "minimum": 0
58
+ }
59
+ }
60
+ },
61
+ "results": {
62
+ "type": "array",
63
+ "items": {
64
+ "$ref": "#/$defs/result"
65
+ }
66
+ }
67
+ },
68
+ "$defs": {
69
+ "checkName": {
70
+ "enum": [
71
+ "closed-pipe",
72
+ "color",
73
+ "pipe-escapes",
74
+ "stdin",
75
+ "ctrl-c",
76
+ "sigterm",
77
+ "restore",
78
+ "control-chars",
79
+ "startup",
80
+ "baseline"
81
+ ]
82
+ },
83
+ "verdict": {
84
+ "enum": ["pass", "fail", "warn", "skip", "error", "info"],
85
+ "description": "fail sets exit code 1; error means the probe could not run; info comes only from info checks."
86
+ },
87
+ "controlKind": {
88
+ "enum": ["cursor", "erase", "mode", "hyperlink", "title", "osc", "redraw"]
89
+ },
90
+ "result": {
91
+ "type": "object",
92
+ "description": "One check on one invocation.",
93
+ "required": ["check", "invocation", "verdict", "reason", "details"],
94
+ "properties": {
95
+ "check": {
96
+ "$ref": "#/$defs/checkName"
97
+ },
98
+ "invocation": {
99
+ "type": "array",
100
+ "minItems": 1,
101
+ "items": {
102
+ "type": "string"
103
+ },
104
+ "description": "The command and arguments that were run."
105
+ },
106
+ "verdict": {
107
+ "$ref": "#/$defs/verdict"
108
+ },
109
+ "reason": {
110
+ "type": "string",
111
+ "description": "One sentence for a person; its wording may change."
112
+ },
113
+ "evidence": {
114
+ "type": "string",
115
+ "description": "The line that led to the verdict, escaped; absent when there is none."
116
+ },
117
+ "details": {
118
+ "type": "object",
119
+ "description": "The check's own measurements, described by $defs/details.<check>."
120
+ }
121
+ },
122
+ "allOf": [
123
+ {
124
+ "if": {
125
+ "properties": {
126
+ "check": {
127
+ "const": "closed-pipe"
128
+ }
129
+ }
130
+ },
131
+ "then": {
132
+ "properties": {
133
+ "details": {
134
+ "$ref": "#/$defs/details.closed-pipe"
135
+ }
136
+ }
137
+ }
138
+ },
139
+ {
140
+ "if": {
141
+ "properties": {
142
+ "check": {
143
+ "const": "color"
144
+ }
145
+ }
146
+ },
147
+ "then": {
148
+ "properties": {
149
+ "details": {
150
+ "$ref": "#/$defs/details.color"
151
+ }
152
+ }
153
+ }
154
+ },
155
+ {
156
+ "if": {
157
+ "properties": {
158
+ "check": {
159
+ "const": "pipe-escapes"
160
+ }
161
+ }
162
+ },
163
+ "then": {
164
+ "properties": {
165
+ "details": {
166
+ "$ref": "#/$defs/details.pipe-escapes"
167
+ }
168
+ }
169
+ }
170
+ },
171
+ {
172
+ "if": {
173
+ "properties": {
174
+ "check": {
175
+ "const": "stdin"
176
+ }
177
+ }
178
+ },
179
+ "then": {
180
+ "properties": {
181
+ "details": {
182
+ "$ref": "#/$defs/details.stdin"
183
+ }
184
+ }
185
+ }
186
+ },
187
+ {
188
+ "if": {
189
+ "properties": {
190
+ "check": {
191
+ "const": "ctrl-c"
192
+ }
193
+ }
194
+ },
195
+ "then": {
196
+ "properties": {
197
+ "details": {
198
+ "$ref": "#/$defs/details.ctrl-c"
199
+ }
200
+ }
201
+ }
202
+ },
203
+ {
204
+ "if": {
205
+ "properties": {
206
+ "check": {
207
+ "const": "sigterm"
208
+ }
209
+ }
210
+ },
211
+ "then": {
212
+ "properties": {
213
+ "details": {
214
+ "$ref": "#/$defs/details.sigterm"
215
+ }
216
+ }
217
+ }
218
+ },
219
+ {
220
+ "if": {
221
+ "properties": {
222
+ "check": {
223
+ "const": "restore"
224
+ }
225
+ }
226
+ },
227
+ "then": {
228
+ "properties": {
229
+ "details": {
230
+ "$ref": "#/$defs/details.restore"
231
+ }
232
+ }
233
+ }
234
+ },
235
+ {
236
+ "if": {
237
+ "properties": {
238
+ "check": {
239
+ "const": "control-chars"
240
+ }
241
+ }
242
+ },
243
+ "then": {
244
+ "properties": {
245
+ "details": {
246
+ "$ref": "#/$defs/details.control-chars"
247
+ }
248
+ }
249
+ }
250
+ },
251
+ {
252
+ "if": {
253
+ "properties": {
254
+ "check": {
255
+ "const": "startup"
256
+ }
257
+ }
258
+ },
259
+ "then": {
260
+ "properties": {
261
+ "details": {
262
+ "$ref": "#/$defs/details.startup"
263
+ }
264
+ }
265
+ }
266
+ },
267
+ {
268
+ "if": {
269
+ "properties": {
270
+ "check": {
271
+ "const": "baseline"
272
+ }
273
+ }
274
+ },
275
+ "then": {
276
+ "properties": {
277
+ "details": {
278
+ "$ref": "#/$defs/details.baseline"
279
+ }
280
+ }
281
+ }
282
+ }
283
+ ]
284
+ },
285
+ "details.closed-pipe": {
286
+ "type": "object",
287
+ "description": "A normal run into a pipe, then a run with stdout already closed.",
288
+ "required": ["baseline", "closed"],
289
+ "properties": {
290
+ "baseline": {
291
+ "type": "object",
292
+ "description": "The normal run.",
293
+ "required": ["exitCode", "signal", "stdoutBytes"],
294
+ "properties": {
295
+ "exitCode": {
296
+ "type": ["integer", "null"],
297
+ "description": "Exit code; null if it was killed by a signal or never ran."
298
+ },
299
+ "signal": {
300
+ "type": ["string", "null"],
301
+ "description": "Signal that ended it, such as \"SIGPIPE\"; null if it exited."
302
+ },
303
+ "stdoutBytes": {
304
+ "type": "integer",
305
+ "minimum": 0
306
+ }
307
+ }
308
+ },
309
+ "closed": {
310
+ "type": "object",
311
+ "description": "The run with stdout closed.",
312
+ "required": ["exitCode", "signal", "timedOut", "stderr"],
313
+ "properties": {
314
+ "exitCode": {
315
+ "type": ["integer", "null"],
316
+ "description": "Exit code; null if it was killed by a signal or never ran."
317
+ },
318
+ "signal": {
319
+ "type": ["string", "null"],
320
+ "description": "Signal that ended it, such as \"SIGPIPE\"; null if it exited."
321
+ },
322
+ "timedOut": {
323
+ "type": "boolean"
324
+ },
325
+ "stderr": {
326
+ "type": "string",
327
+ "description": "What it printed to stderr, up to 64 KiB."
328
+ }
329
+ }
330
+ }
331
+ }
332
+ },
333
+ "details.color": {
334
+ "type": "object",
335
+ "description": "Runs into a pipe, under a terminal and under a terminal with NO_COLOR=1; null for a run that was not needed.",
336
+ "required": ["pipe", "tty", "noColor"],
337
+ "properties": {
338
+ "pipe": {
339
+ "type": "object",
340
+ "description": "The run into a pipe.",
341
+ "required": ["exitCode", "stdoutStyled", "stderrStyled"],
342
+ "properties": {
343
+ "exitCode": {
344
+ "type": ["integer", "null"],
345
+ "description": "Exit code; null if it was killed by a signal or never ran."
346
+ },
347
+ "stdoutStyled": {
348
+ "type": "boolean"
349
+ },
350
+ "stderrStyled": {
351
+ "type": "boolean"
352
+ }
353
+ }
354
+ },
355
+ "tty": {
356
+ "type": ["object", "null"],
357
+ "description": "The run under a terminal.",
358
+ "required": ["exitCode", "timedOut", "styled"],
359
+ "properties": {
360
+ "exitCode": {
361
+ "type": ["integer", "null"],
362
+ "description": "Exit code; null if it was killed by a signal or never ran."
363
+ },
364
+ "timedOut": {
365
+ "type": "boolean"
366
+ },
367
+ "styled": {
368
+ "type": "boolean"
369
+ }
370
+ }
371
+ },
372
+ "noColor": {
373
+ "type": ["object", "null"],
374
+ "description": "The run under a terminal with NO_COLOR=1.",
375
+ "required": ["exitCode", "timedOut", "styled"],
376
+ "properties": {
377
+ "exitCode": {
378
+ "type": ["integer", "null"],
379
+ "description": "Exit code; null if it was killed by a signal or never ran."
380
+ },
381
+ "timedOut": {
382
+ "type": "boolean"
383
+ },
384
+ "styled": {
385
+ "type": "boolean"
386
+ }
387
+ }
388
+ }
389
+ }
390
+ },
391
+ "details.pipe-escapes": {
392
+ "type": "object",
393
+ "description": "Kinds of control code found on each stream, without repeats.",
394
+ "required": ["stdoutKinds", "stderrKinds"],
395
+ "properties": {
396
+ "stdoutKinds": {
397
+ "type": "array",
398
+ "items": {
399
+ "$ref": "#/$defs/controlKind"
400
+ }
401
+ },
402
+ "stderrKinds": {
403
+ "type": "array",
404
+ "items": {
405
+ "$ref": "#/$defs/controlKind"
406
+ }
407
+ }
408
+ }
409
+ },
410
+ "details.stdin": {
411
+ "type": "object",
412
+ "description": "The run with stdin as an open pipe that is closed after a while.",
413
+ "required": ["closedMs", "waitedForStdin", "finishedAfterCloseMs"],
414
+ "properties": {
415
+ "closedMs": {
416
+ "type": ["integer", "null"],
417
+ "minimum": 0,
418
+ "description": "When stdin was closed, in ms after start; null if it finished first."
419
+ },
420
+ "waitedForStdin": {
421
+ "type": "boolean"
422
+ },
423
+ "finishedAfterCloseMs": {
424
+ "type": ["integer", "null"],
425
+ "minimum": 0,
426
+ "description": "From closing stdin to the program finishing; null if not measured."
427
+ }
428
+ }
429
+ },
430
+ "details.ctrl-c": {
431
+ "type": "object",
432
+ "description": "SIGINT to the process group after 1 s.",
433
+ "required": ["sentAfterMs", "exitedAfterMs", "exitCode", "signal", "stderrAfter"],
434
+ "properties": {
435
+ "sentAfterMs": {
436
+ "type": ["integer", "null"],
437
+ "minimum": 0,
438
+ "description": "When SIGINT was sent, in ms after start; null if the program had already exited."
439
+ },
440
+ "exitedAfterMs": {
441
+ "type": ["integer", "null"],
442
+ "minimum": 0,
443
+ "description": "From SIGINT to exit; null if it was not sent or the program ignored it."
444
+ },
445
+ "exitCode": {
446
+ "type": ["integer", "null"],
447
+ "description": "Exit code; null if it was killed by a signal or never ran."
448
+ },
449
+ "signal": {
450
+ "type": ["string", "null"],
451
+ "description": "Signal that ended it, such as \"SIGPIPE\"; null if it exited."
452
+ },
453
+ "stderrAfter": {
454
+ "type": "string",
455
+ "description": "The last 2000 characters it printed to stderr after SIGINT."
456
+ }
457
+ }
458
+ },
459
+ "details.sigterm": {
460
+ "type": "object",
461
+ "description": "SIGTERM to the program alone after 1 s.",
462
+ "required": [
463
+ "sentAfterMs",
464
+ "exitedAfterMs",
465
+ "exitCode",
466
+ "signal",
467
+ "leftRunning",
468
+ "stderrAfter"
469
+ ],
470
+ "properties": {
471
+ "sentAfterMs": {
472
+ "type": ["integer", "null"],
473
+ "minimum": 0,
474
+ "description": "When SIGTERM was sent, in ms after start; null if the program had already exited."
475
+ },
476
+ "exitedAfterMs": {
477
+ "type": ["integer", "null"],
478
+ "minimum": 0,
479
+ "description": "From SIGTERM to exit; null if it was not sent or the program ignored it."
480
+ },
481
+ "exitCode": {
482
+ "type": ["integer", "null"],
483
+ "description": "Exit code; null if it was killed by a signal or never ran."
484
+ },
485
+ "signal": {
486
+ "type": ["string", "null"],
487
+ "description": "Signal that ended it, such as \"SIGPIPE\"; null if it exited."
488
+ },
489
+ "leftRunning": {
490
+ "type": "array",
491
+ "items": {
492
+ "type": "string"
493
+ },
494
+ "description": "Command lines of the processes still running in its group after it exited."
495
+ },
496
+ "stderrAfter": {
497
+ "type": "string",
498
+ "description": "The last 2000 characters it printed to stderr after SIGTERM."
499
+ }
500
+ }
501
+ },
502
+ "details.restore": {
503
+ "type": "object",
504
+ "description": "The run under a terminal.",
505
+ "required": ["interrupted", "openModes"],
506
+ "properties": {
507
+ "interrupted": {
508
+ "type": "boolean",
509
+ "description": "Whether Ctrl-C was typed; false when the program exited first."
510
+ },
511
+ "openModes": {
512
+ "type": "array",
513
+ "description": "The terminal modes it left switched on.",
514
+ "items": {
515
+ "type": "object",
516
+ "description": "One mode left on.",
517
+ "required": ["label", "sequence", "line"],
518
+ "properties": {
519
+ "label": {
520
+ "type": "string"
521
+ },
522
+ "sequence": {
523
+ "type": "string",
524
+ "description": "The sequence that switched it on, escaped."
525
+ },
526
+ "line": {
527
+ "type": "integer",
528
+ "minimum": 1
529
+ }
530
+ }
531
+ }
532
+ }
533
+ }
534
+ },
535
+ "details.control-chars": {
536
+ "type": "object",
537
+ "description": "Kinds of hostile file name that reached the output unescaped.",
538
+ "required": ["terminalRaw", "pipeRaw"],
539
+ "properties": {
540
+ "terminalRaw": {
541
+ "type": "array",
542
+ "items": {
543
+ "type": "string"
544
+ },
545
+ "description": "In the terminal run; these decide the verdict."
546
+ },
547
+ "pipeRaw": {
548
+ "type": "array",
549
+ "items": {
550
+ "type": "string"
551
+ },
552
+ "description": "In the pipe run; normal for ls and find, so not judged."
553
+ }
554
+ }
555
+ },
556
+ "details.startup": {
557
+ "type": "object",
558
+ "description": "Timed runs.",
559
+ "required": ["runsMs", "medianMs"],
560
+ "properties": {
561
+ "runsMs": {
562
+ "type": "array",
563
+ "items": {
564
+ "type": "integer",
565
+ "minimum": 0
566
+ },
567
+ "description": "Wall time of each timed run."
568
+ },
569
+ "medianMs": {
570
+ "type": ["integer", "null"],
571
+ "minimum": 0
572
+ }
573
+ }
574
+ },
575
+ "details.baseline": {
576
+ "type": "object",
577
+ "description": "One run with the extra flag.",
578
+ "required": ["exitCode", "stdoutLines", "stderrLines"],
579
+ "properties": {
580
+ "exitCode": {
581
+ "type": ["integer", "null"],
582
+ "description": "Exit code; null if it was killed by a signal or never ran."
583
+ },
584
+ "stdoutLines": {
585
+ "type": "integer",
586
+ "minimum": 0
587
+ },
588
+ "stderrLines": {
589
+ "type": "integer",
590
+ "minimum": 0
591
+ }
592
+ }
593
+ }
594
+ }
595
+ }