@dzhechkov/harness-cli 0.8.15 → 0.8.16
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/.dz-manifest.json +7 -7
- package/README.md +50 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +46 -13
- package/dist/cli.js.map +1 -1
- package/package.json +10 -10
- package/sbom.json +6 -6
- package/src/cli.ts +44 -13
package/.dz-manifest.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "README.md",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "650d078c061e10082536c72852622b391e76ad35d89ae1ae710ff2209eef4686"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "dist/bin.d.ts",
|
|
@@ -49,15 +49,15 @@
|
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"path": "dist/cli.d.ts.map",
|
|
52
|
-
"sha256": "
|
|
52
|
+
"sha256": "a8f5e5f83daaff53ce46607c9b3e69fb97f0e84223e819bb9e740ce5517b99f9"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"path": "dist/cli.js",
|
|
56
|
-
"sha256": "
|
|
56
|
+
"sha256": "958649fbb537b1bab400f7860ba540aa2cf62799317bcdacdf8e1e6010f2629e"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"path": "dist/cli.js.map",
|
|
60
|
-
"sha256": "
|
|
60
|
+
"sha256": "718094c24661e25bfca2ef64c46b62e1a0fb9871969cd9c315fbf173186ba82f"
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"path": "dist/command-inventory.d.ts",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
"path": "package.json",
|
|
152
|
-
"sha256": "
|
|
152
|
+
"sha256": "1052ef8c24990eb1a2f6eed3db71d84240f6ecc2f7e1db1d50af10fa6c33c2af"
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
"path": "src/bin.ts",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
"path": "src/cli.ts",
|
|
164
|
-
"sha256": "
|
|
164
|
+
"sha256": "43cd47da3a2ffdd54b48989c1b30430473d4d20a903c44c6f640284ffa90fb6c"
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
"path": "src/command-inventory.ts",
|
|
@@ -185,5 +185,5 @@
|
|
|
185
185
|
}
|
|
186
186
|
]
|
|
187
187
|
},
|
|
188
|
-
"signature": "
|
|
188
|
+
"signature": "kG1LHcsT58yugD68UaYwCAP6hf97/t0j6FICg9Ggas8cXrsjoMh71dUXLDbi1wu9j+kK4VPaMznY3gof0YXWCg=="
|
|
189
189
|
}
|
package/README.md
CHANGED
|
@@ -2206,17 +2206,31 @@ echo "how do I handle replication lag?" | dz brain ground --budget 2000 # eage
|
|
|
2206
2206
|
|
|
2207
2207
|
### Live self-learning panel (`dz statusline`)
|
|
2208
2208
|
|
|
2209
|
+
The owner's combined panel keeps the mirror indicator silent on equal lesson counts. On divergence
|
|
2210
|
+
it shows `dz 🎓 N (mirror M ⚠)`. A mirror that EXISTS but cannot be read shows
|
|
2211
|
+
`dz 🎓 N (mirror unreadable ⚠)`; a project with NO mirror at all stays silent — there is nothing to
|
|
2212
|
+
compare, and lighting up there would make the indicator permanent noise.
|
|
2213
|
+
The mirror figure counts LESSONS only — backlog ideas and book units are excluded, so the indicator
|
|
2214
|
+
is comparable with the lexical count instead of lighting up permanently. It is read from
|
|
2215
|
+
`vectorLessonRows`, never from `vectorRows`: that field keeps counting the whole mirror because the
|
|
2216
|
+
store guard reads it as an integrity signal, and narrowing it would look like a store collapse.
|
|
2217
|
+
The JSON payload exposes these warnings as `patternMirror`; parity omits that field. Both surfaces
|
|
2218
|
+
carry the indicator — the combined panel helper and `dz statusline` itself.
|
|
2219
|
+
|
|
2209
2220
|
`dz statusline` renders a compact Claude Code statusline that surfaces dz's learning at a glance:
|
|
2210
2221
|
|
|
2211
2222
|
```
|
|
2212
|
-
🎓 dz: 12 (9
|
|
2223
|
+
🎓 dz: 12 (9 active · 3 quarantined) (mirror 11 ⚠) · 🧠 3 sources (223/315/60)
|
|
2213
2224
|
```
|
|
2214
2225
|
|
|
2215
2226
|
The parenthesized split is read only from the primary lexical store. A row is quarantined exactly
|
|
2216
2227
|
when parsed metadata has `qStatus: "quarantined"`; historical fields do not count. The quarantine
|
|
2217
|
-
fragment is omitted at zero, `⚠` appears at one third of the pool, and `⚠
|
|
2228
|
+
fragment is omitted at zero, `⚠` appears at one third of the pool, and `⚠ tiers ΔN` reports a
|
|
2218
2229
|
quarantine-label difference greater than five rows from the vector mirror. `M sources` is how many
|
|
2219
|
-
brain sources (book-KBs / grounding stores) are wired
|
|
2230
|
+
brain sources (book-KBs / grounding stores) are wired, and the parenthesised list after it gives the
|
|
2231
|
+
KU volume of EACH source in brain order — four sources of 300 units and four of three read
|
|
2232
|
+
identically without it. The list is omitted (bare source count) when the volumes cannot be
|
|
2233
|
+
enumerated, rather than printing invented zeros. Panel text is English by owner request. Enable it once:
|
|
2220
2234
|
|
|
2221
2235
|
```bash
|
|
2222
2236
|
dz statusline --install # wires it into .claude/settings.json → statusLine
|
|
@@ -2237,7 +2251,7 @@ every trace flush:
|
|
|
2237
2251
|
|
|
2238
2252
|
```bash
|
|
2239
2253
|
# the /feature-adr pipeline — reports the learning loop it is actually running
|
|
2240
|
-
dz statusline --fa-record --slug add-user-auth --step "Step 8 QE" --recalled 7 --stored 2 --mode full
|
|
2254
|
+
dz statusline --fa-record --slug add-user-auth --step "Step 8 QE" --run-id fa-20260907-1 --recalled 7 --stored 2 --mode full
|
|
2241
2255
|
|
|
2242
2256
|
# a generated loop — same file, different producer, so it says so
|
|
2243
2257
|
dz statusline --fa-record --slug my-loop --step build --kind loop
|
|
@@ -2292,6 +2306,13 @@ echo '{}' | dz statusline --project "$D"
|
|
|
2292
2306
|
# → 📐 add-user-auth [M] 5/8 ⛔ K2 → Step 6 · 0м/— # a LEGITIMATE regression, recorded verbatim
|
|
2293
2307
|
```
|
|
2294
2308
|
|
|
2309
|
+
The staged workflow producer creates `features/<slug>/.fa-state/run-id` from shell time on the first
|
|
2310
|
+
phase record, overwrites it on a new invocation, and passes `--run-id "$(cat … || true)"` on every
|
|
2311
|
+
phase command. `cmdStatuslineFaRecord` trims and forwards a non-empty value to the core state writer,
|
|
2312
|
+
so a restart of the same slug can record its real early step while a backwards record carrying the
|
|
2313
|
+
same id remains absorbed. The read is deliberately fail-open: no readable file, an empty flag, or an
|
|
2314
|
+
omitted flag keeps the legacy behavior and never stops the pipeline.
|
|
2315
|
+
|
|
2295
2316
|
##### A refused write is LOUD, and never breaks your pipeline
|
|
2296
2317
|
|
|
2297
2318
|
The slot transition runs inside the `fa-phase-slot` named lock (it is a read-modify-write: two
|
|
@@ -4650,7 +4671,23 @@ refusal as the honest answer.
|
|
|
4650
4671
|
|
|
4651
4672
|
## Status
|
|
4652
4673
|
|
|
4653
|
-
`harness-core v0.8.
|
|
4674
|
+
`harness-core v0.8.22` · `harness-cli v0.8.16` — **this release: the instruments stopped lying in
|
|
4675
|
+
four measured ways.** (1) A test run's exit code no longer conflates "a test failed" with "the runner
|
|
4676
|
+
choked": `classifyRunFailure` names `runner-infrastructure` with the closed reason
|
|
4677
|
+
`worker-rpc-timeout` when zero tests failed AND the runner's own worker-RPC pattern is present — an
|
|
4678
|
+
infrastructure outcome is NEVER green, it only stops being anonymous. (2) The Codex routing table is
|
|
4679
|
+
PER-STAGE, following the owner's 2026-09-08 note: router Terra, requirements Sol, research Terra,
|
|
4680
|
+
ADR and architecture Astra, plan Astra on L/XL and Sol otherwise, code Sol — and the plan cell reads
|
|
4681
|
+
the tier the ROUTER produced, not only an explicitly passed argument, which is what kept half the
|
|
4682
|
+
matrix dead. (3) The owner panel gains a mirror indicator (lexical lessons vs mirrored lessons,
|
|
4683
|
+
silent on parity, silent when there is no mirror at all, loud when a mirror EXISTS and cannot be
|
|
4684
|
+
read) and per-source KU volumes next to the brain count; panel text is English. (4) A mutation
|
|
4685
|
+
registry entry may DECLARE an uncoverable protection with a mandatory reason: gaps are counted on
|
|
4686
|
+
their own line with their own `⚠` marker and no longer fail the aggregate verdict — a lamp that is
|
|
4687
|
+
always on is read exactly like a lamp that is off. Six such gaps are declared for the orchestrator
|
|
4688
|
+
script, which lives outside every package and is guarded today only by source-text assertions.
|
|
4689
|
+
|
|
4690
|
+
**Previously (`v0.8.12`):** ONE definition of "a dz
|
|
4654
4691
|
command" (ADR-001, feature `command-count-triad`). `src/command-inventory.ts` is the single pure
|
|
4655
4692
|
parser every consumer derives from — the layer-1 parity test, `dz name-check`, and the new public
|
|
4656
4693
|
exports (`commandInventory`, `declaredCommands`, `dispatchedCommands`, `documentedCommands`,
|
|
@@ -4864,3 +4901,11 @@ The `.claude-plugin/` directory contains `plugin.json` + `marketplace.json` comp
|
|
|
4864
4901
|
- [OpenCode](https://github.com/sst/opencode) — 3rd target platform (160K+ stars)
|
|
4865
4902
|
- [Hermes Agent](https://github.com/NousResearch/hermes-agent) — 4th target platform
|
|
4866
4903
|
- [OpenClaude](https://github.com/gitlawb/openclaude) — 5th target platform (28K+ stars)
|
|
4904
|
+
|
|
4905
|
+
### Shared Markdown masking in feature-adr gates
|
|
4906
|
+
|
|
4907
|
+
The standalone plan-completeness gate ships with `markdown-masker.mjs`, copied byte-for-byte from
|
|
4908
|
+
harness-core's `src/markdown-masker.ts`. It runs without a core build. Amendment checks, swarm briefs
|
|
4909
|
+
and K2 share the parser while retaining their existing unclosed-block and indentation policies.
|
|
4910
|
+
The four-space indented-code gap remains open for amendment checks and K2; swarm briefs retain their
|
|
4911
|
+
existing masking of indented code. Versions are unchanged in this staged change.
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mapp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,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACxC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAChC,kGAAkG;IAClG,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B,GACA,OAAO,CAAC,eAAe,CAAC,CA8D1B;AAs6FD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,KAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAgT5E"}
|
package/dist/cli.js
CHANGED
|
@@ -169,7 +169,7 @@ Usage:
|
|
|
169
169
|
dz brain init [--project <dir>] [--k <N>] (wire the grounding hook into .claude/settings.json — opt-in)
|
|
170
170
|
dz statusline [--json] [--install] [--project <dir>] (live self-learning panel for Claude Code's status bar; reads the CC JSON payload from STDIN)
|
|
171
171
|
dz store-guard [--status|--reset] [--yes] [--project <dir>] (show the monotonic external high-water mark; --reset is the only lowering path and requires confirmation or --yes)
|
|
172
|
-
dz statusline --fa-record --slug <s> --step "<label>" [--kind <feature-adr|loop>] [--tier <S|M|L|XL>] [--recalled <n>] [--stored <n>] [--mode <m>] (feature-adr: record live per-run learning state + phase → 📐 SECOND-LINE phase panel; a plain "Step <n>"
|
|
172
|
+
dz statusline --fa-record --slug <s> --step "<label>" [--kind <feature-adr|loop>] [--tier <S|M|L|XL>] [--run-id <id>] [--recalled <n>] [--stored <n>] [--mode <m>] (feature-adr: record live per-run learning state + phase → 📐 SECOND-LINE phase panel; the monotone guard absorbs a backwards plain "Step <n>" only within the same non-empty run id, while an absent/empty id retains legacy fresh-slot behavior — prefix the label with ⛔ or ⏸ to record a legitimate regression)
|
|
173
173
|
dz usage [--json] [--project <dir>] | dz usage --calibrate --session <pct> --weekly <pct> [--model fable=<pct>] [--project <dir>] (ESTIMATE Claude usage from fixed reset windows; optional per-model weekly binding; exit 0 ALWAYS; pct=null when limits unconfigured)
|
|
174
174
|
dz usage --by-stage [--run <runId> | --slug <slug>] [--epsilon <0..1>] [--write <file.jsonl>] [--json] (per-stage cost ledger for ONE feature-adr run + the reconciliation invariant: accounted + unaccounted = run total; verdict BALANCED | DEFECT | INSUFFICIENT_DATA; local transcript ESTIMATES — catches ATTRIBUTION errors, not pricing errors)
|
|
175
175
|
dz chain [--project <dir>] [--json] (verify EVERY hash-chained journal in ONE command: coverage is DERIVED from the CHAINED_JOURNALS registry, never typed, so a journal cannot be given a chain and checked by nobody. An ABSENT journal is NAMED absent, never omitted — omission and cleanliness are indistinguishable in a report. Statuses: ok | healed (defects the current unbroken run has outlived — verdicts over present records are sound) | unchained (present, no chained record yet — legal) | absent | broken | unreadable. Exit 1 on broken/unreadable: a verifier that reports damage and exits 0 is one no automation can act on)
|
|
@@ -2079,12 +2079,14 @@ function cmdStatuslineFaRecord(options, cwd, write, writeErr) {
|
|
|
2079
2079
|
return 1;
|
|
2080
2080
|
}
|
|
2081
2081
|
const mode = options.get('mode');
|
|
2082
|
+
const runId = options.get('run-id')?.trim();
|
|
2082
2083
|
const projectRoot = resolve(cwd, options.get('project') ?? '.');
|
|
2083
2084
|
const outcome = writeFeatureAdrStateDetailed(projectRoot, {
|
|
2084
2085
|
kind: kindRaw, slug, step, recalled, stored,
|
|
2085
2086
|
...(reinforced > 0 ? { reinforced } : {}),
|
|
2086
2087
|
...(mode !== undefined && mode.trim() !== '' ? { mode: mode.trim() } : {}),
|
|
2087
2088
|
...(tier !== undefined ? { tier } : {}),
|
|
2089
|
+
...(runId !== undefined && runId !== '' ? { runId } : {}),
|
|
2088
2090
|
});
|
|
2089
2091
|
const state = outcome.state;
|
|
2090
2092
|
if (state === undefined) {
|
|
@@ -2299,26 +2301,37 @@ function cmdStatusline(options, flags, cwd, write, readStdin, writeErr) {
|
|
|
2299
2301
|
}));
|
|
2300
2302
|
return 0;
|
|
2301
2303
|
}
|
|
2304
|
+
// ТЕКСТ ПАНЕЛИ — ПО-АНГЛИЙСКИ по просьбе владельца 2026-09-09: строка статуса узкая,
|
|
2305
|
+
// английские слова в ней короче русских при той же ясности. Комментарии остаются русскими.
|
|
2302
2306
|
const breakdown = data.patternBreakdown;
|
|
2303
2307
|
let line = breakdown === undefined
|
|
2304
2308
|
? `🎓 dz: ${data.patterns} patterns`
|
|
2305
|
-
: `🎓 dz: ${data.patterns} (${breakdown.active}
|
|
2306
|
-
? ` · ${breakdown.quarantined}
|
|
2307
|
-
: ''})${breakdown.tierDelta !== undefined ? ` ⚠
|
|
2309
|
+
: `🎓 dz: ${data.patterns} (${breakdown.active} active${breakdown.quarantined > 0
|
|
2310
|
+
? ` · ${breakdown.quarantined} quarantined${breakdown.attention ? ' ⚠' : ''}`
|
|
2311
|
+
: ''})${breakdown.tierDelta !== undefined ? ` ⚠ tiers Δ${breakdown.tierDelta}` : ''}`;
|
|
2312
|
+
// Показатель зеркала печатается и здесь: `dz statusline` — та же панель, и показатель,
|
|
2313
|
+
// живущий только во вспомогательном скрипте, для этой поверхности просто не существовал.
|
|
2314
|
+
if (data.patternMirror?.state === 'unavailable')
|
|
2315
|
+
line += ' (mirror unreadable ⚠)';
|
|
2316
|
+
else if (data.patternMirror?.state === 'different')
|
|
2317
|
+
line += ` (mirror ${data.patternMirror.vector} ⚠)`;
|
|
2308
2318
|
if (data.storeHealth?.verdict === 'collapsed') {
|
|
2309
|
-
line += ` ⛔
|
|
2319
|
+
line += ` ⛔ COLLAPSE: was ${data.storeHealth.previousMax ?? '?'} · dz store-guard --reset`;
|
|
2310
2320
|
}
|
|
2311
2321
|
else if (data.storeHealth?.verdict === 'cold-start-over-existing') {
|
|
2312
|
-
line += ` ⛔
|
|
2322
|
+
line += ` ⛔ STORE EMPTY: was ${data.storeHealth.previousMax ?? '?'} · restore from snapshots ${data.storeHealth.snapshotPath ?? ''}`.trimEnd();
|
|
2313
2323
|
}
|
|
2314
2324
|
else if (data.storeHealth?.verdict === 'unreadable') {
|
|
2315
|
-
line += ` ⛔
|
|
2325
|
+
line += ` ⛔ STORE UNREADABLE${data.storeHealth.unreadableFiles !== undefined && data.storeHealth.unreadableFiles.length > 0
|
|
2316
2326
|
? `: ${data.storeHealth.unreadableFiles.join(', ')}` : ''}`;
|
|
2317
2327
|
}
|
|
2318
2328
|
else if (data.storeHealth?.verdict === 'source-changed') {
|
|
2319
|
-
line += ' ⚠
|
|
2329
|
+
line += ' ⚠ store source changed';
|
|
2320
2330
|
}
|
|
2321
|
-
|
|
2331
|
+
// Рядом с числом источников — объём каждого через «/» (просьба владельца 2026-09-09):
|
|
2332
|
+
// четыре источника по 300 единиц и четыре по три — разные корпуса, а число одно и то же.
|
|
2333
|
+
const ku = data.brainKuCounts.length > 0 ? ` (${data.brainKuCounts.join('/')})` : '';
|
|
2334
|
+
line += `${data.usedPatterns !== undefined ? ` · ${data.usedPatterns} used` : ''} · 🧠 ${data.brainSources} sources${ku}`;
|
|
2322
2335
|
const branch = statuslineGitBranch(projectRoot);
|
|
2323
2336
|
if (branch !== undefined)
|
|
2324
2337
|
line += ` · ⎇ ${branch}`;
|
|
@@ -11012,14 +11025,34 @@ function cmdMutationGate(options, flags, cwd, write, injectedRunner) {
|
|
|
11012
11025
|
return fail(`registry ${registryPath} is invalid:\n - ${parsed.errors.join('\n - ')}`);
|
|
11013
11026
|
}
|
|
11014
11027
|
let entries = parsed.registry.entries;
|
|
11028
|
+
let entryResults = parsed.entryResults;
|
|
11015
11029
|
const only = options.get('only');
|
|
11016
11030
|
if (only !== undefined) {
|
|
11017
11031
|
const ids = only.split(',').map((s) => s.trim()).filter(Boolean);
|
|
11018
|
-
const known = new Set(
|
|
11032
|
+
const known = new Set([
|
|
11033
|
+
...entries.map((entry) => entry.id),
|
|
11034
|
+
...entryResults.map((result) => result.id),
|
|
11035
|
+
]);
|
|
11019
11036
|
const unknown = ids.filter((id) => !known.has(id));
|
|
11020
11037
|
if (unknown.length > 0)
|
|
11021
11038
|
return fail(`--only names unknown entry id(s): ${unknown.join(', ')}`);
|
|
11022
11039
|
entries = entries.filter((e) => ids.includes(e.id));
|
|
11040
|
+
entryResults = entryResults.filter((result) => ids.includes(result.id));
|
|
11041
|
+
}
|
|
11042
|
+
if (entries.length === 0) {
|
|
11043
|
+
const scope = only === undefined ? 'registry' : 'selected registry entries';
|
|
11044
|
+
const error = `${scope} has no runnable entries after validation — nothing can be run; the registry is unusable`;
|
|
11045
|
+
const summary = summarizeMutationResults(entryResults);
|
|
11046
|
+
if (json) {
|
|
11047
|
+
write(JSON.stringify({ error, registryPath, results: entryResults, summary, exitCode: 2 }, null, 2));
|
|
11048
|
+
}
|
|
11049
|
+
else {
|
|
11050
|
+
write(`dz mutation-gate: ${error}`);
|
|
11051
|
+
for (const result of entryResults) {
|
|
11052
|
+
write(` - ${result.id}: ${result.verdict} — ${result.detail}`);
|
|
11053
|
+
}
|
|
11054
|
+
}
|
|
11055
|
+
return 2;
|
|
11023
11056
|
}
|
|
11024
11057
|
const testCmdRaw = options.get('test-cmd') ?? parsed.registry.testCommand ?? 'npm test';
|
|
11025
11058
|
if (/[\0\n\r]/.test(testCmdRaw))
|
|
@@ -11055,7 +11088,7 @@ function cmdMutationGate(options, flags, cwd, write, injectedRunner) {
|
|
|
11055
11088
|
}
|
|
11056
11089
|
catch { /* not in a git repo */ }
|
|
11057
11090
|
let copyDir = join(scratchParent, 'pkg');
|
|
11058
|
-
const results = [];
|
|
11091
|
+
const results = [...entryResults];
|
|
11059
11092
|
const observations = [];
|
|
11060
11093
|
const warnings = [];
|
|
11061
11094
|
const internalRetries = [];
|
|
@@ -11187,10 +11220,10 @@ function cmdMutationGate(options, flags, cwd, write, injectedRunner) {
|
|
|
11187
11220
|
: undefined);
|
|
11188
11221
|
if (!baseline.ok) {
|
|
11189
11222
|
if (json) {
|
|
11190
|
-
write(JSON.stringify({ packageDir: pkgDir, registryPath, testCommand: testCmd, baseline, results
|
|
11223
|
+
write(JSON.stringify({ packageDir: pkgDir, registryPath, testCommand: testCmd, baseline, results, internalRetries, exitCode: 1 }, null, 2));
|
|
11191
11224
|
return 1;
|
|
11192
11225
|
}
|
|
11193
|
-
write(renderMutationReport(
|
|
11226
|
+
write(renderMutationReport(results, baseline, pkgDir));
|
|
11194
11227
|
return 1;
|
|
11195
11228
|
}
|
|
11196
11229
|
for (const entry of entries) {
|