@shrkcrft/cli 0.1.0-alpha.27 → 0.1.0-alpha.28
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/dist/commands/baseline.command.d.ts +8 -0
- package/dist/commands/baseline.command.d.ts.map +1 -0
- package/dist/commands/baseline.command.js +511 -0
- package/dist/commands/changelog-data.d.ts.map +1 -1
- package/dist/commands/changelog-data.js +22 -0
- package/dist/commands/check.command.d.ts.map +1 -1
- package/dist/commands/check.command.js +28 -1
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +112 -0
- package/dist/commands/gates.command.d.ts +6 -0
- package/dist/commands/gates.command.d.ts.map +1 -0
- package/dist/commands/gates.command.js +334 -0
- package/dist/commands/generated.command.d.ts +6 -0
- package/dist/commands/generated.command.d.ts.map +1 -0
- package/dist/commands/generated.command.js +514 -0
- package/dist/commands/ingest.command.d.ts +11 -0
- package/dist/commands/ingest.command.d.ts.map +1 -1
- package/dist/commands/ingest.command.js +49 -23
- package/dist/commands/policy-lint.command.d.ts +37 -0
- package/dist/commands/policy-lint.command.d.ts.map +1 -1
- package/dist/commands/policy-lint.command.js +119 -2
- package/dist/commands/registry.command.d.ts.map +1 -1
- package/dist/commands/registry.command.js +36 -4
- package/dist/commands/wiring.command.d.ts.map +1 -1
- package/dist/commands/wiring.command.js +25 -0
- package/dist/finish/run-finish.d.ts.map +1 -1
- package/dist/finish/run-finish.js +9 -3
- package/dist/gates/gate-rule-view.d.ts +35 -0
- package/dist/gates/gate-rule-view.d.ts.map +1 -0
- package/dist/gates/gate-rule-view.js +80 -0
- package/dist/gates/rule-coverage.d.ts +53 -0
- package/dist/gates/rule-coverage.d.ts.map +1 -0
- package/dist/gates/rule-coverage.js +165 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +25 -2
- package/package.json +33 -33
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ICommandHandler } from '../command-registry.js';
|
|
2
|
+
export declare const baselineListCommand: ICommandHandler;
|
|
3
|
+
export declare const baselineCheckCommand: ICommandHandler;
|
|
4
|
+
export declare const baselineDiffCommand: ICommandHandler;
|
|
5
|
+
export declare const baselineUpdateCommand: ICommandHandler;
|
|
6
|
+
export declare const baselineExplainCommand: ICommandHandler;
|
|
7
|
+
export declare const baselineCommand: ICommandHandler;
|
|
8
|
+
//# sourceMappingURL=baseline.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseline.command.d.ts","sourceRoot":"","sources":["../../src/commands/baseline.command.ts"],"names":[],"mappings":"AA6BA,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAiShC,eAAO,MAAM,mBAAmB,EAAE,eAyCjC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAgFlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eA8BjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,eAwDnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,eAoDpC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,eAc7B,CAAC"}
|
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `shrk baseline` — the committed-baseline drift engine.
|
|
3
|
+
*
|
|
4
|
+
* shrk baseline list # every declared baseline
|
|
5
|
+
* shrk baseline check [--id X] # recompute + diff vs committed
|
|
6
|
+
* shrk baseline diff [--id X] # human-readable +added/−removed (never fails)
|
|
7
|
+
* shrk baseline update [--id X] # the explicit, reviewable bless step
|
|
8
|
+
* shrk baseline explain --id X # what it will run/extract, without judging
|
|
9
|
+
*
|
|
10
|
+
* Rules come from `sharkcraft.config.ts baselines[]`. A `compute.kind:
|
|
11
|
+
* "command"` baseline SPAWNS a shell command — which is why the pack-plane
|
|
12
|
+
* merge seam (`resolveProjectConfig`) drops any pack-contributed baseline that
|
|
13
|
+
* declares one. Everything reaching this command with a `run` therefore came
|
|
14
|
+
* from the repo's OWN config, the same trust boundary `verificationCommands`
|
|
15
|
+
* uses.
|
|
16
|
+
*/
|
|
17
|
+
import { spawnSync } from 'node:child_process';
|
|
18
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
19
|
+
import * as nodePath from 'node:path';
|
|
20
|
+
import { baselineCount, baselineFails, computeBaselineFromExtractor, diffBaseline, matchesAny, } from '@shrkcrft/boundaries';
|
|
21
|
+
import { resolveChangedFiles, resolveProjectConfig } from '@shrkcrft/inspector';
|
|
22
|
+
import { flagBool, flagString, resolveCwd, } from "../command-registry.js";
|
|
23
|
+
import { ExitCode } from "../exit-codes.js";
|
|
24
|
+
import { asJson, header, kv } from "../output/format-output.js";
|
|
25
|
+
const SCHEMA = 'sharkcraft.baseline/v1';
|
|
26
|
+
const DEFAULT_TIMEOUT_MS = 60_000;
|
|
27
|
+
async function loadBaselines(cwd) {
|
|
28
|
+
const loaded = await resolveProjectConfig(cwd);
|
|
29
|
+
if (!loaded.ok)
|
|
30
|
+
return { ok: false, message: loaded.error.message };
|
|
31
|
+
const rel = nodePath.relative(cwd, loaded.value.sharkcraftDir).split(nodePath.sep).join('/');
|
|
32
|
+
return {
|
|
33
|
+
ok: true,
|
|
34
|
+
value: {
|
|
35
|
+
rules: loaded.value.config.baselines ?? [],
|
|
36
|
+
planeDiagnostics: loaded.value.planeDiagnostics,
|
|
37
|
+
sharkcraftDirRel: rel && !rel.startsWith('..') ? rel : '',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** Narrow to `--id`, refusing an unknown id rather than silently selecting nothing. */
|
|
42
|
+
function selectRules(rules, id) {
|
|
43
|
+
if (!id)
|
|
44
|
+
return { ok: true, rules };
|
|
45
|
+
const wanted = id.split(',').map((s) => s.trim()).filter(Boolean);
|
|
46
|
+
const known = new Set(rules.map((r) => r.id));
|
|
47
|
+
const unknown = wanted.filter((w) => !known.has(w));
|
|
48
|
+
if (unknown.length > 0) {
|
|
49
|
+
return {
|
|
50
|
+
ok: false,
|
|
51
|
+
message: `Unknown baseline id(s): ${unknown.join(', ')}. Declared: ${[...known].join(', ') || '(none)'}`,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
return { ok: true, rules: rules.filter((r) => wanted.includes(r.id)) };
|
|
55
|
+
}
|
|
56
|
+
function computeCurrent(cwd, rule, excludeDirs) {
|
|
57
|
+
if (rule.compute.kind === 'extractor') {
|
|
58
|
+
const source = rule.compute.source;
|
|
59
|
+
if (!source)
|
|
60
|
+
return { text: '', error: 'compute.kind "extractor" but no `source` declared' };
|
|
61
|
+
const res = computeBaselineFromExtractor(cwd, source, excludeDirs);
|
|
62
|
+
return res.error
|
|
63
|
+
? { text: '', error: res.error, filesScanned: res.filesScanned }
|
|
64
|
+
: { text: res.text, filesScanned: res.filesScanned };
|
|
65
|
+
}
|
|
66
|
+
const run = rule.compute.run;
|
|
67
|
+
if (!run || run.trim() === '') {
|
|
68
|
+
return { text: '', error: 'compute.kind "command" but no `run` declared' };
|
|
69
|
+
}
|
|
70
|
+
const child = spawnSync(run, {
|
|
71
|
+
cwd,
|
|
72
|
+
shell: true,
|
|
73
|
+
encoding: 'utf8',
|
|
74
|
+
timeout: rule.compute.timeoutMs ?? DEFAULT_TIMEOUT_MS,
|
|
75
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
76
|
+
});
|
|
77
|
+
if (child.error)
|
|
78
|
+
return { text: '', error: `compute command failed to start: ${child.error.message}` };
|
|
79
|
+
if (child.status !== 0) {
|
|
80
|
+
const tail = String(child.stderr ?? '').trim().split('\n').slice(-3).join(' | ');
|
|
81
|
+
return {
|
|
82
|
+
text: '',
|
|
83
|
+
error: `compute command exited ${child.status ?? 'null'}${tail ? ` — ${tail}` : ''}`,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
return { text: String(child.stdout ?? '') };
|
|
87
|
+
}
|
|
88
|
+
function evaluateRule(cwd, rule, excludeDirs, changedFiles) {
|
|
89
|
+
// --changed-only is honest about what it CANNOT scope: a command compute with
|
|
90
|
+
// no `watchFiles` has no file footprint, so it is reported as skipped rather
|
|
91
|
+
// than quietly passing.
|
|
92
|
+
if (changedFiles !== undefined) {
|
|
93
|
+
const globs = rule.watchFiles && rule.watchFiles.length > 0
|
|
94
|
+
? rule.watchFiles
|
|
95
|
+
: rule.compute.kind === 'extractor'
|
|
96
|
+
? (rule.compute.source?.files ?? [])
|
|
97
|
+
: undefined;
|
|
98
|
+
if (globs === undefined) {
|
|
99
|
+
return {
|
|
100
|
+
rule,
|
|
101
|
+
status: 'skipped',
|
|
102
|
+
committedCount: 0,
|
|
103
|
+
currentCount: 0,
|
|
104
|
+
skipReason: 'command compute with no `watchFiles` cannot be scoped to a changeset',
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
if (!changedFiles.some((f) => matchesAny(f, globs))) {
|
|
108
|
+
return {
|
|
109
|
+
rule,
|
|
110
|
+
status: 'skipped',
|
|
111
|
+
committedCount: 0,
|
|
112
|
+
currentCount: 0,
|
|
113
|
+
skipReason: 'no watched file changed',
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const abs = nodePath.resolve(cwd, rule.baseline);
|
|
118
|
+
if (!existsSync(abs)) {
|
|
119
|
+
return {
|
|
120
|
+
rule,
|
|
121
|
+
status: 'error',
|
|
122
|
+
committedCount: 0,
|
|
123
|
+
currentCount: 0,
|
|
124
|
+
error: `committed baseline ${rule.baseline} does not exist — create it with \`shrk baseline update --id ${rule.id}\``,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
let committed;
|
|
128
|
+
try {
|
|
129
|
+
committed = readFileSync(abs, 'utf8');
|
|
130
|
+
}
|
|
131
|
+
catch (e) {
|
|
132
|
+
return {
|
|
133
|
+
rule,
|
|
134
|
+
status: 'error',
|
|
135
|
+
committedCount: 0,
|
|
136
|
+
currentCount: 0,
|
|
137
|
+
error: `could not read ${rule.baseline}: ${e.message}`,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
const computed = computeCurrent(cwd, rule, excludeDirs);
|
|
141
|
+
if (computed.error) {
|
|
142
|
+
return { rule, status: 'error', committed, committedCount: 0, currentCount: 0, error: computed.error };
|
|
143
|
+
}
|
|
144
|
+
const committedCount = baselineCount(rule, committed);
|
|
145
|
+
const currentCount = baselineCount(rule, computed.text);
|
|
146
|
+
// A recompute that produced NOTHING compared nothing — and left as a pass it
|
|
147
|
+
// would "match" an empty baseline forever, the silent-green this plane exists
|
|
148
|
+
// to prevent. But this only holds when the COMMITTED side is empty too: if
|
|
149
|
+
// the baseline has entries and the recompute has none, that is real drift
|
|
150
|
+
// (everything vanished) and must be reported as such, not swallowed as a skip.
|
|
151
|
+
if (currentCount === 0 && committedCount === 0) {
|
|
152
|
+
return {
|
|
153
|
+
rule,
|
|
154
|
+
status: rule.failOnEmpty ? 'failed' : 'skipped',
|
|
155
|
+
committed,
|
|
156
|
+
current: computed.text,
|
|
157
|
+
committedCount,
|
|
158
|
+
currentCount,
|
|
159
|
+
skipReason: 'the recompute produced no entries (and the committed baseline is empty too)',
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
const diff = diffBaseline(rule, committed, computed.text);
|
|
163
|
+
return {
|
|
164
|
+
rule,
|
|
165
|
+
status: baselineFails(rule, diff) ? 'failed' : 'passed',
|
|
166
|
+
diff,
|
|
167
|
+
committed,
|
|
168
|
+
current: computed.text,
|
|
169
|
+
committedCount,
|
|
170
|
+
currentCount,
|
|
171
|
+
// A total wipe is far more often a broken compute than a real emptying —
|
|
172
|
+
// say so next to the diff so it is not blessed by reflex.
|
|
173
|
+
...(currentCount === 0 ? { emptyCompute: true } : {}),
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function hintFor(rule) {
|
|
177
|
+
return rule.hint ?? `review the diff, then bless it with \`shrk baseline update --id ${rule.id}\``;
|
|
178
|
+
}
|
|
179
|
+
function outcomeJson(o) {
|
|
180
|
+
return {
|
|
181
|
+
id: o.rule.id,
|
|
182
|
+
...(o.rule.description ? { description: o.rule.description } : {}),
|
|
183
|
+
baseline: o.rule.baseline,
|
|
184
|
+
severity: o.rule.severity ?? 'error',
|
|
185
|
+
direction: o.rule.direction ?? 'two-way',
|
|
186
|
+
status: o.status,
|
|
187
|
+
committedCount: o.committedCount,
|
|
188
|
+
currentCount: o.currentCount,
|
|
189
|
+
...(o.diff ? { diff: { added: o.diff.added, removed: o.diff.removed, mode: o.diff.mode, canonical: o.diff.canonical } } : {}),
|
|
190
|
+
...(o.error ? { error: o.error } : {}),
|
|
191
|
+
...(o.skipReason ? { skipReason: o.skipReason } : {}),
|
|
192
|
+
...(o.emptyCompute ? { emptyCompute: true } : {}),
|
|
193
|
+
hint: hintFor(o.rule),
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
/** Print one outcome's ±diff, capped so a huge drift stays readable. */
|
|
197
|
+
function writeDiff(o, cap = 25) {
|
|
198
|
+
if (!o.diff)
|
|
199
|
+
return;
|
|
200
|
+
for (const a of o.diff.added.slice(0, cap))
|
|
201
|
+
process.stdout.write(` + ${a}\n`);
|
|
202
|
+
if (o.diff.added.length > cap)
|
|
203
|
+
process.stdout.write(` + … (${o.diff.added.length - cap} more)\n`);
|
|
204
|
+
for (const r of o.diff.removed.slice(0, cap))
|
|
205
|
+
process.stdout.write(` - ${r}\n`);
|
|
206
|
+
if (o.diff.removed.length > cap)
|
|
207
|
+
process.stdout.write(` - … (${o.diff.removed.length - cap} more)\n`);
|
|
208
|
+
}
|
|
209
|
+
/** Shared prologue: load config, select rules, resolve the changed scope. */
|
|
210
|
+
async function prepare(args, opts) {
|
|
211
|
+
const cwd = resolveCwd(args);
|
|
212
|
+
const json = flagBool(args, 'json');
|
|
213
|
+
const loaded = await loadBaselines(cwd);
|
|
214
|
+
if (!loaded.ok) {
|
|
215
|
+
if (json)
|
|
216
|
+
process.stdout.write(asJson({ schema: SCHEMA, error: loaded.message }) + '\n');
|
|
217
|
+
else
|
|
218
|
+
process.stderr.write(`Could not load config: ${loaded.message}\n Run \`shrk doctor\` for details.\n`);
|
|
219
|
+
return { ok: false, code: ExitCode.NotVerified };
|
|
220
|
+
}
|
|
221
|
+
const selected = selectRules(loaded.value.rules, flagString(args, 'id') ?? undefined);
|
|
222
|
+
if (!selected.ok) {
|
|
223
|
+
process.stderr.write(selected.message + '\n');
|
|
224
|
+
return { ok: false, code: ExitCode.NotVerified };
|
|
225
|
+
}
|
|
226
|
+
let changedFiles;
|
|
227
|
+
if (opts.changedAware) {
|
|
228
|
+
const since = flagString(args, 'since');
|
|
229
|
+
if (flagBool(args, 'changed-only') || since) {
|
|
230
|
+
changedFiles = resolveChangedFiles({
|
|
231
|
+
projectRoot: cwd,
|
|
232
|
+
...(since ? { since } : {}),
|
|
233
|
+
...(!since ? { includeWorktree: true } : {}),
|
|
234
|
+
}).files;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
ok: true,
|
|
239
|
+
cwd,
|
|
240
|
+
rules: selected.rules,
|
|
241
|
+
all: loaded.value.rules,
|
|
242
|
+
excludeDirs: loaded.value.sharkcraftDirRel ? [loaded.value.sharkcraftDirRel] : [],
|
|
243
|
+
...(changedFiles !== undefined ? { changedFiles } : {}),
|
|
244
|
+
planeDiagnostics: loaded.value.planeDiagnostics,
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
/** The "no baselines declared" landing, shared by every subverb. */
|
|
248
|
+
function writeNoRules(json) {
|
|
249
|
+
if (json) {
|
|
250
|
+
process.stdout.write(asJson({ schema: SCHEMA, results: [], evaluated: 0, verdict: 'not-verified' }) + '\n');
|
|
251
|
+
return ExitCode.NotVerified;
|
|
252
|
+
}
|
|
253
|
+
process.stdout.write(header('Baselines'));
|
|
254
|
+
process.stdout.write(' No baselines declared. Add `baselines[]` to sharkcraft.config.ts to replace a\n' +
|
|
255
|
+
' hand-rolled "committed file + recompute script + drift test" trio with one\n' +
|
|
256
|
+
' two-way engine (see docs/baseline-drift.md).\n');
|
|
257
|
+
return ExitCode.NotVerified;
|
|
258
|
+
}
|
|
259
|
+
export const baselineListCommand = {
|
|
260
|
+
name: 'list',
|
|
261
|
+
description: 'List every declared baseline: what it pins, how it recomputes, which direction fails.',
|
|
262
|
+
usage: 'shrk baseline list [--json]',
|
|
263
|
+
booleanFlags: new Set(['json']),
|
|
264
|
+
async run(args) {
|
|
265
|
+
const prep = await prepare(args, { changedAware: false });
|
|
266
|
+
if (!prep.ok)
|
|
267
|
+
return prep.code;
|
|
268
|
+
const json = flagBool(args, 'json');
|
|
269
|
+
if (prep.all.length === 0)
|
|
270
|
+
return writeNoRules(json);
|
|
271
|
+
if (json) {
|
|
272
|
+
process.stdout.write(asJson({
|
|
273
|
+
schema: SCHEMA,
|
|
274
|
+
baselines: prep.all.map((r) => ({
|
|
275
|
+
id: r.id,
|
|
276
|
+
description: r.description ?? null,
|
|
277
|
+
baseline: r.baseline,
|
|
278
|
+
compute: r.compute.kind,
|
|
279
|
+
direction: r.direction ?? 'two-way',
|
|
280
|
+
keyBy: r.keyBy ?? null,
|
|
281
|
+
failOnEmpty: r.failOnEmpty === true,
|
|
282
|
+
})),
|
|
283
|
+
diagnostics: prep.planeDiagnostics,
|
|
284
|
+
}) + '\n');
|
|
285
|
+
return ExitCode.VerifiedPass;
|
|
286
|
+
}
|
|
287
|
+
process.stdout.write(header(`Baselines (${prep.all.length})`));
|
|
288
|
+
for (const r of prep.all) {
|
|
289
|
+
process.stdout.write(` • ${r.id} → ${r.baseline}\n`);
|
|
290
|
+
process.stdout.write(` compute ${r.compute.kind}${r.compute.kind === 'command' ? ` (${r.compute.run})` : ''}` +
|
|
291
|
+
` · direction ${r.direction ?? 'two-way'}${r.keyBy ? ` · keyBy ${r.keyBy}` : ''}` +
|
|
292
|
+
`${r.failOnEmpty ? ' · failOnEmpty' : ''}\n`);
|
|
293
|
+
if (r.description)
|
|
294
|
+
process.stdout.write(` ${r.description}\n`);
|
|
295
|
+
}
|
|
296
|
+
for (const d of prep.planeDiagnostics)
|
|
297
|
+
process.stdout.write(` ! ${d}\n`);
|
|
298
|
+
return ExitCode.VerifiedPass;
|
|
299
|
+
},
|
|
300
|
+
};
|
|
301
|
+
export const baselineCheckCommand = {
|
|
302
|
+
name: 'check',
|
|
303
|
+
description: 'Recompute every declared baseline and fail on drift. Two-way by default — a LOST entry fails exactly like a gained one.',
|
|
304
|
+
usage: 'shrk baseline check [--id <ids>] [--changed-only] [--since <ref>] [--json]',
|
|
305
|
+
booleanFlags: new Set(['json', 'changed-only']),
|
|
306
|
+
async run(args) {
|
|
307
|
+
const prep = await prepare(args, { changedAware: true });
|
|
308
|
+
if (!prep.ok)
|
|
309
|
+
return prep.code;
|
|
310
|
+
const json = flagBool(args, 'json');
|
|
311
|
+
if (prep.rules.length === 0)
|
|
312
|
+
return writeNoRules(json);
|
|
313
|
+
const outcomes = prep.rules.map((r) => evaluateRule(prep.cwd, r, prep.excludeDirs, prep.changedFiles));
|
|
314
|
+
const failed = outcomes.filter((o) => o.status === 'failed' || (o.status === 'error' && (o.rule.severity ?? 'error') === 'error'));
|
|
315
|
+
const evaluated = outcomes.filter((o) => o.status !== 'skipped').length;
|
|
316
|
+
// 0 only when a NON-EMPTY scope was actually compared; 2 when nothing was.
|
|
317
|
+
const exit = failed.length > 0
|
|
318
|
+
? ExitCode.Failure
|
|
319
|
+
: evaluated === 0
|
|
320
|
+
? ExitCode.NotVerified
|
|
321
|
+
: ExitCode.VerifiedPass;
|
|
322
|
+
if (json) {
|
|
323
|
+
process.stdout.write(asJson({
|
|
324
|
+
schema: SCHEMA,
|
|
325
|
+
results: outcomes.map(outcomeJson),
|
|
326
|
+
evaluated,
|
|
327
|
+
skipped: outcomes.filter((o) => o.status === 'skipped').length,
|
|
328
|
+
verdict: failed.length > 0 ? 'errors' : evaluated === 0 ? 'not-verified' : 'pass',
|
|
329
|
+
diagnostics: prep.planeDiagnostics,
|
|
330
|
+
}) + '\n');
|
|
331
|
+
return exit;
|
|
332
|
+
}
|
|
333
|
+
process.stdout.write(header('Baseline drift'));
|
|
334
|
+
process.stdout.write(kv('evaluated', `${evaluated} of ${prep.rules.length}`) + '\n');
|
|
335
|
+
for (const o of outcomes) {
|
|
336
|
+
if (o.status === 'passed') {
|
|
337
|
+
process.stdout.write(` ✓ ${o.rule.id} (${o.currentCount} entries, no drift)\n`);
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
if (o.status === 'skipped') {
|
|
341
|
+
process.stdout.write(` – ${o.rule.id} SKIPPED — ${o.skipReason}\n`);
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
if (o.status === 'error') {
|
|
345
|
+
process.stdout.write(` ! ${o.rule.id} ${o.error}\n`);
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
const added = o.diff?.added.length ?? 0;
|
|
349
|
+
const removed = o.diff?.removed.length ?? 0;
|
|
350
|
+
process.stdout.write(` ✗ ${o.rule.id} DRIFT — ${added} added, ${removed} removed ` +
|
|
351
|
+
`(${o.committedCount} committed → ${o.currentCount} now, ${o.diff?.mode})\n`);
|
|
352
|
+
writeDiff(o);
|
|
353
|
+
if (o.emptyCompute) {
|
|
354
|
+
process.stdout.write(' ! the recompute produced 0 entries — check the compute before blessing this.\n');
|
|
355
|
+
}
|
|
356
|
+
process.stdout.write(` → ${hintFor(o.rule)}\n`);
|
|
357
|
+
}
|
|
358
|
+
for (const d of prep.planeDiagnostics)
|
|
359
|
+
process.stdout.write(` ! ${d}\n`);
|
|
360
|
+
if (exit === ExitCode.NotVerified) {
|
|
361
|
+
process.stdout.write('\nNothing was compared — this is NOT a pass. Every selected baseline was skipped.\n');
|
|
362
|
+
}
|
|
363
|
+
else if (exit === ExitCode.VerifiedPass) {
|
|
364
|
+
process.stdout.write('\nEvery baseline matches its committed artifact. ✓\n');
|
|
365
|
+
}
|
|
366
|
+
return exit;
|
|
367
|
+
},
|
|
368
|
+
};
|
|
369
|
+
export const baselineDiffCommand = {
|
|
370
|
+
name: 'diff',
|
|
371
|
+
description: 'Show the +added / −removed entries for each baseline without failing — the inspection verb (always exits 0 when it ran).',
|
|
372
|
+
usage: 'shrk baseline diff [--id <ids>] [--json]',
|
|
373
|
+
booleanFlags: new Set(['json']),
|
|
374
|
+
async run(args) {
|
|
375
|
+
const prep = await prepare(args, { changedAware: false });
|
|
376
|
+
if (!prep.ok)
|
|
377
|
+
return prep.code;
|
|
378
|
+
const json = flagBool(args, 'json');
|
|
379
|
+
if (prep.rules.length === 0)
|
|
380
|
+
return writeNoRules(json);
|
|
381
|
+
const outcomes = prep.rules.map((r) => evaluateRule(prep.cwd, r, prep.excludeDirs, undefined));
|
|
382
|
+
if (json) {
|
|
383
|
+
process.stdout.write(asJson({ schema: SCHEMA, results: outcomes.map(outcomeJson), inspection: true }) + '\n');
|
|
384
|
+
return ExitCode.VerifiedPass;
|
|
385
|
+
}
|
|
386
|
+
process.stdout.write(header('Baseline diff (inspection — never fails)'));
|
|
387
|
+
for (const o of outcomes) {
|
|
388
|
+
const added = o.diff?.added.length ?? 0;
|
|
389
|
+
const removed = o.diff?.removed.length ?? 0;
|
|
390
|
+
process.stdout.write(`\n${o.rule.id} (${o.rule.baseline}) ${o.status === 'error' ? `! ${o.error}` : `+${added} / -${removed}`}\n`);
|
|
391
|
+
writeDiff(o, 100);
|
|
392
|
+
}
|
|
393
|
+
return ExitCode.VerifiedPass;
|
|
394
|
+
},
|
|
395
|
+
};
|
|
396
|
+
export const baselineUpdateCommand = {
|
|
397
|
+
name: 'update',
|
|
398
|
+
description: 'Rewrite the committed baseline from the current value — the explicit, reviewable bless step. Writes files.',
|
|
399
|
+
usage: 'shrk baseline update [--id <ids>] [--dry-run] [--json]',
|
|
400
|
+
booleanFlags: new Set(['json', 'dry-run']),
|
|
401
|
+
async run(args) {
|
|
402
|
+
const prep = await prepare(args, { changedAware: false });
|
|
403
|
+
if (!prep.ok)
|
|
404
|
+
return prep.code;
|
|
405
|
+
const json = flagBool(args, 'json');
|
|
406
|
+
const dryRun = flagBool(args, 'dry-run');
|
|
407
|
+
if (prep.rules.length === 0)
|
|
408
|
+
return writeNoRules(json);
|
|
409
|
+
const written = [];
|
|
410
|
+
const errors = [];
|
|
411
|
+
for (const rule of prep.rules) {
|
|
412
|
+
const computed = computeCurrent(prep.cwd, rule, prep.excludeDirs);
|
|
413
|
+
if (computed.error) {
|
|
414
|
+
errors.push({ id: rule.id, error: computed.error });
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
if (computed.text.trim() === '' && rule.failOnEmpty) {
|
|
418
|
+
errors.push({
|
|
419
|
+
id: rule.id,
|
|
420
|
+
error: 'refusing to write an EMPTY baseline for a `failOnEmpty` rule — fix the compute first',
|
|
421
|
+
});
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
const abs = nodePath.resolve(prep.cwd, rule.baseline);
|
|
425
|
+
const previous = existsSync(abs) ? readFileSync(abs, 'utf8') : undefined;
|
|
426
|
+
const changed = previous !== computed.text;
|
|
427
|
+
if (!dryRun && changed) {
|
|
428
|
+
mkdirSync(nodePath.dirname(abs), { recursive: true });
|
|
429
|
+
writeFileSync(abs, computed.text, 'utf8');
|
|
430
|
+
}
|
|
431
|
+
written.push({ id: rule.id, path: rule.baseline, bytes: computed.text.length, changed });
|
|
432
|
+
}
|
|
433
|
+
if (json) {
|
|
434
|
+
process.stdout.write(asJson({ schema: SCHEMA, dryRun, written, errors }) + '\n');
|
|
435
|
+
return errors.length > 0 ? ExitCode.Failure : ExitCode.VerifiedPass;
|
|
436
|
+
}
|
|
437
|
+
process.stdout.write(header(dryRun ? 'Baseline update (dry run)' : 'Baseline update'));
|
|
438
|
+
for (const w of written) {
|
|
439
|
+
process.stdout.write(` ${w.changed ? (dryRun ? 'would write' : 'wrote') : 'unchanged '} ${w.path} (${w.bytes} bytes)\n`);
|
|
440
|
+
}
|
|
441
|
+
for (const e of errors)
|
|
442
|
+
process.stdout.write(` ! ${e.id}: ${e.error}\n`);
|
|
443
|
+
if (written.some((w) => w.changed) && !dryRun) {
|
|
444
|
+
process.stdout.write('\nReview the diff before committing — this is the bless step.\n');
|
|
445
|
+
}
|
|
446
|
+
return errors.length > 0 ? ExitCode.Failure : ExitCode.VerifiedPass;
|
|
447
|
+
},
|
|
448
|
+
};
|
|
449
|
+
export const baselineExplainCommand = {
|
|
450
|
+
name: 'explain',
|
|
451
|
+
description: 'Show what ONE baseline will compute and compare — the command or extractor, the canonical form, both entry counts and the diff — without turning it into a verdict.',
|
|
452
|
+
usage: 'shrk baseline explain --id <id> [--json]',
|
|
453
|
+
booleanFlags: new Set(['json']),
|
|
454
|
+
async run(args) {
|
|
455
|
+
const id = flagString(args, 'id') ?? args.positional[0];
|
|
456
|
+
if (!id) {
|
|
457
|
+
process.stderr.write('Usage: shrk baseline explain --id <id>\n');
|
|
458
|
+
return ExitCode.NotVerified;
|
|
459
|
+
}
|
|
460
|
+
const prep = await prepare(args, { changedAware: false });
|
|
461
|
+
if (!prep.ok)
|
|
462
|
+
return prep.code;
|
|
463
|
+
const rule = prep.all.find((r) => r.id === id);
|
|
464
|
+
if (!rule) {
|
|
465
|
+
process.stderr.write(`No baseline "${id}". Declared: ${prep.all.map((r) => r.id).join(', ') || '(none)'}\n`);
|
|
466
|
+
return ExitCode.NotVerified;
|
|
467
|
+
}
|
|
468
|
+
const outcome = evaluateRule(prep.cwd, rule, prep.excludeDirs, undefined);
|
|
469
|
+
if (flagBool(args, 'json')) {
|
|
470
|
+
process.stdout.write(asJson({
|
|
471
|
+
schema: 'sharkcraft.baseline-explain/v1',
|
|
472
|
+
...outcomeJson(outcome),
|
|
473
|
+
compute: rule.compute,
|
|
474
|
+
watchFiles: rule.watchFiles ?? null,
|
|
475
|
+
}) + '\n');
|
|
476
|
+
return ExitCode.VerifiedPass;
|
|
477
|
+
}
|
|
478
|
+
process.stdout.write(header(`Baseline: ${rule.id}`));
|
|
479
|
+
if (rule.description)
|
|
480
|
+
process.stdout.write(` ${rule.description}\n`);
|
|
481
|
+
process.stdout.write(kv('committed', rule.baseline) + '\n');
|
|
482
|
+
process.stdout.write(kv('compute', rule.compute.kind === 'command' ? `command · ${rule.compute.run}` : `extractor · ${rule.compute.source?.extract ?? 'sugar'}`) + '\n');
|
|
483
|
+
process.stdout.write(kv('direction', rule.direction ?? 'two-way') + '\n');
|
|
484
|
+
process.stdout.write(kv('canonical', outcome.diff?.canonical ?? rule.compute.canonical ?? 'auto') + '\n');
|
|
485
|
+
if (rule.keyBy)
|
|
486
|
+
process.stdout.write(kv('keyBy', rule.keyBy) + '\n');
|
|
487
|
+
process.stdout.write(kv('entries', `${outcome.committedCount} committed → ${outcome.currentCount} now`) + '\n');
|
|
488
|
+
process.stdout.write(kv('status', outcome.status) + '\n');
|
|
489
|
+
if (outcome.error)
|
|
490
|
+
process.stdout.write(` ! ${outcome.error}\n`);
|
|
491
|
+
if (outcome.skipReason)
|
|
492
|
+
process.stdout.write(` – ${outcome.skipReason}\n`);
|
|
493
|
+
if (outcome.diff && (outcome.diff.added.length > 0 || outcome.diff.removed.length > 0)) {
|
|
494
|
+
process.stdout.write('\n diff:\n');
|
|
495
|
+
writeDiff(outcome, 100);
|
|
496
|
+
}
|
|
497
|
+
return ExitCode.VerifiedPass;
|
|
498
|
+
},
|
|
499
|
+
};
|
|
500
|
+
export const baselineCommand = {
|
|
501
|
+
name: 'baseline',
|
|
502
|
+
description: 'Committed-baseline drift engine: recompute a ledger/digest/allow-list and fail on drift in BOTH directions. Read-only except `update`.',
|
|
503
|
+
usage: 'shrk baseline list | check | diff | update | explain --id <id>',
|
|
504
|
+
booleanFlags: new Set(['json', 'changed-only', 'dry-run']),
|
|
505
|
+
async run(args) {
|
|
506
|
+
const sub = args.positional[0];
|
|
507
|
+
process.stderr.write((sub ? `Unknown subcommand "${sub}". ` : '') +
|
|
508
|
+
'Usage: shrk baseline list | check [--id X] | diff | update | explain --id <id>\n');
|
|
509
|
+
return ExitCode.NotVerified;
|
|
510
|
+
},
|
|
511
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog-data.d.ts","sourceRoot":"","sources":["../../src/commands/changelog-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,sBAAsB,EAAE,SAAS,oBAAoB,
|
|
1
|
+
{"version":3,"file":"changelog-data.d.ts","sourceRoot":"","sources":["../../src/commands/changelog-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,eAAO,MAAM,sBAAsB,EAAE,SAAS,oBAAoB,EA8HjE,CAAC"}
|
|
@@ -112,4 +112,26 @@ export const RELEASE_SURFACE_DELTAS = [
|
|
|
112
112
|
],
|
|
113
113
|
removed: [],
|
|
114
114
|
},
|
|
115
|
+
{
|
|
116
|
+
version: '0.1.0-alpha.28',
|
|
117
|
+
title: "The plane the compiler can't see — six data-defined gate planes on one extraction DSL",
|
|
118
|
+
added: [
|
|
119
|
+
'`shrk gates list | coverage | explain <id>` — the rule-authoring trust layer across EVERY data-defined plane (wiring / policy / registry / registration / baseline / generated). `coverage` is the stale-selector detector: it reports what each rule actually MATCHED and flags every rule matching 0, so a rule quietly dying is itself a CI failure.',
|
|
120
|
+
'`shrk baseline list | check | diff | update | explain` — the committed-ledger drift engine (`baselines[]`). TWO-WAY by default: a silently LOST entry fails exactly like a gained one. `update` is a separate, explicit bless verb.',
|
|
121
|
+
'`shrk generated list | check | update | explain` — generated-artifact drift + provenance (`generatedArtifacts[]`). Regenerates into a temp dir and diffs BOTH ways (hand-edited file AND a regen that writes a subset), plus the "do not edit" header contract. `--headers-only` never spawns.',
|
|
122
|
+
'`shrk policy-lint explain <ruleId>` — every hit with file:line, INCLUDING the hits an exemption or the scan zone dropped, each labelled with which one applied.',
|
|
123
|
+
'`shrk registry <name> duplicates` — ids declared in more than one place, with every declaration site (load-order roulette the compiler cannot see).',
|
|
124
|
+
'Extraction DSL on every rule source: `extract` with 9 kinds (`regex-capture`, `array-members`, `object-keys`, `enum-members`, `export-names`, `call-args`, `decorator-args`, `string-union-members`, `json-path`) plus `anchor` / `argIndex` / `capture` and the `match` + `exclude` allow/deny pair.',
|
|
125
|
+
'Wiring relations: `mode: disjoint`, `registeredMode: intersection`, multi-hop `chain`, `{id}` message templating, and `failOnEmpty` / `selfTest` on every plane.',
|
|
126
|
+
'Policy rules: `scan: all|code|strings|comments` (lexical zone classifier), `exemptFiles`, `exemptLines`.',
|
|
127
|
+
],
|
|
128
|
+
changed: [
|
|
129
|
+
'Loud-skip contract: a rule whose SOURCE side matches 0 files / extracts 0 ids is `skipped` and the check exits `2` (NOT verified), never a green `0`; `failOnEmpty: true` promotes it to `1`. An empty SINK is deliberately NOT a skip — it stays a failure, annotated `emptySink`, so a real total-miss is never downgraded.',
|
|
130
|
+
'`shrk policy-lint` exits `2` when it evaluated nothing, and reports exemption-suppressed hits as a count instead of silently deleting them.',
|
|
131
|
+
"`shrk finish`'s import sub-gate lists only the findings that DRIVE the verdict — allowlisted (`info`) entries no longer pad the capped fix-list and push a real error out of view.",
|
|
132
|
+
'MCP: the pack-helper tool is now `get_pack_helper` (was `get_helper`, which collided with the helper-registry tool and made one of the two unreachable via `tools/call`). Completes the dedup that already renamed `list_helpers` → `list_pack_helpers`.',
|
|
133
|
+
'Pack safety: `baselines[]` / `generatedArtifacts[]` are pack-distributable, but the merge seam DROPS any pack-contributed element declaring a shell command (`compute.run` / `regen`) — mirroring the "pack-contributed verification commands are NOT auto-run" contract.',
|
|
134
|
+
],
|
|
135
|
+
removed: [],
|
|
136
|
+
},
|
|
115
137
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check.command.d.ts","sourceRoot":"","sources":["../../src/commands/check.command.ts"],"names":[],"mappings":"AAoBA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"check.command.d.ts","sourceRoot":"","sources":["../../src/commands/check.command.ts"],"names":[],"mappings":"AAoBA,OAAO,EAML,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAw6BhC,eAAO,MAAM,YAAY,EAAE,eA+G1B,CAAC"}
|
|
@@ -686,7 +686,32 @@ async function checkWiring(args) {
|
|
|
686
686
|
for (const d of report.diagnostics)
|
|
687
687
|
process.stdout.write(` ! ${d}\n`);
|
|
688
688
|
}
|
|
689
|
+
// Rules that checked NOTHING, reported per-rule. `matchedNothing` gives the
|
|
690
|
+
// count; this names them, because "which rule went stale" is the actionable
|
|
691
|
+
// half. A `failOnEmpty` rule turns its own skip into a hard failure.
|
|
692
|
+
if (report.skipped.length > 0) {
|
|
693
|
+
process.stdout.write('\nRules that checked nothing:\n');
|
|
694
|
+
for (const sk of report.skipped) {
|
|
695
|
+
process.stdout.write(` ${sk.failed ? '✗' : '–'} ${sk.ruleId} ${sk.failed ? 'FAILED' : 'SKIPPED'} — ${sk.reason}\n`);
|
|
696
|
+
}
|
|
697
|
+
if (report.skipped.some((sk) => !sk.failed)) {
|
|
698
|
+
process.stdout.write(' Fix the selector, or set `failOnEmpty: true` once the rule is known to have\n' +
|
|
699
|
+
' real subjects. Run `shrk gates coverage` to audit every plane at once.\n');
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
// A sink that extracted 0 ids while the source had some is a real failure, but
|
|
703
|
+
// almost always a stale SINK glob — say so instead of listing N "unwired"
|
|
704
|
+
// tokens with no explanation.
|
|
705
|
+
for (const r of report.rules) {
|
|
706
|
+
if (!r.emptySink)
|
|
707
|
+
continue;
|
|
708
|
+
process.stdout.write(`\n ! ${r.ruleId}: the registered side extracted 0 ids while ${r.declaredCount} were declared —\n` +
|
|
709
|
+
` every declared token "fails". Check the registered glob before chasing the tokens.\n`);
|
|
710
|
+
}
|
|
689
711
|
if (report.violations.length === 0 && report.diagnostics.length === 0) {
|
|
712
|
+
// A failOnEmpty skip produces no violation object but IS a failure.
|
|
713
|
+
if (report.verdict === 'errors')
|
|
714
|
+
return ExitCode.Failure;
|
|
690
715
|
if (allEvaluated) {
|
|
691
716
|
// Every configured rule ran — the earned full green.
|
|
692
717
|
process.stdout.write('\nNo wiring violations — every declared token is registered. ✓\n');
|
|
@@ -709,7 +734,9 @@ async function checkWiring(args) {
|
|
|
709
734
|
process.stdout.write(`\n[${r.severity}] ${r.ruleId}${r.description ? ' — ' + r.description : ''}\n`);
|
|
710
735
|
process.stdout.write(` declared ${r.declaredCount} / registered ${r.registeredCount} — ${r.violations.length} not wired:\n`);
|
|
711
736
|
for (const v of r.violations.slice(0, 50)) {
|
|
712
|
-
|
|
737
|
+
const where = `(${v.file}:${v.line})`;
|
|
738
|
+
const hop = v.hop !== undefined ? ` [hop ${v.hop}]` : '';
|
|
739
|
+
process.stdout.write(v.message ? ` • ${v.message} ${where}${hop}\n` : ` • ${v.token} ${where}${hop}\n`);
|
|
713
740
|
}
|
|
714
741
|
if (r.violations.length > 50) {
|
|
715
742
|
process.stdout.write(` … (${r.violations.length - 50} more)\n`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/command-catalog.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACrB,QAAQ,cAAc;IACtB,iBAAiB,mBAAmB;IACpC,gBAAgB,kBAAkB;IAClC,YAAY,kBAAkB;IAC9B,SAAS,eAAe;IACxB,cAAc,oBAAoB;CACnC;AAED;;;;;;GAMG;AACH,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;CAClB;AAED,8BAA8B;AAC9B,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,EAAE,OAAO;IACT,UAAU,gBAAgB;IAC1B,UAAU,eAAe;CAC1B;AAED;;;;;;GAMG;AACH,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED;;;;;;GAMG;AACH,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,YAAY,iBAAiB;CAC9B;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ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