harness-everything 1.1.0 → 1.2.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +19 -0
- package/benchmarks/results/live-host/agy-2026-11-25/README.md +32 -0
- package/benchmarks/results/live-host/multi-host-2026-11-25-496-capture/README.md +32 -0
- package/benchmarks/results/live-host/multi-host-2026-11-25-496-capture/claude-records.json +1 -0
- package/benchmarks/results/live-host/multi-host-2026-11-25-496-capture/codex-hook-trace.txt +24 -0
- package/benchmarks/results/live-host/multi-host-2026-11-25-496-capture/opencode-records.json +1 -0
- package/benchmarks/results/live-host/multi-host-2026-11-25-496-capture/probe.sh +16 -0
- package/ci/mechanism-498-local-store-promote.test.js +402 -0
- package/ci/mechanism-498-local-store-scan.test.js +570 -0
- package/ci/mechanism-516-windows-verify-and-shell.test.js +328 -0
- package/docs/platform-capabilities.md +2 -2
- package/docs/platform-compatibility.json +2 -2
- package/error-ledger-bootstrap/SKILL.md +1 -1
- package/error-ledger-bootstrap/references/workflow.md +15 -1
- package/error-ledger-bootstrap/scripts/promote.js +145 -9
- package/error-ledger-bootstrap/scripts/scan.js +394 -3
- package/hooks/scripts/lib/workflow-isolation.js +1 -1
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.antigravity-plugin/plugin.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/scripts/lib/workflow-isolation.js +1 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/scripts/lib/verification-contract.js +68 -12
- package/plugins/harness-everything/skills/error-ledger-bootstrap/SKILL.md +1 -1
- package/plugins/harness-everything/skills/error-ledger-bootstrap/references/workflow.md +15 -1
- package/plugins/harness-everything/skills/error-ledger-bootstrap/scripts/promote.js +145 -9
- package/plugins/harness-everything/skills/error-ledger-bootstrap/scripts/scan.js +394 -3
- package/sbom.cdx.json +7 -7
- package/scripts/lib/verification-contract.js +68 -12
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const assert = require('node:assert/strict');
|
|
4
|
+
const childProcess = require('node:child_process');
|
|
5
|
+
const crypto = require('node:crypto');
|
|
6
|
+
const fs = require('node:fs');
|
|
7
|
+
const os = require('node:os');
|
|
8
|
+
const path = require('node:path');
|
|
9
|
+
const localErrors = require('../hooks/scripts/lib/local-errors');
|
|
10
|
+
|
|
11
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
12
|
+
const SCANNER = path.join(ROOT, 'error-ledger-bootstrap', 'scripts', 'scan.js');
|
|
13
|
+
const PACKAGED_SCANNER = path.join(ROOT, 'plugins', 'harness-everything', 'skills', 'error-ledger-bootstrap', 'scripts', 'scan.js');
|
|
14
|
+
const ERRORS_SYNC = path.join(ROOT, 'scripts', 'errors-sync.js');
|
|
15
|
+
const TMP = fs.realpathSync.native(fs.mkdtempSync(path.join(os.tmpdir(), 'harness-498-local-store-')));
|
|
16
|
+
const STORE = path.join(TMP, 'store');
|
|
17
|
+
const HOME = path.join(TMP, 'home');
|
|
18
|
+
const NOW = '2026-11-25T12:34:56.000Z';
|
|
19
|
+
const PRIVATE_VALUES = [
|
|
20
|
+
'PRIVATE_EXCERPT_SENTINEL', 'PRIVATE_CUE_SENTINEL', 'PRIVATE_LESSON_SENTINEL',
|
|
21
|
+
'PRIVATE_URL_SENTINEL', 'PRIVATE_PATH_SENTINEL', 'PRIVATE_SESSION_SENTINEL',
|
|
22
|
+
'PRIVATE_TOOL_USE_SENTINEL', 'PRIVATE_READER_ROW_SENTINEL', 'sharedrawid',
|
|
23
|
+
'readerprivateid', 'distinct-lesson-id', 'surviving-lesson-id'
|
|
24
|
+
];
|
|
25
|
+
const ACTIONS = {
|
|
26
|
+
commit: { actions: [{ tool: 'shell', executable: 'git', subcommand: 'commit' }] },
|
|
27
|
+
push: { actions: [{ tool: 'shell', executable: 'git', subcommand: 'push' }] },
|
|
28
|
+
pull: { actions: [{ tool: 'shell', executable: 'git', subcommand: 'pull' }] }
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
fs.mkdirSync(HOME, { recursive: true });
|
|
32
|
+
const WRITER_ENV = isolatedEnv({ HARNESS_OBSERVATIONS_DIR: STORE, HOME, USERPROFILE: HOME });
|
|
33
|
+
|
|
34
|
+
function isolatedEnv(overrides = {}) {
|
|
35
|
+
const env = { ...process.env, ...overrides };
|
|
36
|
+
for (const key of ['HARNESS_WORKSPACE_ROOT', 'CLAUDE_PROJECT_DIR', 'CODEX_PROJECT_DIR']) delete env[key];
|
|
37
|
+
return env;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function runNode(script, args, env = {}) {
|
|
41
|
+
const childEnv = isolatedEnv();
|
|
42
|
+
Object.assign(childEnv, env);
|
|
43
|
+
const result = childProcess.spawnSync(process.execPath, [script, ...args], {
|
|
44
|
+
encoding: 'utf8',
|
|
45
|
+
env: childEnv,
|
|
46
|
+
stdio: ['ignore', 'pipe', 'pipe']
|
|
47
|
+
});
|
|
48
|
+
assert.ifError(result.error);
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function git(repo, args, env = {}) {
|
|
53
|
+
const result = childProcess.spawnSync('git', ['-C', repo, ...args], {
|
|
54
|
+
encoding: 'utf8',
|
|
55
|
+
env: isolatedEnv({
|
|
56
|
+
GIT_CONFIG_NOSYSTEM: '1',
|
|
57
|
+
GIT_AUTHOR_NAME: 'Local Store Fixture',
|
|
58
|
+
GIT_AUTHOR_EMAIL: 'fixture@example.invalid',
|
|
59
|
+
GIT_COMMITTER_NAME: 'Local Store Fixture',
|
|
60
|
+
GIT_COMMITTER_EMAIL: 'fixture@example.invalid',
|
|
61
|
+
GIT_AUTHOR_DATE: NOW,
|
|
62
|
+
GIT_COMMITTER_DATE: NOW,
|
|
63
|
+
...env
|
|
64
|
+
}),
|
|
65
|
+
stdio: ['ignore', 'pipe', 'pipe']
|
|
66
|
+
});
|
|
67
|
+
assert.ifError(result.error);
|
|
68
|
+
assert.strictEqual(result.status, 0, `git ${args.join(' ')} failed: ${result.stderr}`);
|
|
69
|
+
return result.stdout.trim();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function write(file, text) {
|
|
73
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
74
|
+
fs.writeFileSync(file, text);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function makeRepo(name) {
|
|
78
|
+
const repo = path.join(TMP, name);
|
|
79
|
+
fs.mkdirSync(repo, { recursive: true });
|
|
80
|
+
git(repo, ['init', '-q']);
|
|
81
|
+
write(path.join(repo, 'README.md'), '# Fixture\n');
|
|
82
|
+
git(repo, ['add', '-A']);
|
|
83
|
+
git(repo, ['commit', '-q', '-m', 'chore: initialize fixture']);
|
|
84
|
+
return repo;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function addLedgerRecord(repo, id, signature, match) {
|
|
88
|
+
const errors = path.join(repo, '.agents', 'harness-everything', 'errors');
|
|
89
|
+
const file = path.join(errors, `${id}-${signature}.md`);
|
|
90
|
+
const matchText = match ? `match:\n${Object.entries(match).map(([phase, rules]) =>
|
|
91
|
+
` ${phase}:\n${rules.map(rule => ` - tool: ${rule.tool}\n executable: ${rule.executable}\n subcommand: ${rule.subcommand}${rule.diagnostics ? `\n diagnostics: [${rule.diagnostics.join(', ')}]` : ''}`).join('\n')}`).join('\n')}\n` : '';
|
|
92
|
+
write(file, [
|
|
93
|
+
'---', `id: ${id}`, `signature: ${signature}`, 'class: fixture', 'title: Fixture rule',
|
|
94
|
+
'scope: in', 'status: lesson', 'sites: []', 'violates: Fixture', matchText.trimEnd(),
|
|
95
|
+
'episodes: []', '---', '', '## Cue', '', 'Fixture cue.', '', '## Lesson', '', 'Fixture lesson.', ''
|
|
96
|
+
].filter(Boolean).join('\n'));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function finalizeLedger(repo) {
|
|
100
|
+
const result = runNode(ERRORS_SYNC, ['--root', repo]);
|
|
101
|
+
assert.strictEqual(result.status, 0, `errors-sync failed: ${result.stderr}`);
|
|
102
|
+
git(repo, ['add', '-A']);
|
|
103
|
+
git(repo, ['commit', '-q', '-m', 'chore: prepare destination ledger']);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function addLesson(workspaceRoot, signature, destination, match = ACTIONS.push, id = 'sharedrawid') {
|
|
107
|
+
const result = localErrors.addProvisionalLesson({
|
|
108
|
+
workspaceRoot,
|
|
109
|
+
destination,
|
|
110
|
+
provisionalId: id,
|
|
111
|
+
signature,
|
|
112
|
+
match,
|
|
113
|
+
lesson: `PRIVATE_LESSON_SENTINEL for ${signature} at /private/PRIVATE_PATH_SENTINEL`,
|
|
114
|
+
cue: 'PRIVATE_CUE_SENTINEL',
|
|
115
|
+
issueUrl: 'https://private.example/PRIVATE_URL_SENTINEL'
|
|
116
|
+
}, { env: WRITER_ENV });
|
|
117
|
+
assert.ok(['appended', 'duplicate'].includes(result.status), `could not create real provisional fixture: ${result.status}`);
|
|
118
|
+
return result.record;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function addOccurrence(workspaceRoot, signature, destination, index) {
|
|
122
|
+
const result = localErrors.appendOccurrence({
|
|
123
|
+
workspaceRoot,
|
|
124
|
+
destination,
|
|
125
|
+
signature,
|
|
126
|
+
commandClass: 'test',
|
|
127
|
+
exitCode: 1,
|
|
128
|
+
sessionKey: `PRIVATE_SESSION_SENTINEL-${index}`,
|
|
129
|
+
toolUseId: `PRIVATE_TOOL_USE_SENTINEL-${index}`,
|
|
130
|
+
output: 'PRIVATE_EXCERPT_SENTINEL'
|
|
131
|
+
}, { env: WRITER_ENV });
|
|
132
|
+
assert.strictEqual(result.status, 'appended', `could not create real occurrence fixture: ${result.status}`);
|
|
133
|
+
return result.record;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function fileHash(file) {
|
|
137
|
+
try { return crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex'); }
|
|
138
|
+
catch (error) { if (error.code === 'ENOENT') return 'missing'; throw error; }
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
function treeHash(directory) {
|
|
142
|
+
if (!fs.existsSync(directory)) return 'missing';
|
|
143
|
+
const entries = [];
|
|
144
|
+
function visit(current) {
|
|
145
|
+
for (const name of fs.readdirSync(current).sort()) {
|
|
146
|
+
const file = path.join(current, name);
|
|
147
|
+
const stat = fs.lstatSync(file);
|
|
148
|
+
if (stat.isSymbolicLink()) entries.push([path.relative(directory, file), 'symlink']);
|
|
149
|
+
else if (stat.isDirectory()) visit(file);
|
|
150
|
+
else entries.push([path.relative(directory, file), fileHash(file)]);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
visit(directory);
|
|
154
|
+
return crypto.createHash('sha256').update(JSON.stringify(entries)).digest('hex');
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function scan(repo, destination, storeRoot = STORE, envOverrides = {}) {
|
|
158
|
+
const out = path.join(TMP, `reports-${crypto.randomBytes(5).toString('hex')}`);
|
|
159
|
+
fs.mkdirSync(out);
|
|
160
|
+
const storeFile = path.join(storeRoot, localErrors.INDEX_FILE);
|
|
161
|
+
const ledgerDir = path.join(repo, '.agents', 'harness-everything', 'errors');
|
|
162
|
+
const beforeStore = treeHash(storeRoot);
|
|
163
|
+
const beforeLedger = treeHash(ledgerDir);
|
|
164
|
+
const result = runNode(SCANNER, [
|
|
165
|
+
'--root', repo, '--no-memory', '--source', 'local-store', '--destination', destination,
|
|
166
|
+
'--out', out, '--json'
|
|
167
|
+
], { HARNESS_OBSERVATIONS_DIR: storeRoot, HOME, USERPROFILE: HOME, ...envOverrides });
|
|
168
|
+
assert.strictEqual(result.status, 0,
|
|
169
|
+
`scanner exit ${result.status}; stderr: ${result.stderr.trim()}; stdout: ${result.stdout.trim()}`);
|
|
170
|
+
assert.strictEqual(result.stderr.trim(), '', 'successful scans do not write stderr');
|
|
171
|
+
const envelope = JSON.parse(result.stdout);
|
|
172
|
+
assert.strictEqual(envelope.ok, true, 'scanner JSON envelope reports success');
|
|
173
|
+
assert.strictEqual(treeHash(storeRoot), beforeStore, 'scan leaves the shared local store bytes unchanged');
|
|
174
|
+
assert.strictEqual(treeHash(ledgerDir), beforeLedger, 'scan leaves destination ledger bytes unchanged');
|
|
175
|
+
const report = JSON.parse(fs.readFileSync(envelope.reportJson, 'utf8'));
|
|
176
|
+
const markdown = fs.readFileSync(envelope.reportMd, 'utf8');
|
|
177
|
+
return { report, markdown, envelope, storeFile };
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function localSource(report) {
|
|
181
|
+
return report.sources.find(source => source.type === 'local-store');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function localCandidates(report) {
|
|
185
|
+
return report.candidates.filter(candidate => candidate.sources.some(source => source.type === 'local-store'));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function bySignature(report, signature) {
|
|
189
|
+
return localCandidates(report).find(candidate => candidate.signature === signature);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function sourceRefs(candidate) {
|
|
193
|
+
return candidate.sources.filter(source => source.type === 'local-store').map(source => source.ref).sort();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function assertPrivate(report, markdown) {
|
|
197
|
+
const output = `${JSON.stringify(report)}\n${markdown}`;
|
|
198
|
+
for (const value of PRIVATE_VALUES) assert.ok(!output.includes(value), `private local value escaped: ${value}`);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function incompleteReaderSource() {
|
|
202
|
+
return [
|
|
203
|
+
"'use strict';",
|
|
204
|
+
"const fs = require('node:fs');",
|
|
205
|
+
"const path = require('node:path');",
|
|
206
|
+
"function called(name) { fs.appendFileSync(process.env.READER_CALL_LOG, name + '\\n'); }",
|
|
207
|
+
'const reader = {',
|
|
208
|
+
' SCHEMA_VERSION: 1,',
|
|
209
|
+
" INDEX_FILE: 'errors-index.json',",
|
|
210
|
+
" INDEX_KIND: 'local-error-store',",
|
|
211
|
+
" DESTINATIONS: ['harness', 'project', 'unknown'],",
|
|
212
|
+
" COMMAND_CLASSES: ['git', 'gh', 'test', 'build', 'package', 'shell'],",
|
|
213
|
+
' LIMITS: { maxIndexBytes: 2 * 1024 * 1024, maxExcerptBytes: 2048, maxLessonChars: 4096, maxCueChars: 4096, maxMatchedLedgerIds: 16 },',
|
|
214
|
+
' resolveWorkspaceKey(input) { called(\'resolveWorkspaceKey\'); return input.workspaceRoot; },',
|
|
215
|
+
" getStorePath() { called('getStorePath'); return { file: path.join(process.env.HARNESS_OBSERVATIONS_DIR, 'errors-index.json') }; },",
|
|
216
|
+
" listRecords() { called('listRecords'); return JSON.parse(fs.readFileSync(process.env.READER_FIXTURE_ROWS, 'utf8')); },",
|
|
217
|
+
' validateMatch(match) { called(\'validateMatch\'); return match; }',
|
|
218
|
+
'};',
|
|
219
|
+
'delete reader.DESTINATIONS;',
|
|
220
|
+
'module.exports = reader;'
|
|
221
|
+
].join('\n');
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const legacy = makeRepo('legacy-target');
|
|
225
|
+
const legacyOut = path.join(TMP, 'legacy-reports');
|
|
226
|
+
fs.mkdirSync(legacyOut);
|
|
227
|
+
const freezeTime = path.join(TMP, 'freeze-time.js');
|
|
228
|
+
write(freezeTime, [
|
|
229
|
+
"const NativeDate = Date;",
|
|
230
|
+
"class FrozenDate extends NativeDate { constructor(...args) { super(...(args.length ? args : ['2026-11-25T12:34:56.000Z'])); } static now() { return NativeDate.parse('2026-11-25T12:34:56.000Z'); } }",
|
|
231
|
+
'global.Date = FrozenDate;'
|
|
232
|
+
].join('\n'));
|
|
233
|
+
const legacyRun = childProcess.spawnSync(process.execPath, [
|
|
234
|
+
'--require', freezeTime, SCANNER, '--root', legacy, '--no-memory', '--out', legacyOut, '--json'
|
|
235
|
+
], { encoding: 'utf8', env: isolatedEnv({ HOME, USERPROFILE: HOME }), stdio: ['ignore', 'pipe', 'pipe'] });
|
|
236
|
+
assert.ifError(legacyRun.error);
|
|
237
|
+
assert.strictEqual(legacyRun.status, 0, `legacy control scan failed: ${legacyRun.stderr}`);
|
|
238
|
+
const legacyEnvelope = JSON.parse(legacyRun.stdout);
|
|
239
|
+
const legacyJsonBytes = fs.readFileSync(legacyEnvelope.reportJson, 'utf8');
|
|
240
|
+
const legacyMarkdownBytes = fs.readFileSync(legacyEnvelope.reportMd, 'utf8');
|
|
241
|
+
assert.strictEqual(legacyJsonBytes, JSON.stringify({
|
|
242
|
+
schemaVersion: 1,
|
|
243
|
+
root: 'legacy-target',
|
|
244
|
+
generatedAt: NOW,
|
|
245
|
+
options: { hideLedger: false, noMemory: true, memory: [], instructions: [], homeOverridden: false },
|
|
246
|
+
sources: [
|
|
247
|
+
{ type: 'git', origin: 'history', status: 'used' },
|
|
248
|
+
{ type: 'doc', origin: 'history', status: 'missing', reason: 'no repeated Markdown or docs paths found' },
|
|
249
|
+
{ type: 'tracker', origin: 'offline', status: 'missing', reason: 'no --tracker file provided' },
|
|
250
|
+
{ type: 'memory', origin: 'auto', status: 'disabled', verified: false, reason: 'disabled by --no-memory' },
|
|
251
|
+
{ type: 'instruction', origin: 'repository', status: 'disabled', reason: 'disabled by --no-memory' },
|
|
252
|
+
{ type: 'instruction', origin: 'global-explicit', status: 'disabled', reason: 'disabled by --no-memory' }
|
|
253
|
+
],
|
|
254
|
+
candidates: []
|
|
255
|
+
}, null, 2) + '\n', 'no-source JSON report remains byte-identical to the legacy contract');
|
|
256
|
+
assert.strictEqual(legacyMarkdownBytes, [
|
|
257
|
+
'# Error ledger candidate report', '', '- Schema version: 1', '- Root: `legacy-target`', `- Generated: ${NOW}`,
|
|
258
|
+
'- Candidates: 0', '', '## Options', '', '- hideLedger: false', '- noMemory: true', '- memory: none',
|
|
259
|
+
'- instructions: none', '- homeOverridden: false', '', '## Sources', '',
|
|
260
|
+
'- `git` (history) — **used** — history',
|
|
261
|
+
'- `doc` (history) — **missing** — history — no repeated Markdown or docs paths found',
|
|
262
|
+
'- `tracker` (offline) — **missing** — offline — no --tracker file provided',
|
|
263
|
+
'- `memory` (auto) — **disabled** — auto — disabled by --no-memory — verified: false',
|
|
264
|
+
'- `instruction` (repository) — **disabled** — repository — disabled by --no-memory',
|
|
265
|
+
'- `instruction` (global-explicit) — **disabled** — global-explicit — disabled by --no-memory',
|
|
266
|
+
'', '## Candidates', '', ''
|
|
267
|
+
].join('\n'), 'no-source Markdown report remains byte-identical to the legacy contract');
|
|
268
|
+
|
|
269
|
+
const workspaceA = makeRepo('workspace-a');
|
|
270
|
+
const workspaceB = makeRepo('workspace-b');
|
|
271
|
+
const workspaceCollision = makeRepo('workspace-collision');
|
|
272
|
+
addLedgerRecord(workspaceA, 'E-0001', 'duplicate-lesson', null);
|
|
273
|
+
addLedgerRecord(workspaceA, 'E-0002', 'existing-rule', ACTIONS.push);
|
|
274
|
+
addLedgerRecord(workspaceA, 'E-0003', 'ambiguous-lesson', null);
|
|
275
|
+
addLedgerRecord(workspaceA, 'E-0004', 'other-ambiguous', ACTIONS.pull);
|
|
276
|
+
finalizeLedger(workspaceA);
|
|
277
|
+
fs.mkdirSync(path.join(workspaceB, '.agents', 'harness-everything', 'errors'), { recursive: true });
|
|
278
|
+
finalizeLedger(workspaceB);
|
|
279
|
+
fs.mkdirSync(path.join(workspaceCollision, '.agents', 'harness-everything', 'errors'), { recursive: true });
|
|
280
|
+
finalizeLedger(workspaceCollision);
|
|
281
|
+
|
|
282
|
+
const sharedA = addLesson(workspaceA, 'shared-lesson', 'harness', ACTIONS.commit, 'sharedrawid');
|
|
283
|
+
const sharedB = addLesson(workspaceB, 'shared-lesson', 'harness', ACTIONS.commit, 'sharedrawid');
|
|
284
|
+
assert.strictEqual(sharedA.provisionalId, sharedB.provisionalId, 'positive control: both real writers accepted the same raw provisional ID');
|
|
285
|
+
addLesson(workspaceA, 'duplicate-lesson', 'harness', ACTIONS.commit, 'lesson-duplicate');
|
|
286
|
+
addLesson(workspaceA, 'rule-lesson', 'harness', ACTIONS.push, 'lesson-rule');
|
|
287
|
+
addLesson(workspaceA, 'ambiguous-lesson', 'harness', ACTIONS.pull, 'lesson-ambiguous');
|
|
288
|
+
addLesson(workspaceA, 'covered-lesson', 'harness', ACTIONS.commit, 'lesson-covered');
|
|
289
|
+
addLesson(workspaceA, 'project-lesson', 'project', ACTIONS.commit, 'lesson-project');
|
|
290
|
+
addLesson(workspaceA, 'unknown-lesson', 'unknown', ACTIONS.commit, 'lesson-unknown');
|
|
291
|
+
addLesson(workspaceB, 'workspace-b-only', 'harness', ACTIONS.commit, 'lesson-b-only');
|
|
292
|
+
addOccurrence(workspaceA, 'occurrence-class', 'harness', 1);
|
|
293
|
+
addOccurrence(workspaceA, 'occurrence-class', 'harness', 2);
|
|
294
|
+
addOccurrence(workspaceA, 'covered-lesson', 'harness', 3);
|
|
295
|
+
addOccurrence(workspaceA, 'project-occurrence', 'project', 4);
|
|
296
|
+
addOccurrence(workspaceA, 'unknown-occurrence', 'unknown', 5);
|
|
297
|
+
addOccurrence(workspaceB, 'workspace-b-occurrence', 'harness', 6);
|
|
298
|
+
const collisionOccurrence = addOccurrence(workspaceCollision, 'collision-occurrence', 'harness', 7);
|
|
299
|
+
const collisionRawId = collisionOccurrence.provisionalId;
|
|
300
|
+
PRIVATE_VALUES.push(collisionRawId);
|
|
301
|
+
const collisionLesson = addLesson(workspaceCollision, 'collision-lesson', 'project', ACTIONS.commit, collisionRawId);
|
|
302
|
+
addLesson(workspaceB, 'collision-id-other-workspace', 'harness', ACTIONS.commit, collisionRawId);
|
|
303
|
+
const distinctLesson = addLesson(workspaceCollision, 'distinct-lesson-signature', 'harness', ACTIONS.commit, 'distinct-lesson-id');
|
|
304
|
+
const distinctOccurrence = addOccurrence(workspaceCollision, 'distinct-occurrence-signature', 'harness', 8);
|
|
305
|
+
PRIVATE_VALUES.push(distinctOccurrence.provisionalId);
|
|
306
|
+
const survivingLesson = addLesson(workspaceCollision, 'surviving-lesson', 'harness', ACTIONS.commit, 'surviving-lesson-id');
|
|
307
|
+
|
|
308
|
+
const baselineStore = fs.readFileSync(path.join(STORE, localErrors.INDEX_FILE));
|
|
309
|
+
const firstA = scan(workspaceA, 'harness');
|
|
310
|
+
const statusA = localSource(firstA.report);
|
|
311
|
+
assert.ok(statusA, 'opt-in reports local-store status');
|
|
312
|
+
assert.strictEqual(statusA.status, 'used');
|
|
313
|
+
assert.strictEqual(statusA.destination, 'harness');
|
|
314
|
+
assert.match(statusA.workspaceRef, /^w-local-[a-f0-9]{64}$/);
|
|
315
|
+
assert.strictEqual(statusA.counts.destinationMismatch, 2);
|
|
316
|
+
assert.strictEqual(statusA.counts.unknownDestination, 2);
|
|
317
|
+
assert.strictEqual(statusA.counts.malformed, 0);
|
|
318
|
+
assert.strictEqual(localCandidates(firstA.report).length, 6, 'one lead per lesson plus one clustered uncovered occurrence signature');
|
|
319
|
+
assert.strictEqual(bySignature(firstA.report, 'occurrence-class').sources.filter(source => source.type === 'local-store').length, 2,
|
|
320
|
+
'occurrences with the same signature form one lead with both opaque refs');
|
|
321
|
+
assert.strictEqual(bySignature(firstA.report, 'covered-lesson').sources.filter(source => source.kind === 'occurrence').length, 0,
|
|
322
|
+
'an occurrence cluster covered by a lesson is suppressed');
|
|
323
|
+
assert.ok(!bySignature(firstA.report, 'project-lesson'));
|
|
324
|
+
assert.ok(!bySignature(firstA.report, 'unknown-lesson'));
|
|
325
|
+
assert.ok(!bySignature(firstA.report, 'project-occurrence'));
|
|
326
|
+
assert.ok(!bySignature(firstA.report, 'unknown-occurrence'));
|
|
327
|
+
assert.strictEqual(bySignature(firstA.report, 'shared-lesson').local.evidenceReadiness, 'needs-evidence');
|
|
328
|
+
assert.strictEqual(bySignature(firstA.report, 'shared-lesson').local.dedupe.status, 'none');
|
|
329
|
+
assert.strictEqual(bySignature(firstA.report, 'shared-lesson').local.dedupe.newClassEligible, true);
|
|
330
|
+
assert.deepStrictEqual(bySignature(firstA.report, 'duplicate-lesson').local.dedupe,
|
|
331
|
+
{ status: 'existing', classIds: ['E-0001'], matchedBy: ['signature'], newClassEligible: false });
|
|
332
|
+
assert.deepStrictEqual(bySignature(firstA.report, 'rule-lesson').local.dedupe,
|
|
333
|
+
{ status: 'existing', classIds: ['E-0002'], matchedBy: ['whole-rule'], newClassEligible: false });
|
|
334
|
+
assert.deepStrictEqual(bySignature(firstA.report, 'ambiguous-lesson').local.dedupe,
|
|
335
|
+
{ status: 'ambiguous', classIds: ['E-0003', 'E-0004'], matchedBy: ['signature', 'whole-rule'], newClassEligible: false });
|
|
336
|
+
assertPrivate(firstA.report, firstA.markdown);
|
|
337
|
+
assert.ok(!JSON.stringify(firstA.report).includes(sharedA.workspaceKey), 'raw workspace keys stay private');
|
|
338
|
+
assert.ok(firstA.markdown.includes('needs-evidence'), 'Markdown carries evidence readiness');
|
|
339
|
+
assert.ok(firstA.markdown.includes('ambiguous'), 'Markdown carries exact dedupe outcome');
|
|
340
|
+
|
|
341
|
+
const secondA = scan(workspaceA, 'harness');
|
|
342
|
+
assert.deepStrictEqual(sourceRefs(bySignature(secondA.report, 'shared-lesson')),
|
|
343
|
+
sourceRefs(bySignature(firstA.report, 'shared-lesson')), 'repeat scan preserves the record ref');
|
|
344
|
+
const scanB = scan(workspaceB, 'harness');
|
|
345
|
+
assert.strictEqual(localCandidates(scanB.report).length, 4, 'workspace B sees its same-ID row independently from workspace C');
|
|
346
|
+
assert.strictEqual(sourceRefs(bySignature(scanB.report, 'shared-lesson')).length, 1);
|
|
347
|
+
assert.notDeepStrictEqual(sourceRefs(bySignature(scanB.report, 'shared-lesson')),
|
|
348
|
+
sourceRefs(bySignature(firstA.report, 'shared-lesson')), 'same raw provisional ID has a different ref in another workspace');
|
|
349
|
+
assert.ok(!bySignature(scanB.report, 'duplicate-lesson'));
|
|
350
|
+
assert.ok(bySignature(scanB.report, 'workspace-b-only'));
|
|
351
|
+
assert.ok(bySignature(scanB.report, 'collision-id-other-workspace'), 'a matching raw ID in another workspace remains isolated');
|
|
352
|
+
|
|
353
|
+
const projectScan = scan(workspaceA, 'project');
|
|
354
|
+
assert.strictEqual(localSource(projectScan.report).destination, 'project');
|
|
355
|
+
assert.ok(bySignature(projectScan.report, 'project-lesson'));
|
|
356
|
+
assert.ok(bySignature(projectScan.report, 'project-occurrence'));
|
|
357
|
+
assert.strictEqual(localCandidates(projectScan.report).length, 2, 'project destination includes only project records');
|
|
358
|
+
|
|
359
|
+
const missingStore = path.join(TMP, 'missing-store');
|
|
360
|
+
const missing = scan(workspaceA, 'harness', missingStore);
|
|
361
|
+
assert.strictEqual(localSource(missing.report).status, 'missing');
|
|
362
|
+
assert.strictEqual(localSource(missing.report).reason, 'index-missing');
|
|
363
|
+
assert.strictEqual(localCandidates(missing.report).length, 0);
|
|
364
|
+
|
|
365
|
+
const emptyStore = path.join(TMP, 'empty-store');
|
|
366
|
+
fs.mkdirSync(emptyStore);
|
|
367
|
+
write(path.join(emptyStore, localErrors.INDEX_FILE), `${JSON.stringify({
|
|
368
|
+
schemaVersion: localErrors.SCHEMA_VERSION, kind: localErrors.INDEX_KIND, records: []
|
|
369
|
+
})}\n`);
|
|
370
|
+
const empty = scan(workspaceA, 'harness', emptyStore);
|
|
371
|
+
assert.strictEqual(localSource(empty.report).status, 'unverified');
|
|
372
|
+
assert.strictEqual(localSource(empty.report).reason, 'empty-reader-result');
|
|
373
|
+
|
|
374
|
+
const rawStoreFile = path.join(STORE, localErrors.INDEX_FILE);
|
|
375
|
+
const validStoreBytes = fs.readFileSync(rawStoreFile);
|
|
376
|
+
try {
|
|
377
|
+
fs.writeFileSync(rawStoreFile, '{invalid json');
|
|
378
|
+
const corruptBytes = fs.readFileSync(rawStoreFile);
|
|
379
|
+
const corrupt = scan(workspaceA, 'harness');
|
|
380
|
+
assert.strictEqual(localSource(corrupt.report).status, 'unverified');
|
|
381
|
+
assert.strictEqual(localSource(corrupt.report).reason, 'store-corrupt');
|
|
382
|
+
assert.deepStrictEqual(fs.readFileSync(rawStoreFile), corruptBytes, 'corrupt store fixture bytes remain unchanged by scan');
|
|
383
|
+
} finally { fs.writeFileSync(rawStoreFile, validStoreBytes); }
|
|
384
|
+
|
|
385
|
+
const unreadableStore = path.join(TMP, 'unreadable-store');
|
|
386
|
+
fs.mkdirSync(unreadableStore);
|
|
387
|
+
fs.mkdirSync(path.join(unreadableStore, localErrors.INDEX_FILE));
|
|
388
|
+
const unreadable = scan(workspaceA, 'harness', unreadableStore);
|
|
389
|
+
assert.strictEqual(localSource(unreadable.report).status, 'unverified');
|
|
390
|
+
assert.strictEqual(localSource(unreadable.report).reason, 'store-unreadable');
|
|
391
|
+
|
|
392
|
+
const beforeMalformed = fs.readFileSync(rawStoreFile);
|
|
393
|
+
try {
|
|
394
|
+
const index = JSON.parse(beforeMalformed.toString('utf8'));
|
|
395
|
+
const row = index.records.find(record => record.workspaceKey === sharedA.workspaceKey && record.kind === 'provisional-lesson');
|
|
396
|
+
assert.ok(row, 'positive control: fixture contains a real writer-generated row');
|
|
397
|
+
row.destination = 'not-a-destination';
|
|
398
|
+
fs.writeFileSync(rawStoreFile, `${JSON.stringify(index)}\n`);
|
|
399
|
+
const malformedBytes = fs.readFileSync(rawStoreFile);
|
|
400
|
+
const malformed = scan(workspaceA, 'harness');
|
|
401
|
+
assert.strictEqual(localSource(malformed.report).status, 'unverified');
|
|
402
|
+
assert.strictEqual(localSource(malformed.report).counts.malformed, 1);
|
|
403
|
+
assert.ok(!JSON.stringify(malformed.report).includes('not-a-destination'));
|
|
404
|
+
assert.deepStrictEqual(fs.readFileSync(rawStoreFile), malformedBytes, 'malformed store bytes remain unchanged by scan');
|
|
405
|
+
} finally { fs.writeFileSync(rawStoreFile, beforeMalformed); }
|
|
406
|
+
|
|
407
|
+
const mismatch = scan(workspaceA, 'harness', STORE, { HARNESS_WORKSPACE_ROOT: workspaceB });
|
|
408
|
+
assert.strictEqual(localSource(mismatch.report).status, 'unverified');
|
|
409
|
+
assert.strictEqual(localSource(mismatch.report).reason, 'workspace-binding-mismatch');
|
|
410
|
+
assert.strictEqual(localCandidates(mismatch.report).length, 0);
|
|
411
|
+
|
|
412
|
+
const ledgerIndex = path.join(workspaceA, '.agents', 'harness-everything', 'errors', 'index.jsonl');
|
|
413
|
+
const validLedgerBytes = fs.readFileSync(ledgerIndex);
|
|
414
|
+
try {
|
|
415
|
+
fs.rmSync(ledgerIndex);
|
|
416
|
+
fs.mkdirSync(ledgerIndex);
|
|
417
|
+
const unreadableLedger = scan(workspaceA, 'harness');
|
|
418
|
+
assert.strictEqual(localSource(unreadableLedger.report).ledgerStatus, 'unverified');
|
|
419
|
+
assert.strictEqual(localSource(unreadableLedger.report).ledgerReason, 'ledger-unreadable');
|
|
420
|
+
assert.strictEqual(bySignature(unreadableLedger.report, 'shared-lesson').local.dedupe.status, 'unverified');
|
|
421
|
+
assert.strictEqual(bySignature(unreadableLedger.report, 'shared-lesson').local.dedupe.newClassEligible, false);
|
|
422
|
+
} finally {
|
|
423
|
+
fs.rmSync(ledgerIndex, { recursive: true, force: true });
|
|
424
|
+
fs.writeFileSync(ledgerIndex, validLedgerBytes);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
function failedArgs(args, diagnostic) {
|
|
428
|
+
const result = runNode(SCANNER, ['--root', workspaceA, '--no-memory', ...args, '--json'], {
|
|
429
|
+
HARNESS_OBSERVATIONS_DIR: STORE, HOME, USERPROFILE: HOME
|
|
430
|
+
});
|
|
431
|
+
assert.strictEqual(result.status, 2, `expected CLI argument failure for ${args.join(' ')}`);
|
|
432
|
+
assert.match(result.stderr.trim(), diagnostic);
|
|
433
|
+
}
|
|
434
|
+
failedArgs(['--source', 'other', '--destination', 'harness'], /unknown source/);
|
|
435
|
+
failedArgs(['--source', 'local-store', '--source', 'local-store', '--destination', 'harness'], /duplicate option: --source/);
|
|
436
|
+
failedArgs(['--source', 'local-store'], /--destination is required/);
|
|
437
|
+
failedArgs(['--source', 'local-store', '--destination', 'unknown'], /invalid --destination/);
|
|
438
|
+
failedArgs(['--destination', 'harness'], /--destination requires --source local-store/);
|
|
439
|
+
|
|
440
|
+
const packagedOut = path.join(TMP, 'packaged-reports');
|
|
441
|
+
fs.mkdirSync(packagedOut);
|
|
442
|
+
const packaged = runNode(PACKAGED_SCANNER, [
|
|
443
|
+
'--root', workspaceA, '--no-memory', '--source', 'local-store', '--destination', 'harness',
|
|
444
|
+
'--out', packagedOut, '--json'
|
|
445
|
+
], { HARNESS_OBSERVATIONS_DIR: STORE, HOME, USERPROFILE: HOME });
|
|
446
|
+
assert.strictEqual(packaged.status, 0, `packaged scan must fail safe when the store contract is absent: ${packaged.stderr}`);
|
|
447
|
+
const packagedEnvelope = JSON.parse(packaged.stdout);
|
|
448
|
+
const packagedReport = JSON.parse(fs.readFileSync(packagedEnvelope.reportJson, 'utf8'));
|
|
449
|
+
assert.strictEqual(localSource(packagedReport).status, 'unavailable');
|
|
450
|
+
assert.strictEqual(localSource(packagedReport).reason, 'reader-unavailable');
|
|
451
|
+
assert.strictEqual(localCandidates(packagedReport).length, 0);
|
|
452
|
+
|
|
453
|
+
function verifyProvisionalCollision() {
|
|
454
|
+
const originalBytes = fs.readFileSync(rawStoreFile);
|
|
455
|
+
const index = JSON.parse(originalBytes.toString('utf8'));
|
|
456
|
+
const collisionRows = index.records.filter(record =>
|
|
457
|
+
record.workspaceKey === collisionLesson.workspaceKey && record.provisionalId === collisionRawId);
|
|
458
|
+
assert.deepStrictEqual(collisionRows.map(record => record.kind).sort(), ['occurrence', 'provisional-lesson']);
|
|
459
|
+
try {
|
|
460
|
+
for (const records of [index.records, [...index.records].reverse()]) {
|
|
461
|
+
fs.writeFileSync(rawStoreFile, `${JSON.stringify({ ...index, records })}\n`);
|
|
462
|
+
const { report, markdown } = scan(workspaceCollision, 'harness');
|
|
463
|
+
const source = localSource(report);
|
|
464
|
+
assert.deepStrictEqual({
|
|
465
|
+
status: source.status,
|
|
466
|
+
reason: source.reason,
|
|
467
|
+
malformed: source.counts.malformed,
|
|
468
|
+
workspaceRecords: source.counts.workspaceRecords,
|
|
469
|
+
destinationMismatch: source.counts.destinationMismatch,
|
|
470
|
+
candidates: localCandidates(report).map(candidate => candidate.signature).sort()
|
|
471
|
+
}, {
|
|
472
|
+
status: 'unverified',
|
|
473
|
+
reason: 'provisional-id-collision',
|
|
474
|
+
malformed: 2,
|
|
475
|
+
workspaceRecords: 3,
|
|
476
|
+
destinationMismatch: 0,
|
|
477
|
+
candidates: ['distinct-lesson-signature', 'distinct-occurrence-signature', 'surviving-lesson']
|
|
478
|
+
}, 'both cross-kind rows are excluded while unrelated and distinct-ID leads survive');
|
|
479
|
+
assert.notStrictEqual(distinctLesson.provisionalId, distinctOccurrence.provisionalId);
|
|
480
|
+
assert.strictEqual(sourceRefs(bySignature(report, 'distinct-lesson-signature')).length, 1);
|
|
481
|
+
assert.strictEqual(sourceRefs(bySignature(report, 'distinct-occurrence-signature')).length, 1);
|
|
482
|
+
assert.notDeepStrictEqual(
|
|
483
|
+
sourceRefs(bySignature(report, 'distinct-lesson-signature')),
|
|
484
|
+
sourceRefs(bySignature(report, 'distinct-occurrence-signature')),
|
|
485
|
+
'distinct IDs retain distinct opaque refs');
|
|
486
|
+
assert.ok(bySignature(report, 'surviving-lesson'), 'an unrelated lead survives');
|
|
487
|
+
assert.ok(!bySignature(report, 'collision-lesson'));
|
|
488
|
+
assert.ok(!bySignature(report, 'collision-occurrence'));
|
|
489
|
+
assertPrivate(report, markdown);
|
|
490
|
+
}
|
|
491
|
+
} finally { fs.writeFileSync(rawStoreFile, originalBytes); }
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
function verifyIncompleteReaderContract() {
|
|
495
|
+
const fixtureRoot = path.join(TMP, 'incomplete-reader');
|
|
496
|
+
const fixtureScanner = path.join(fixtureRoot, 'error-ledger-bootstrap', 'scripts', 'scan.js');
|
|
497
|
+
write(fixtureScanner, fs.readFileSync(SCANNER, 'utf8'));
|
|
498
|
+
write(path.join(fixtureRoot, 'hooks', 'scripts', 'lib', 'local-errors.js'), incompleteReaderSource());
|
|
499
|
+
|
|
500
|
+
const readerRowsFile = path.join(TMP, 'incomplete-reader-rows.json');
|
|
501
|
+
write(readerRowsFile, JSON.stringify([{
|
|
502
|
+
schemaVersion: localErrors.SCHEMA_VERSION,
|
|
503
|
+
kind: 'occurrence',
|
|
504
|
+
workspaceKey: workspaceA,
|
|
505
|
+
provisionalId: 'readerprivateid',
|
|
506
|
+
destination: 'harness',
|
|
507
|
+
signature: 'reader-contract-control',
|
|
508
|
+
createdAt: NOW,
|
|
509
|
+
source: 'tool-failure',
|
|
510
|
+
host: 'unknown',
|
|
511
|
+
commandClass: 'test',
|
|
512
|
+
exitCode: 1,
|
|
513
|
+
sessionKey: null,
|
|
514
|
+
toolUseId: null,
|
|
515
|
+
outputExcerpt: 'PRIVATE_READER_ROW_SENTINEL',
|
|
516
|
+
matchedLedgerIds: []
|
|
517
|
+
}]));
|
|
518
|
+
const readerCallLog = path.join(TMP, 'incomplete-reader-calls.txt');
|
|
519
|
+
const out = path.join(TMP, 'incomplete-reader-reports');
|
|
520
|
+
fs.mkdirSync(out);
|
|
521
|
+
const ledgerDir = path.join(workspaceA, '.agents', 'harness-everything', 'errors');
|
|
522
|
+
const beforeStore = treeHash(STORE);
|
|
523
|
+
const beforeLedger = treeHash(ledgerDir);
|
|
524
|
+
const result = runNode(fixtureScanner, [
|
|
525
|
+
'--root', workspaceA, '--no-memory', '--source', 'local-store', '--destination', 'harness',
|
|
526
|
+
'--out', out, '--json'
|
|
527
|
+
], {
|
|
528
|
+
HARNESS_OBSERVATIONS_DIR: STORE,
|
|
529
|
+
READER_CALL_LOG: readerCallLog,
|
|
530
|
+
READER_FIXTURE_ROWS: readerRowsFile,
|
|
531
|
+
HOME,
|
|
532
|
+
USERPROFILE: HOME
|
|
533
|
+
});
|
|
534
|
+
assert.strictEqual(result.status, 0,
|
|
535
|
+
`incomplete reader should produce a safe report; exit ${result.status}; stderr: ${result.stderr.trim()}; stdout: ${result.stdout.trim()}`);
|
|
536
|
+
assert.strictEqual(result.stderr.trim(), '');
|
|
537
|
+
const envelope = JSON.parse(result.stdout);
|
|
538
|
+
const report = JSON.parse(fs.readFileSync(envelope.reportJson, 'utf8'));
|
|
539
|
+
const markdown = fs.readFileSync(envelope.reportMd, 'utf8');
|
|
540
|
+
assert.strictEqual(localSource(report).status, 'unavailable');
|
|
541
|
+
assert.strictEqual(localSource(report).reason, 'reader-contract-incomplete');
|
|
542
|
+
assert.strictEqual(localCandidates(report).length, 0);
|
|
543
|
+
assert.ok(!fs.existsSync(readerCallLog), 'incomplete reader is rejected before any reader function is called');
|
|
544
|
+
const otherSources = new Set(report.sources.filter(source => source.type !== 'local-store').map(source => source.type));
|
|
545
|
+
for (const type of ['git', 'doc', 'tracker', 'memory', 'instruction']) {
|
|
546
|
+
assert.ok(otherSources.has(type), `non-local source ${type} remains in the report`);
|
|
547
|
+
}
|
|
548
|
+
assertPrivate(report, markdown);
|
|
549
|
+
assert.strictEqual(treeHash(STORE), beforeStore, 'incomplete reader scan leaves store bytes unchanged');
|
|
550
|
+
assert.strictEqual(treeHash(ledgerDir), beforeLedger, 'incomplete reader scan leaves ledger bytes unchanged');
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
const acceptanceFailures = [];
|
|
554
|
+
function runAcceptanceCase(name, test) {
|
|
555
|
+
try { test(); }
|
|
556
|
+
catch (error) { acceptanceFailures.push(`${name}: ${error.message}`); }
|
|
557
|
+
}
|
|
558
|
+
runAcceptanceCase('F1 cross-kind collision', verifyProvisionalCollision);
|
|
559
|
+
runAcceptanceCase('F2 incomplete reader', verifyIncompleteReaderContract);
|
|
560
|
+
if (acceptanceFailures.length) {
|
|
561
|
+
process.stderr.write(`Scanner acceptance failures:\n${acceptanceFailures.join('\n')}\n`);
|
|
562
|
+
process.exitCode = 1;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
assert.deepStrictEqual(fs.readFileSync(rawStoreFile), baselineStore, 'the fixture store is restored byte-for-byte');
|
|
566
|
+
if (!acceptanceFailures.length) {
|
|
567
|
+
console.log('Local-store scanner CLI verified: legacy bytes, workspace isolation, collision handling, reader contract, redaction, statuses, dedupe, and packaged fallback.');
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
try { fs.rmSync(TMP, { recursive: true, force: true }); } catch (_) { /* temporary fixture cleanup */ }
|