harness-everything 1.2.1 → 1.3.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 +31 -0
- package/benchmarks/results/live-host/agy-2026-11-26-516-read-only/README.md +12 -0
- package/benchmarks/results/live-host/agy-2026-11-26-516-read-only/capture.sanitized.jsonl +5 -0
- package/benchmarks/results/live-host/codex-2026-11-26-488-post-tool-use/README.md +25 -0
- package/benchmarks/results/live-host/codex-2026-11-26-488-post-tool-use/capture.sanitized.jsonl +10 -0
- package/ci/fixtures/468-dispatch/agy-quota-PROVENANCE.md +19 -0
- package/ci/fixtures/468-dispatch/agy-quota-direct-individual.stderr +2 -0
- package/ci/fixtures/468-dispatch/agy-quota-direct-third-party.stderr +2 -0
- package/ci/fixtures/468-dispatch/agy-quota-exec-individual.log +3 -0
- package/ci/mechanism-2am-observations-session-import.test.js +1 -0
- package/ci/mechanism-2w-platform-compatibility.test.js +1 -2
- package/ci/mechanism-34-observations.test.js +37 -1
- package/ci/mechanism-397-opencode-observations.test.js +4 -3
- package/ci/mechanism-468-dispatch-cli.test.js +1496 -4
- package/ci/mechanism-516-windows-verify-and-shell.test.js +74 -19
- package/ci/mechanism-548-bigint-identity.test.js +531 -0
- package/ci/mechanism-error-ledger-oracle.test.js +786 -3
- package/ci/mechanism-error-ledger-scan.test.js +981 -0
- package/ci/mechanism-report-writer.test.js +47 -1
- package/ci/mechanism-system-one-cycle.test.js +47 -2
- package/ci/openai-plugin-submission.test.js +26 -8
- package/docs/error-handling/details/c8-dispatch-cli.md +109 -13
- package/docs/openai-plugin.md +6 -10
- package/docs/platform-capabilities.md +15 -0
- package/docs/routing.md +2 -0
- package/error-ledger-bootstrap/SKILL.md +1 -1
- package/error-ledger-bootstrap/references/workflow.md +42 -7
- package/error-ledger-bootstrap/scripts/promote.js +8 -6
- package/error-ledger-bootstrap/scripts/scan.js +525 -12
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/kernel-router.js +3 -2
- package/hooks/scripts/state-persist.js +6 -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/state-persist.js +6 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/skills/error-ledger-bootstrap/SKILL.md +1 -1
- package/plugins/harness-everything/skills/error-ledger-bootstrap/references/workflow.md +42 -7
- package/plugins/harness-everything/skills/error-ledger-bootstrap/scripts/promote.js +8 -6
- package/plugins/harness-everything/skills/error-ledger-bootstrap/scripts/scan.js +525 -12
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/kernel-router.js +3 -2
- package/sbom.cdx.json +7 -7
- package/scripts/build-openai-submission.js +8 -4
- package/scripts/dispatch.js +499 -87
- package/scripts/error-ledger-oracle.js +521 -27
- package/scripts/errors-sync.js +4 -3
- package/scripts/report-writer.js +4 -3
- package/submission/openai/README.md +9 -14
- package/submission/openai/listing.json +1 -1
- package/submission/openai/test-cases.json +1 -1
|
@@ -7,6 +7,8 @@ const fs = require('node:fs');
|
|
|
7
7
|
const os = require('node:os');
|
|
8
8
|
const path = require('node:path');
|
|
9
9
|
|
|
10
|
+
const localErrors = require('../hooks/scripts/lib/local-errors');
|
|
11
|
+
|
|
10
12
|
const ROOT = path.resolve(__dirname, '..');
|
|
11
13
|
const SCRIPT = path.join(ROOT, 'scripts', 'error-ledger-oracle.js');
|
|
12
14
|
const TMP = fs.realpathSync.native(fs.mkdtempSync(path.join(os.tmpdir(), 'harness-error-ledger-oracle-')));
|
|
@@ -23,9 +25,16 @@ function makeFixture(name, records, candidates) {
|
|
|
23
25
|
const report = path.join(root, 'scan-report.json');
|
|
24
26
|
fs.mkdirSync(ledger, { recursive: true });
|
|
25
27
|
for (const record of records) {
|
|
26
|
-
const sites = record.sites.map(site => ` - ${JSON.stringify(site)}`).join('\n');
|
|
28
|
+
const sites = record.sites.length ? record.sites.map(site => ` - ${JSON.stringify(site)}`).join('\n') : '';
|
|
29
|
+
const frontmatter = [
|
|
30
|
+
'---',
|
|
31
|
+
`id: ${record.id}`,
|
|
32
|
+
...(record.signature !== undefined ? [`signature: ${JSON.stringify(record.signature)}`] : []),
|
|
33
|
+
...(record.sites.length ? ['sites:', sites] : ['sites: []']),
|
|
34
|
+
'---'
|
|
35
|
+
];
|
|
27
36
|
write(path.join(ledger, `${record.id}-fixture.md`), [
|
|
28
|
-
|
|
37
|
+
...frontmatter,
|
|
29
38
|
'', record.lesson || `PRIVATE_RECORD_BODY_${record.id}`, ''
|
|
30
39
|
].join('\n'));
|
|
31
40
|
}
|
|
@@ -35,8 +44,10 @@ function makeFixture(name, records, candidates) {
|
|
|
35
44
|
kind: 'error-candidate',
|
|
36
45
|
id: candidate.id,
|
|
37
46
|
title: candidate.title || `PRIVATE_CANDIDATE_TITLE_${candidate.id}`,
|
|
47
|
+
...(candidate.signature !== undefined ? { signature: candidate.signature } : {}),
|
|
38
48
|
sites: candidate.sites,
|
|
39
|
-
sources: [{ type: 'memory', title: 'PRIVATE_MEMORY_SOURCE_TITLE' }]
|
|
49
|
+
sources: candidate.sources || [{ type: 'memory', title: 'PRIVATE_MEMORY_SOURCE_TITLE' }],
|
|
50
|
+
...(candidate.local !== undefined ? { local: candidate.local } : {})
|
|
40
51
|
}))
|
|
41
52
|
}, null, 2)}\n`);
|
|
42
53
|
return { root, ledger, report };
|
|
@@ -214,6 +225,778 @@ assert.deepStrictEqual(windowsPayload.linked, [
|
|
|
214
225
|
], 'win32 matching ignores case and never treats C: and D: paths as contained');
|
|
215
226
|
assert.deepStrictEqual(windowsPayload.nonComparable, ['E-0011']);
|
|
216
227
|
|
|
228
|
+
// --- I484-labels: opt-in digest-bound labelled evaluation ---
|
|
229
|
+
|
|
230
|
+
const REPO_SHA = 'd164d2aeab518fb5e90d59b59c0bb868a16d4ce1';
|
|
231
|
+
const SCANNER = path.join(ROOT, 'error-ledger-bootstrap', 'scripts', 'scan.js');
|
|
232
|
+
|
|
233
|
+
function sha256File(file) {
|
|
234
|
+
return crypto.createHash('sha256').update(fs.readFileSync(file)).digest('hex');
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
function writeLabels(file, payload) {
|
|
238
|
+
write(file, `${JSON.stringify(payload, null, 2)}\n`);
|
|
239
|
+
return file;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// 1. Legacy byte-identity without --labels (exact JSON and Markdown bytes)
|
|
243
|
+
const expectedLegacyJson = `${JSON.stringify({
|
|
244
|
+
counts: {
|
|
245
|
+
records: 8,
|
|
246
|
+
comparableRecords: 7,
|
|
247
|
+
linkedRecords: 5,
|
|
248
|
+
candidates: 5,
|
|
249
|
+
unmatchedCandidates: 1
|
|
250
|
+
},
|
|
251
|
+
rates: {
|
|
252
|
+
recallAll: 5 / 8,
|
|
253
|
+
recallComparable: 5 / 7,
|
|
254
|
+
unmatchedShare: 1 / 5
|
|
255
|
+
},
|
|
256
|
+
metricNote: 'Path overlap is a proxy and may link distinct lessons. Both recall rates are path-linked proxies: recall (all) = linked records / all records; recall (comparable) = linked records / comparable records.',
|
|
257
|
+
nonComparable: ['E-0004'],
|
|
258
|
+
linked: [
|
|
259
|
+
{ id: 'E-0001', candidateIds: ['candidate-exact'] },
|
|
260
|
+
{ id: 'E-0002', candidateIds: ['candidate-child'] },
|
|
261
|
+
{ id: 'E-0005', candidateIds: ['candidate-shared'] },
|
|
262
|
+
{ id: 'E-0006', candidateIds: ['candidate-shared'] },
|
|
263
|
+
{ id: 'E-0008', candidateIds: ['candidate-parent'] }
|
|
264
|
+
],
|
|
265
|
+
unlinked: ['E-0003', 'E-0004', 'E-0007'],
|
|
266
|
+
sharedPathHits: [{
|
|
267
|
+
site: 'shared/file.js',
|
|
268
|
+
recordIds: ['E-0005', 'E-0006'],
|
|
269
|
+
candidateIds: ['candidate-shared']
|
|
270
|
+
}]
|
|
271
|
+
}, null, 2)}\n`;
|
|
272
|
+
const expectedLegacyMd = [
|
|
273
|
+
'Path overlap is a proxy and may link distinct lessons. Both recall rates are path-linked proxies: recall (all) = linked records / all records; recall (comparable) = linked records / comparable records.',
|
|
274
|
+
'',
|
|
275
|
+
'| Metric | Value |',
|
|
276
|
+
'| --- | ---: |',
|
|
277
|
+
'| records | 8 |',
|
|
278
|
+
'| comparable records | 7 |',
|
|
279
|
+
'| linked records | 5 |',
|
|
280
|
+
'| candidates | 5 |',
|
|
281
|
+
'| unmatched candidates | 1 |',
|
|
282
|
+
'| recall (all) | 62.5% |',
|
|
283
|
+
'| recall (comparable) | 71.4% |',
|
|
284
|
+
'| unmatched candidate share (path overlap) | 20.0% |',
|
|
285
|
+
''
|
|
286
|
+
].join('\n');
|
|
287
|
+
assert.strictEqual(result.stdout, expectedLegacyJson, 'legacy JSON without --labels must remain byte-identical');
|
|
288
|
+
assert.strictEqual(markdown.stdout, expectedLegacyMd, 'legacy Markdown without --labels must remain byte-identical');
|
|
289
|
+
|
|
290
|
+
// 2. Valid --labels with all four outcomes, unlabelled tail, multi-record shared path audit, and privacy sentinel
|
|
291
|
+
// On fixture 'main':
|
|
292
|
+
// Path-linked pairs: (candidate-exact, E-0001), (candidate-child, E-0002),
|
|
293
|
+
// (candidate-shared, E-0005), (candidate-shared, E-0006),
|
|
294
|
+
// (candidate-parent, E-0008) -> 5 total path pairs
|
|
295
|
+
// Labels:
|
|
296
|
+
// candidate-shared -> true-positive-existing (E-0005): pair E-0005 TRUE, pair E-0006 FALSE
|
|
297
|
+
// candidate-child -> true-positive-new: pair E-0002 FALSE
|
|
298
|
+
// candidate-exact -> false-positive: pair E-0001 FALSE
|
|
299
|
+
// candidate-parent -> uncertain: pair E-0008 excluded (uncertainPairs: 1)
|
|
300
|
+
// candidate-boundary -> unlabelled (not path-linked)
|
|
301
|
+
// Candidate counts: labelled=4, decided=3, tpE=1, tpN=1, fp=1, uncertain=1, unlabelled=1
|
|
302
|
+
// Candidate rates: coverage=4/5, precision=2/3, falsePositiveShare=1/3
|
|
303
|
+
// Path pairs: total=5, audited=4, true=1, false=3, uncertain=1, unlabelled=0, falseLinkShare=3/4
|
|
304
|
+
const mainLabelsFile = writeLabels(path.join(fixture.root, 'labels.json'), {
|
|
305
|
+
schemaVersion: 1,
|
|
306
|
+
reportSha256: sha256File(fixture.report),
|
|
307
|
+
repoSha: REPO_SHA,
|
|
308
|
+
labels: [
|
|
309
|
+
{ candidateId: 'candidate-shared', outcome: 'true-positive-existing', linkedRecordId: 'E-0005', note: 'PRIVATE_LABEL_NOTE_SENTINEL_1' },
|
|
310
|
+
{ candidateId: 'candidate-child', outcome: 'true-positive-new', note: 'PRIVATE_LABEL_NOTE_SENTINEL_2' },
|
|
311
|
+
{ candidateId: 'candidate-exact', outcome: 'false-positive', note: 'PRIVATE_LABEL_NOTE_SENTINEL_3' },
|
|
312
|
+
{ candidateId: 'candidate-parent', outcome: 'uncertain', note: 'PRIVATE_LABEL_NOTE_SENTINEL_4' }
|
|
313
|
+
]
|
|
314
|
+
});
|
|
315
|
+
const mainLabelsBefore = fs.readFileSync(mainLabelsFile);
|
|
316
|
+
const labelledJsonRun = run(fixture, ['--labels', mainLabelsFile, '--json']);
|
|
317
|
+
const labelledPayload = jsonResult(labelledJsonRun);
|
|
318
|
+
assert.deepStrictEqual(labelledPayload.labelled, {
|
|
319
|
+
schemaVersion: 1,
|
|
320
|
+
reportSha256: sha256File(fixture.report),
|
|
321
|
+
repoSha: REPO_SHA,
|
|
322
|
+
counts: {
|
|
323
|
+
labelled: 4,
|
|
324
|
+
decided: 3,
|
|
325
|
+
truePositiveExisting: 1,
|
|
326
|
+
truePositiveNew: 1,
|
|
327
|
+
falsePositive: 1,
|
|
328
|
+
uncertain: 1,
|
|
329
|
+
unlabelled: 1
|
|
330
|
+
},
|
|
331
|
+
rates: {
|
|
332
|
+
coverage: 4 / 5,
|
|
333
|
+
precision: 2 / 3,
|
|
334
|
+
falsePositiveShare: 1 / 3,
|
|
335
|
+
falseLinkShare: 3 / 4
|
|
336
|
+
},
|
|
337
|
+
pathLinkAudit: {
|
|
338
|
+
totalPathPairs: 5,
|
|
339
|
+
auditedPairs: 4,
|
|
340
|
+
truePairs: 1,
|
|
341
|
+
falsePairs: 3,
|
|
342
|
+
uncertainPairs: 1,
|
|
343
|
+
unlabelledPairs: 0,
|
|
344
|
+
falseLinkShare: 3 / 4
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
assert.strictEqual(Object.prototype.hasOwnProperty.call(labelledPayload.labelled, 'labels'), false,
|
|
348
|
+
'raw labels array must not appear in JSON output');
|
|
349
|
+
assert.ok(!labelledJsonRun.stdout.includes('PRIVATE_LABEL_NOTE_SENTINEL') &&
|
|
350
|
+
!labelledJsonRun.stdout.includes('PRIVATE_RECORD_BODY_') &&
|
|
351
|
+
!labelledJsonRun.stdout.includes('PRIVATE_CANDIDATE_TITLE_') &&
|
|
352
|
+
!labelledJsonRun.stdout.includes('PRIVATE_MEMORY_SOURCE_TITLE'),
|
|
353
|
+
'JSON output must not leak label notes, candidate text, record bodies, or memory refs');
|
|
354
|
+
|
|
355
|
+
const labelledMdRun = run(fixture, ['--labels', mainLabelsFile]);
|
|
356
|
+
assert.strictEqual(labelledMdRun.status, 0, `labelled Markdown failed: ${labelledMdRun.stderr}`);
|
|
357
|
+
assert.ok(labelledMdRun.stdout.startsWith(expectedLegacyMd), 'labelled Markdown keeps legacy table intact at top');
|
|
358
|
+
assert.match(labelledMdRun.stdout, /\| label coverage \| 80\.0% \|/);
|
|
359
|
+
assert.match(labelledMdRun.stdout, /\| candidate precision \(decided candidates\) \| 66\.7% \|/);
|
|
360
|
+
assert.match(labelledMdRun.stdout, /\| false-positive share among decided candidates \| 33\.3% \|/);
|
|
361
|
+
assert.match(labelledMdRun.stdout, /\| audited path pairs \(decided\) \| 4 \|/);
|
|
362
|
+
assert.match(labelledMdRun.stdout, /\| path-link false-link share \(audited pairs\) \| 75\.0% \|/);
|
|
363
|
+
assert.ok(!labelledMdRun.stdout.includes('PRIVATE_LABEL_NOTE_SENTINEL') &&
|
|
364
|
+
!labelledMdRun.stdout.includes('PRIVATE_RECORD_BODY_') &&
|
|
365
|
+
!labelledMdRun.stdout.includes('PRIVATE_CANDIDATE_TITLE_') &&
|
|
366
|
+
!labelledMdRun.stdout.includes('PRIVATE_MEMORY_SOURCE_TITLE'),
|
|
367
|
+
'Markdown output must not leak label notes, candidate text, record bodies, or memory refs');
|
|
368
|
+
|
|
369
|
+
// 3. Zero-denominator cases: all uncertain, empty labels, zero candidates, and decided-but-unlinked (auditedPairs === 0)
|
|
370
|
+
const allUncertainFile = writeLabels(path.join(fixture.root, 'labels-uncertain.json'), {
|
|
371
|
+
schemaVersion: 1,
|
|
372
|
+
reportSha256: sha256File(fixture.report),
|
|
373
|
+
repoSha: REPO_SHA,
|
|
374
|
+
labels: [{ candidateId: 'candidate-exact', outcome: 'uncertain' }]
|
|
375
|
+
});
|
|
376
|
+
const allUncertainPayload = jsonResult(run(fixture, ['--labels', allUncertainFile, '--json']));
|
|
377
|
+
assert.strictEqual(allUncertainPayload.labelled.rates.coverage, 1 / 5);
|
|
378
|
+
assert.strictEqual(allUncertainPayload.labelled.rates.precision, null);
|
|
379
|
+
assert.strictEqual(allUncertainPayload.labelled.rates.falsePositiveShare, null);
|
|
380
|
+
assert.strictEqual(allUncertainPayload.labelled.rates.falseLinkShare, null);
|
|
381
|
+
assert.strictEqual(allUncertainPayload.labelled.pathLinkAudit.auditedPairs, 0);
|
|
382
|
+
assert.strictEqual(allUncertainPayload.labelled.pathLinkAudit.uncertainPairs, 1);
|
|
383
|
+
assert.strictEqual(allUncertainPayload.labelled.pathLinkAudit.unlabelledPairs, 4);
|
|
384
|
+
const allUncertainMd = run(fixture, ['--labels', allUncertainFile]);
|
|
385
|
+
assert.strictEqual(allUncertainMd.status, 0);
|
|
386
|
+
assert.match(allUncertainMd.stdout, /\| candidate precision \(decided candidates\) \| n\/a \|/);
|
|
387
|
+
assert.match(allUncertainMd.stdout, /\| false-positive share among decided candidates \| n\/a \|/);
|
|
388
|
+
assert.match(allUncertainMd.stdout, /\| path-link false-link share \(audited pairs\) \| n\/a \|/);
|
|
389
|
+
|
|
390
|
+
const decidedUnlinkedFile = writeLabels(path.join(fixture.root, 'labels-decided-unlinked.json'), {
|
|
391
|
+
schemaVersion: 1,
|
|
392
|
+
reportSha256: sha256File(fixture.report),
|
|
393
|
+
repoSha: REPO_SHA,
|
|
394
|
+
labels: [{ candidateId: 'candidate-boundary', outcome: 'true-positive-new' }]
|
|
395
|
+
});
|
|
396
|
+
const decidedUnlinkedPayload = jsonResult(run(fixture, ['--labels', decidedUnlinkedFile, '--json']));
|
|
397
|
+
assert.strictEqual(decidedUnlinkedPayload.labelled.rates.precision, 1);
|
|
398
|
+
assert.strictEqual(decidedUnlinkedPayload.labelled.rates.falsePositiveShare, 0);
|
|
399
|
+
assert.strictEqual(decidedUnlinkedPayload.labelled.pathLinkAudit.auditedPairs, 0);
|
|
400
|
+
assert.strictEqual(decidedUnlinkedPayload.labelled.rates.falseLinkShare, null,
|
|
401
|
+
'path-pair denominator is separate from candidate denominator');
|
|
402
|
+
|
|
403
|
+
const zeroLabelsFile = writeLabels(path.join(zero.root, 'labels-empty.json'), {
|
|
404
|
+
schemaVersion: 1,
|
|
405
|
+
reportSha256: sha256File(zero.report),
|
|
406
|
+
repoSha: REPO_SHA,
|
|
407
|
+
labels: []
|
|
408
|
+
});
|
|
409
|
+
const zeroLabelledPayload = jsonResult(run(zero, ['--labels', zeroLabelsFile, '--json']));
|
|
410
|
+
assert.strictEqual(zeroLabelledPayload.labelled.rates.coverage, null);
|
|
411
|
+
assert.strictEqual(zeroLabelledPayload.labelled.rates.precision, null);
|
|
412
|
+
assert.strictEqual(zeroLabelledPayload.labelled.rates.falsePositiveShare, null);
|
|
413
|
+
assert.strictEqual(zeroLabelledPayload.labelled.rates.falseLinkShare, null);
|
|
414
|
+
const zeroLabelledMd = run(zero, ['--labels', zeroLabelsFile]);
|
|
415
|
+
assert.strictEqual(zeroLabelledMd.status, 0);
|
|
416
|
+
assert.match(zeroLabelledMd.stdout, /\| label coverage \| n\/a \|/);
|
|
417
|
+
|
|
418
|
+
// 4. Strict validation failures (exit 2, zero mutation to pre-existing --out)
|
|
419
|
+
const sentinelOut = path.join(fixture.root, 'preexisting-out.json');
|
|
420
|
+
write(sentinelOut, '{"sentinel":"unchanged"}\n');
|
|
421
|
+
const sentinelBefore = fs.readFileSync(sentinelOut);
|
|
422
|
+
|
|
423
|
+
const invalidLabelCases = [
|
|
424
|
+
['wrong schemaVersion', { schemaVersion: 2, reportSha256: sha256File(fixture.report), repoSha: REPO_SHA, labels: [] }, /schemaVersion/],
|
|
425
|
+
['stale reportSha256', { schemaVersion: 1, reportSha256: '0'.repeat(64), repoSha: REPO_SHA, labels: [] }, /reportSha256/],
|
|
426
|
+
['missing repoSha', { schemaVersion: 1, reportSha256: sha256File(fixture.report), labels: [] }, /repoSha/],
|
|
427
|
+
['invalid repoSha', { schemaVersion: 1, reportSha256: sha256File(fixture.report), repoSha: 'not-a-sha', labels: [] }, /repoSha/],
|
|
428
|
+
['duplicate candidateId', {
|
|
429
|
+
schemaVersion: 1,
|
|
430
|
+
reportSha256: sha256File(fixture.report),
|
|
431
|
+
repoSha: REPO_SHA,
|
|
432
|
+
labels: [
|
|
433
|
+
{ candidateId: 'candidate-exact', outcome: 'false-positive' },
|
|
434
|
+
{ candidateId: 'candidate-exact', outcome: 'false-positive' }
|
|
435
|
+
]
|
|
436
|
+
}, /duplicate/i],
|
|
437
|
+
['unknown candidateId', {
|
|
438
|
+
schemaVersion: 1,
|
|
439
|
+
reportSha256: sha256File(fixture.report),
|
|
440
|
+
repoSha: REPO_SHA,
|
|
441
|
+
labels: [{ candidateId: 'candidate-does-not-exist', outcome: 'false-positive' }]
|
|
442
|
+
}, /unknown.*candidate/i],
|
|
443
|
+
['invalid outcome enum', {
|
|
444
|
+
schemaVersion: 1,
|
|
445
|
+
reportSha256: sha256File(fixture.report),
|
|
446
|
+
repoSha: REPO_SHA,
|
|
447
|
+
labels: [{ candidateId: 'candidate-exact', outcome: 'true-positive' }]
|
|
448
|
+
}, /outcome/i],
|
|
449
|
+
['true-positive-existing missing linkedRecordId', {
|
|
450
|
+
schemaVersion: 1,
|
|
451
|
+
reportSha256: sha256File(fixture.report),
|
|
452
|
+
repoSha: REPO_SHA,
|
|
453
|
+
labels: [{ candidateId: 'candidate-exact', outcome: 'true-positive-existing' }]
|
|
454
|
+
}, /linkedRecordId/],
|
|
455
|
+
['true-positive-existing unknown linkedRecordId', {
|
|
456
|
+
schemaVersion: 1,
|
|
457
|
+
reportSha256: sha256File(fixture.report),
|
|
458
|
+
repoSha: REPO_SHA,
|
|
459
|
+
labels: [{ candidateId: 'candidate-exact', outcome: 'true-positive-existing', linkedRecordId: 'E-9999' }]
|
|
460
|
+
}, /linkedRecordId/],
|
|
461
|
+
['true-positive-new with linkedRecordId', {
|
|
462
|
+
schemaVersion: 1,
|
|
463
|
+
reportSha256: sha256File(fixture.report),
|
|
464
|
+
repoSha: REPO_SHA,
|
|
465
|
+
labels: [{ candidateId: 'candidate-exact', outcome: 'true-positive-new', linkedRecordId: 'E-0001' }]
|
|
466
|
+
}, /linkedRecordId/],
|
|
467
|
+
['false-positive with null linkedRecordId', {
|
|
468
|
+
schemaVersion: 1,
|
|
469
|
+
reportSha256: sha256File(fixture.report),
|
|
470
|
+
repoSha: REPO_SHA,
|
|
471
|
+
labels: [{ candidateId: 'candidate-exact', outcome: 'false-positive', linkedRecordId: null }]
|
|
472
|
+
}, /linkedRecordId/],
|
|
473
|
+
['uncertain with linkedRecordId', {
|
|
474
|
+
schemaVersion: 1,
|
|
475
|
+
reportSha256: sha256File(fixture.report),
|
|
476
|
+
repoSha: REPO_SHA,
|
|
477
|
+
labels: [{ candidateId: 'candidate-exact', outcome: 'uncertain', linkedRecordId: 'E-0001' }]
|
|
478
|
+
}, /linkedRecordId/]
|
|
479
|
+
];
|
|
480
|
+
|
|
481
|
+
for (let i = 0; i < invalidLabelCases.length; i++) {
|
|
482
|
+
const [name, badPayload, expectedError] = invalidLabelCases[i];
|
|
483
|
+
const badFile = writeLabels(path.join(fixture.root, `bad-labels-${i}.json`), badPayload);
|
|
484
|
+
const badRun = run(fixture, ['--labels', badFile, '--json', '--out', sentinelOut]);
|
|
485
|
+
assert.strictEqual(badRun.status, 2, `invalid case "${name}" must exit 2; got ${badRun.status}`);
|
|
486
|
+
assert.match(badRun.stderr, expectedError, `invalid case "${name}" stderr: ${badRun.stderr}`);
|
|
487
|
+
assert.deepStrictEqual(fs.readFileSync(sentinelOut), sentinelBefore,
|
|
488
|
+
`invalid case "${name}" must not mutate --out`);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// 5. Protected --out aliases: --labels direct/symlink/hardlink, --report symlink, ledger file symlink/hardlink
|
|
492
|
+
const labelsDirectOut = run(fixture, ['--labels', mainLabelsFile, '--json', '--out', mainLabelsFile]);
|
|
493
|
+
assert.strictEqual(labelsDirectOut.status, 2, '--out cannot overwrite --labels');
|
|
494
|
+
assert.deepStrictEqual(fs.readFileSync(mainLabelsFile), mainLabelsBefore);
|
|
495
|
+
|
|
496
|
+
const labelsSymlink = path.join(fixture.root, 'labels-symlink.json');
|
|
497
|
+
try {
|
|
498
|
+
fs.symlinkSync(mainLabelsFile, labelsSymlink);
|
|
499
|
+
const res = run(fixture, ['--labels', mainLabelsFile, '--json', '--out', labelsSymlink]);
|
|
500
|
+
assert.strictEqual(res.status, 2, 'symlink to --labels cannot be used as --out');
|
|
501
|
+
assert.deepStrictEqual(fs.readFileSync(mainLabelsFile), mainLabelsBefore);
|
|
502
|
+
} catch (error) {
|
|
503
|
+
if (!['EPERM', 'EACCES', 'ENOTSUP', 'ENOSYS', 'EINVAL'].includes(error.code)) throw error;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
const labelsHardlink = path.join(fixture.root, 'labels-hardlink.json');
|
|
507
|
+
try {
|
|
508
|
+
fs.linkSync(mainLabelsFile, labelsHardlink);
|
|
509
|
+
const res = run(fixture, ['--labels', mainLabelsFile, '--json', '--out', labelsHardlink]);
|
|
510
|
+
assert.strictEqual(res.status, 2, 'hardlink to --labels cannot be used as --out');
|
|
511
|
+
assert.deepStrictEqual(fs.readFileSync(mainLabelsFile), mainLabelsBefore);
|
|
512
|
+
} catch (error) {
|
|
513
|
+
if (!['EPERM', 'EACCES', 'ENOTSUP', 'ENOSYS', 'EINVAL'].includes(error.code)) throw error;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
const reportSymlink = path.join(fixture.root, 'report-symlink.json');
|
|
517
|
+
try {
|
|
518
|
+
fs.symlinkSync(fixture.report, reportSymlink);
|
|
519
|
+
const res = run(fixture, ['--labels', mainLabelsFile, '--json', '--out', reportSymlink]);
|
|
520
|
+
assert.strictEqual(res.status, 2, 'symlink to --report cannot be used as --out');
|
|
521
|
+
assert.deepStrictEqual(fs.readFileSync(fixture.report), reportBefore);
|
|
522
|
+
} catch (error) {
|
|
523
|
+
if (!['EPERM', 'EACCES', 'ENOTSUP', 'ENOSYS', 'EINVAL'].includes(error.code)) throw error;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
const ledgerFileTarget = path.join(fixture.ledger, 'E-0001-fixture.md');
|
|
527
|
+
const ledgerFileSymlink = path.join(fixture.root, 'ledger-file-symlink.md');
|
|
528
|
+
try {
|
|
529
|
+
fs.symlinkSync(ledgerFileTarget, ledgerFileSymlink);
|
|
530
|
+
const res = run(fixture, ['--labels', mainLabelsFile, '--json', '--out', ledgerFileSymlink]);
|
|
531
|
+
assert.strictEqual(res.status, 2, 'symlink to a ledger file cannot be used as --out');
|
|
532
|
+
assert.deepStrictEqual(snapshot(fixture.ledger), ledgerBefore);
|
|
533
|
+
} catch (error) {
|
|
534
|
+
if (!['EPERM', 'EACCES', 'ENOTSUP', 'ENOSYS', 'EINVAL'].includes(error.code)) throw error;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
const ledgerFileHardlink = path.join(fixture.root, 'ledger-file-hardlink.md');
|
|
538
|
+
try {
|
|
539
|
+
fs.linkSync(ledgerFileTarget, ledgerFileHardlink);
|
|
540
|
+
const res = run(fixture, ['--labels', mainLabelsFile, '--json', '--out', ledgerFileHardlink]);
|
|
541
|
+
assert.strictEqual(res.status, 2, 'hardlink to a ledger file cannot be used as --out');
|
|
542
|
+
assert.deepStrictEqual(snapshot(fixture.ledger), ledgerBefore);
|
|
543
|
+
} catch (error) {
|
|
544
|
+
if (!['EPERM', 'EACCES', 'ENOTSUP', 'ENOSYS', 'EINVAL'].includes(error.code)) throw error;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
// 6. Real scanner-shaped fixture through the CLI (scan.js -> oracle) with same-path wrong-record case and no-label control
|
|
548
|
+
const scanRoot = path.join(TMP, 'real-scan-fixture');
|
|
549
|
+
const scanRepo = path.join(scanRoot, 'repo');
|
|
550
|
+
const scanHome = path.join(scanRoot, 'home');
|
|
551
|
+
const scanLedger = path.join(scanRoot, 'errors');
|
|
552
|
+
fs.mkdirSync(scanRepo, { recursive: true });
|
|
553
|
+
fs.mkdirSync(scanHome, { recursive: true });
|
|
554
|
+
fs.mkdirSync(scanLedger, { recursive: true });
|
|
555
|
+
|
|
556
|
+
function gitExec(repo, args, extraEnv = {}) {
|
|
557
|
+
return childProcess.execFileSync('git', ['-C', repo, ...args], {
|
|
558
|
+
encoding: 'utf8',
|
|
559
|
+
env: { ...process.env, GIT_CONFIG_NOSYSTEM: '1', HOME: scanHome, USERPROFILE: scanHome, ...extraEnv },
|
|
560
|
+
stdio: ['ignore', 'pipe', 'pipe']
|
|
561
|
+
}).trim();
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
gitExec(scanRepo, ['init', '-q']);
|
|
565
|
+
const commitFiles = (subject, files, offsetSec) => {
|
|
566
|
+
for (const [rel, content] of Object.entries(files)) write(path.join(scanRepo, rel), content);
|
|
567
|
+
gitExec(scanRepo, ['add', '-A']);
|
|
568
|
+
const date = new Date(Date.parse('2025-01-01T00:00:00Z') + offsetSec * 1000).toISOString();
|
|
569
|
+
gitExec(scanRepo, ['commit', '-q', '-m', subject], {
|
|
570
|
+
GIT_AUTHOR_NAME: 'Oracle Fixture',
|
|
571
|
+
GIT_AUTHOR_EMAIL: 'oracle-fixture@example.invalid',
|
|
572
|
+
GIT_COMMITTER_NAME: 'Oracle Fixture',
|
|
573
|
+
GIT_COMMITTER_EMAIL: 'oracle-fixture@example.invalid',
|
|
574
|
+
GIT_AUTHOR_DATE: date,
|
|
575
|
+
GIT_COMMITTER_DATE: date
|
|
576
|
+
});
|
|
577
|
+
};
|
|
578
|
+
commitFiles('feat: init synthetic modules', {
|
|
579
|
+
'src/shared.js': 'module.exports = 1;\n',
|
|
580
|
+
'src/exact.js': 'module.exports = 1;\n',
|
|
581
|
+
'src/unmatched.js': 'module.exports = 1;\n'
|
|
582
|
+
}, 0);
|
|
583
|
+
commitFiles('fix: first bug on shared and exact', {
|
|
584
|
+
'src/shared.js': 'module.exports = 2;\n',
|
|
585
|
+
'src/exact.js': 'module.exports = 2;\n',
|
|
586
|
+
'src/unmatched.js': 'module.exports = 2;\n'
|
|
587
|
+
}, 60);
|
|
588
|
+
commitFiles('fix: second bug on shared and exact', {
|
|
589
|
+
'src/shared.js': 'module.exports = 3;\n',
|
|
590
|
+
'src/exact.js': 'module.exports = 3;\n',
|
|
591
|
+
'src/unmatched.js': 'module.exports = 3;\n'
|
|
592
|
+
}, 120);
|
|
593
|
+
const scanRepoSha = gitExec(scanRepo, ['rev-parse', 'HEAD']);
|
|
594
|
+
|
|
595
|
+
const scanOutDir = path.join(scanRoot, 'scan-out');
|
|
596
|
+
const scanOut = childProcess.spawnSync(process.execPath, [
|
|
597
|
+
SCANNER, '--root', scanRepo, '--out', scanOutDir, '--no-memory', '--hide-ledger', '--home', scanHome, '--json'
|
|
598
|
+
], {
|
|
599
|
+
cwd: ROOT,
|
|
600
|
+
encoding: 'utf8',
|
|
601
|
+
env: { ...process.env, HOME: scanHome, USERPROFILE: scanHome }
|
|
602
|
+
});
|
|
603
|
+
assert.ifError(scanOut.error);
|
|
604
|
+
assert.strictEqual(scanOut.status, 0, `real scan.js failed: ${scanOut.stderr}`);
|
|
605
|
+
const scanSummary = JSON.parse(scanOut.stdout);
|
|
606
|
+
assert.strictEqual(scanSummary.ok, true, 'real scan.js must report ok: true');
|
|
607
|
+
const scanReportFile = scanSummary.reportJson;
|
|
608
|
+
const parsedScanReport = JSON.parse(fs.readFileSync(scanReportFile, 'utf8'));
|
|
609
|
+
const sharedCand = parsedScanReport.candidates.find(c => c.sites.includes('src/shared.js'));
|
|
610
|
+
const exactCand = parsedScanReport.candidates.find(c => c.sites.includes('src/exact.js'));
|
|
611
|
+
const unmatchedCand = parsedScanReport.candidates.find(c => c.sites.includes('src/unmatched.js'));
|
|
612
|
+
assert.ok(sharedCand && exactCand && unmatchedCand, 'real scan.js fixture must emit all three synthetic candidates');
|
|
613
|
+
|
|
614
|
+
write(path.join(scanLedger, 'E-0001-shared.md'), '---\nid: E-0001\nsites:\n - "src/shared.js"\n---\n\nPRIVATE_SCAN_BODY_1\n');
|
|
615
|
+
write(path.join(scanLedger, 'E-0002-other.md'), '---\nid: E-0002\nsites:\n - "src/other.js"\n---\n\nPRIVATE_SCAN_BODY_2\n');
|
|
616
|
+
write(path.join(scanLedger, 'E-0003-exact.md'), '---\nid: E-0003\nsites:\n - "src/exact.js"\n---\n\nPRIVATE_SCAN_BODY_3\n');
|
|
617
|
+
|
|
618
|
+
const scanFixture = { root: scanRoot, ledger: scanLedger, report: scanReportFile };
|
|
619
|
+
// No-label control
|
|
620
|
+
const scanControlJson = run(scanFixture, ['--json']);
|
|
621
|
+
const scanControlPayload = jsonResult(scanControlJson);
|
|
622
|
+
assert.deepStrictEqual(Object.keys(scanControlPayload).sort(),
|
|
623
|
+
['counts', 'rates', 'metricNote', 'nonComparable', 'linked', 'unlinked', 'sharedPathHits'].sort());
|
|
624
|
+
const scanControlMd = run(scanFixture);
|
|
625
|
+
assert.strictEqual(scanControlMd.status, 0);
|
|
626
|
+
assert.ok(!scanControlMd.stdout.includes('Labelled Evaluation'));
|
|
627
|
+
const scanControlJsonRepeat = run(scanFixture, ['--json']);
|
|
628
|
+
assert.strictEqual(scanControlJsonRepeat.stdout, scanControlJson.stdout, 'no-label control JSON is byte-identical');
|
|
629
|
+
const scanControlMdRepeat = run(scanFixture);
|
|
630
|
+
assert.strictEqual(scanControlMdRepeat.stdout, scanControlMd.stdout, 'no-label control Markdown is byte-identical');
|
|
631
|
+
|
|
632
|
+
// Labelled run: sharedCand path-links to E-0001, but is actually E-0002 (same-path wrong-record case!)
|
|
633
|
+
const scanLabelsFile = writeLabels(path.join(scanRoot, 'scan-labels.json'), {
|
|
634
|
+
schemaVersion: 1,
|
|
635
|
+
reportSha256: sha256File(scanReportFile),
|
|
636
|
+
repoSha: scanRepoSha,
|
|
637
|
+
labels: [
|
|
638
|
+
{ candidateId: sharedCand.id, outcome: 'true-positive-existing', linkedRecordId: 'E-0002', note: 'PRIVATE_SCAN_NOTE' },
|
|
639
|
+
{ candidateId: exactCand.id, outcome: 'true-positive-existing', linkedRecordId: 'E-0003' },
|
|
640
|
+
{ candidateId: unmatchedCand.id, outcome: 'false-positive' }
|
|
641
|
+
]
|
|
642
|
+
});
|
|
643
|
+
const scanLabelledJson = run(scanFixture, ['--labels', scanLabelsFile, '--json']);
|
|
644
|
+
const scanLabelledPayload = jsonResult(scanLabelledJson);
|
|
645
|
+
assert.strictEqual(scanLabelledPayload.labelled.counts.labelled, 3);
|
|
646
|
+
assert.strictEqual(scanLabelledPayload.labelled.counts.decided, 3);
|
|
647
|
+
assert.strictEqual(scanLabelledPayload.labelled.counts.truePositiveExisting, 2);
|
|
648
|
+
assert.strictEqual(scanLabelledPayload.labelled.counts.falsePositive, 1);
|
|
649
|
+
assert.strictEqual(scanLabelledPayload.labelled.rates.precision, 2 / 3);
|
|
650
|
+
assert.strictEqual(scanLabelledPayload.labelled.rates.falsePositiveShare, 1 / 3);
|
|
651
|
+
assert.deepStrictEqual(scanLabelledPayload.labelled.pathLinkAudit, {
|
|
652
|
+
totalPathPairs: 2,
|
|
653
|
+
auditedPairs: 2,
|
|
654
|
+
truePairs: 1,
|
|
655
|
+
falsePairs: 1,
|
|
656
|
+
uncertainPairs: 0,
|
|
657
|
+
unlabelledPairs: 0,
|
|
658
|
+
falseLinkShare: 1 / 2
|
|
659
|
+
});
|
|
660
|
+
assert.ok(!scanLabelledJson.stdout.includes('PRIVATE_SCAN_NOTE') && !scanLabelledJson.stdout.includes('PRIVATE_SCAN_BODY_'));
|
|
661
|
+
|
|
662
|
+
// Exact report-byte SHA-256 sensitivity: adding a single trailing newline invalidates reportSha256
|
|
663
|
+
const modifiedReportFile = path.join(scanRoot, 'scan-report-whitespace.json');
|
|
664
|
+
fs.writeFileSync(modifiedReportFile, `${fs.readFileSync(scanReportFile, 'utf8')}\n`);
|
|
665
|
+
const staleReportRun = run({ root: scanRoot, ledger: scanLedger, report: modifiedReportFile }, ['--labels', scanLabelsFile, '--json']);
|
|
666
|
+
assert.strictEqual(staleReportRun.status, 2, 'exact report-byte SHA-256 must fail on 1-byte whitespace change');
|
|
667
|
+
assert.match(staleReportRun.stderr, /reportSha256/);
|
|
668
|
+
|
|
669
|
+
// Malformed JSON labels file fails before mutation
|
|
670
|
+
const malformedLabelsFile = path.join(fixture.root, 'malformed-labels.json');
|
|
671
|
+
write(malformedLabelsFile, '{ not valid json');
|
|
672
|
+
const malformedRun = run(fixture, ['--labels', malformedLabelsFile, '--json', '--out', sentinelOut]);
|
|
673
|
+
assert.strictEqual(malformedRun.status, 2, 'malformed JSON labels file must exit 2');
|
|
674
|
+
assert.deepStrictEqual(fs.readFileSync(sentinelOut), sentinelBefore, 'malformed JSON labels must not mutate --out');
|
|
675
|
+
|
|
676
|
+
// --- I485-process-oracle: opt-in process measurement view ---
|
|
677
|
+
|
|
678
|
+
// 1. Conservative site classification (both sides), exact local-store signature linking,
|
|
679
|
+
// ignoring local.dedupe and generic memory signatures, multi-record signature ambiguity,
|
|
680
|
+
// separate path / unique-signature / union coverage and overlap breakdown.
|
|
681
|
+
const procFixture = makeFixture('process-view-core', [
|
|
682
|
+
// Path-only (historical concrete path with parenthetical note)
|
|
683
|
+
{ id: 'E-0101', signature: 'sig-path-only', sites: ['parser/parser.js (PR #448 branch; not on main)'] },
|
|
684
|
+
// Path-only with space in plausible repository-relative path
|
|
685
|
+
{ id: 'E-0102', signature: 'sig-spaced-path', sites: ['docs/my guide.md'] },
|
|
686
|
+
// Unique-signature only (prose-only site -> path non-comparable)
|
|
687
|
+
{ id: 'E-0103', signature: 'git-stash-in-active-worker-worktree', sites: ['coordinator base-control testing (git stash / git stash pop)'] },
|
|
688
|
+
// Both path AND unique-signature (overlap)
|
|
689
|
+
{ id: 'E-0104', signature: 'both-channels-sig', sites: ['scripts/shared-both.js'] },
|
|
690
|
+
// Prose-only unlinked (even though a candidate carries the exact same prose string!)
|
|
691
|
+
{ id: 'E-0105', signature: 'prose-unlinked', sites: ['F4-I2b report', 'Harness workspace boundary guard'] },
|
|
692
|
+
// Glob-only unlinked (even though a candidate carries the exact same glob string!)
|
|
693
|
+
{ id: 'E-0106', signature: 'glob-unlinked', sites: ['.agents/harness-everything/errors/E-*.md', 'src/{a,b}.js', 'src/a?.js', 'src/[ab].js'] }, // portability-lint: allow glob site strings in YAML data, not filesystem paths
|
|
694
|
+
// Ambiguous multi-record signature pair (E-0107 and E-0108 share duplicate-sig)
|
|
695
|
+
{ id: 'E-0107', signature: 'duplicate-sig', sites: ['coordinator packet construction (D1 packet)'] },
|
|
696
|
+
{ id: 'E-0108', signature: 'duplicate-sig', sites: ['shared git stash stack across worktrees'] },
|
|
697
|
+
// Generic memory signature sentinel (must NOT link to memory or local-store generic signature)
|
|
698
|
+
{ id: 'E-0109', signature: 'local-memory-lead', sites: ['coordinator briefing of ledger-writing workers'] },
|
|
699
|
+
// Absolute / UNC / traversal / URL -> path non-comparable
|
|
700
|
+
{ id: 'E-0110', signature: 'non-path-forms', sites: ['/abs/file.js', 'C:\\repo\\file.js', '\\\\server\\share\\file.js', '//server/share/file.js', '../outside.js', 'a/../b.js', 'https://example.invalid/a.js'] },
|
|
701
|
+
// Shared path hits (E-0111 and E-0112 both use shared/hit.js)
|
|
702
|
+
{ id: 'E-0111', signature: 'shared-path-a', sites: ['shared/hit.js'] },
|
|
703
|
+
{ id: 'E-0112', signature: 'shared-path-b', sites: ['shared/hit.js'] }
|
|
704
|
+
], [
|
|
705
|
+
// Links E-0101 by path
|
|
706
|
+
{ id: 'cand-path-exact', sites: ['./parser/parser.js'], sources: [{ type: 'git', sha: 'a'.repeat(40) }] },
|
|
707
|
+
// Links E-0102 by spaced concrete path
|
|
708
|
+
{ id: 'cand-spaced-path', sites: ['docs/my guide.md'], sources: [{ type: 'doc', path: 'docs/my guide.md' }] },
|
|
709
|
+
// Links E-0103 by exact local-store signature (pathless)
|
|
710
|
+
{
|
|
711
|
+
id: 'cand-sig-unique',
|
|
712
|
+
signature: 'git-stash-in-active-worker-worktree',
|
|
713
|
+
sites: [],
|
|
714
|
+
sources: [{ type: 'local-store', kind: 'provisional-lesson', ref: 'p-local-1', destination: 'harness', signature: 'git-stash-in-active-worker-worktree' }],
|
|
715
|
+
local: { evidenceReadiness: 'needs-evidence', occurrenceCount: 0, dedupe: { status: 'none', classIds: [], matchedBy: [], newClassEligible: true } }
|
|
716
|
+
},
|
|
717
|
+
// Links E-0104 by path AND cand-sig-both links E-0104 by signature
|
|
718
|
+
{ id: 'cand-both-path', sites: ['scripts/shared-both.js'], sources: [{ type: 'git', sha: 'b'.repeat(40) }] },
|
|
719
|
+
{
|
|
720
|
+
id: 'cand-both-sig',
|
|
721
|
+
signature: 'both-channels-sig',
|
|
722
|
+
sites: [],
|
|
723
|
+
sources: [{ type: 'local-store', kind: 'provisional-lesson', ref: 'p-local-2', destination: 'harness', signature: 'both-channels-sig' }]
|
|
724
|
+
},
|
|
725
|
+
// Same prose & glob strings on candidate side -> must NOT link E-0105 or E-0106
|
|
726
|
+
{ id: 'cand-prose-glob', sites: ['F4-I2b report', '.agents/harness-everything/errors/E-*.md'], sources: [{ type: 'doc', path: 'docs/notes.md' }] }, // portability-lint: allow glob site string in report JSON, not filesystem path
|
|
727
|
+
// Local-store candidate with ambiguous signature matching E-0107 and E-0108 -> disclosed, 0 unique-link / union credit
|
|
728
|
+
{
|
|
729
|
+
id: 'cand-sig-ambig',
|
|
730
|
+
signature: 'duplicate-sig',
|
|
731
|
+
sites: [],
|
|
732
|
+
sources: [{ type: 'local-store', kind: 'provisional-lesson', ref: 'p-local-3', destination: 'harness', signature: 'duplicate-sig' }]
|
|
733
|
+
},
|
|
734
|
+
// Local-store candidate with DIFFERENT signature but lying local.dedupe claiming E-0105 -> must NOT link!
|
|
735
|
+
{
|
|
736
|
+
id: 'cand-dedupe-lie',
|
|
737
|
+
signature: 'unrelated-local-sig',
|
|
738
|
+
sites: [],
|
|
739
|
+
sources: [{ type: 'local-store', kind: 'provisional-lesson', ref: 'p-local-4', destination: 'harness', signature: 'unrelated-local-sig' }],
|
|
740
|
+
local: { evidenceReadiness: 'needs-evidence', occurrenceCount: 0, dedupe: { status: 'existing', classIds: ['E-0105'], matchedBy: ['whole-rule'], newClassEligible: false } }
|
|
741
|
+
},
|
|
742
|
+
// Generic memory candidate with signature 'local-memory-lead' -> must NOT link E-0109!
|
|
743
|
+
{
|
|
744
|
+
id: 'cand-generic-memory',
|
|
745
|
+
signature: 'local-memory-lead',
|
|
746
|
+
sites: [],
|
|
747
|
+
sources: [{ type: 'memory', ref: 'local/abc123' }]
|
|
748
|
+
},
|
|
749
|
+
// Non-local-store candidate whose signature matches E-0105 -> must NOT link via signature!
|
|
750
|
+
{
|
|
751
|
+
id: 'cand-git-sig',
|
|
752
|
+
signature: 'prose-unlinked',
|
|
753
|
+
sites: [],
|
|
754
|
+
sources: [{ type: 'git', sha: 'c'.repeat(40) }]
|
|
755
|
+
},
|
|
756
|
+
// Shared path hit linking E-0111 and E-0112
|
|
757
|
+
{ id: 'cand-shared-hit', sites: ['shared/hit.js'], sources: [{ type: 'git', sha: 'd'.repeat(40) }] }
|
|
758
|
+
]);
|
|
759
|
+
|
|
760
|
+
const procLedgerBefore = snapshot(procFixture.ledger);
|
|
761
|
+
const procReportBefore = fs.readFileSync(procFixture.report);
|
|
762
|
+
const procJsonRun = run(procFixture, ['--process-view', '--json']);
|
|
763
|
+
const procPayload = jsonResult(procJsonRun);
|
|
764
|
+
|
|
765
|
+
assert.ok(procPayload.processView, '--process-view must add processView object to JSON output');
|
|
766
|
+
const pv = procPayload.processView;
|
|
767
|
+
// Total records: 12. Path-comparable: E-0101, E-0102, E-0104, E-0111, E-0112 (5).
|
|
768
|
+
// Path-non-comparable: E-0103, E-0105, E-0106, E-0107, E-0108, E-0109, E-0110 (7).
|
|
769
|
+
assert.deepStrictEqual(pv.pathNonComparable, ['E-0103', 'E-0105', 'E-0106', 'E-0107', 'E-0108', 'E-0109', 'E-0110']);
|
|
770
|
+
assert.strictEqual(pv.counts.records, 12);
|
|
771
|
+
assert.strictEqual(pv.counts.pathComparableRecords, 5);
|
|
772
|
+
assert.strictEqual(pv.counts.pathNonComparableRecords, 7);
|
|
773
|
+
assert.strictEqual(pv.counts.pathLinkedRecords, 5);
|
|
774
|
+
assert.strictEqual(pv.counts.uniqueSignatureLinkedRecords, 2);
|
|
775
|
+
assert.strictEqual(pv.counts.unionLinkedRecords, 6);
|
|
776
|
+
|
|
777
|
+
assert.deepStrictEqual(pv.coverage.path, {
|
|
778
|
+
linkedRecords: 5,
|
|
779
|
+
pathComparableDenominator: 5,
|
|
780
|
+
allRecordsDenominator: 12,
|
|
781
|
+
ratePathComparable: 5 / 5,
|
|
782
|
+
rateAll: 5 / 12
|
|
783
|
+
});
|
|
784
|
+
assert.deepStrictEqual(pv.coverage.uniqueSignature, {
|
|
785
|
+
linkedRecords: 2,
|
|
786
|
+
allRecordsDenominator: 12,
|
|
787
|
+
rateAll: 2 / 12
|
|
788
|
+
});
|
|
789
|
+
assert.deepStrictEqual(pv.coverage.union, {
|
|
790
|
+
linkedRecords: 6,
|
|
791
|
+
allRecordsDenominator: 12,
|
|
792
|
+
rateAll: 6 / 12
|
|
793
|
+
});
|
|
794
|
+
assert.deepStrictEqual(pv.breakdown.pathOnlyRecords, ['E-0101', 'E-0102', 'E-0111', 'E-0112']);
|
|
795
|
+
assert.deepStrictEqual(pv.breakdown.uniqueSignatureOnlyRecords, ['E-0103']);
|
|
796
|
+
assert.deepStrictEqual(pv.breakdown.bothPathAndUniqueSignatureRecords, ['E-0104']);
|
|
797
|
+
assert.deepStrictEqual(pv.breakdown.unlinkedRecords, ['E-0105', 'E-0106', 'E-0107', 'E-0108', 'E-0109', 'E-0110']);
|
|
798
|
+
assert.deepStrictEqual(pv.ambiguousSignatureMatches, [{
|
|
799
|
+
signature: 'duplicate-sig',
|
|
800
|
+
recordIds: ['E-0107', 'E-0108'],
|
|
801
|
+
candidateIds: ['cand-sig-ambig']
|
|
802
|
+
}]);
|
|
803
|
+
assert.deepStrictEqual(pv.sharedPathHits, [{
|
|
804
|
+
site: 'shared/hit.js',
|
|
805
|
+
recordIds: ['E-0111', 'E-0112'],
|
|
806
|
+
candidateIds: ['cand-shared-hit']
|
|
807
|
+
}]);
|
|
808
|
+
assert.strictEqual(pv.breakdown.counts.ambiguousSignatureMatches, 1);
|
|
809
|
+
assert.strictEqual(pv.breakdown.counts.ambiguousSignatureRecords, 2);
|
|
810
|
+
assert.strictEqual(pv.breakdown.counts.ambiguousSignatureCandidates, 1);
|
|
811
|
+
assert.match(pv.metricNote, /structural coverage prox/i);
|
|
812
|
+
assert.match(pv.metricNote, /non-comparable/i);
|
|
813
|
+
assert.ok(!procJsonRun.stdout.includes('PRIVATE_RECORD_BODY_') &&
|
|
814
|
+
!procJsonRun.stdout.includes('PRIVATE_CANDIDATE_TITLE_') &&
|
|
815
|
+
!procJsonRun.stdout.includes('PRIVATE_MEMORY_SOURCE_TITLE'),
|
|
816
|
+
'processView JSON must not leak private record bodies, titles, or memory refs');
|
|
817
|
+
assert.deepStrictEqual(snapshot(procFixture.ledger), procLedgerBefore, 'process-view leaves ledger byte-identical');
|
|
818
|
+
assert.deepStrictEqual(fs.readFileSync(procFixture.report), procReportBefore, 'process-view leaves report byte-identical');
|
|
819
|
+
|
|
820
|
+
// Markdown output for --process-view
|
|
821
|
+
const procMdRun = run(procFixture, ['--process-view']);
|
|
822
|
+
assert.strictEqual(procMdRun.status, 0, `process-view Markdown failed: ${procMdRun.stderr}`);
|
|
823
|
+
assert.match(procMdRun.stdout, /## Process View/);
|
|
824
|
+
assert.match(procMdRun.stdout, /structural coverage prox/i);
|
|
825
|
+
assert.match(procMdRun.stdout, /\| path coverage \(path-comparable\) \| 100\.0% \|/);
|
|
826
|
+
assert.match(procMdRun.stdout, /\| path coverage \(all records\) \| 41\.7% \|/);
|
|
827
|
+
assert.match(procMdRun.stdout, /\| unique-signature coverage \(all records\) \| 16\.7% \|/);
|
|
828
|
+
assert.match(procMdRun.stdout, /\| union coverage \(all records\) \| 50\.0% \|/);
|
|
829
|
+
assert.match(procMdRun.stdout, /\| ambiguous signature matches \(unresolved\) \| 1 \|/);
|
|
830
|
+
assert.ok(!procMdRun.stdout.includes('PRIVATE_RECORD_BODY_') && !procMdRun.stdout.includes('PRIVATE_CANDIDATE_TITLE_'));
|
|
831
|
+
|
|
832
|
+
// 2. Zero-denominator cases in --process-view:
|
|
833
|
+
// (a) Prose/glob-only ledger -> pathComparableDenominator === 0 -> ratePathComparable === null / n/a
|
|
834
|
+
const proseOnlyFixture = makeFixture('process-view-prose-only', [
|
|
835
|
+
{ id: 'E-0201', signature: 'prose-only-sig', sites: ['F4-I2b report'] },
|
|
836
|
+
{ id: 'E-0202', signature: 'glob-only-sig', sites: ['.agents/harness-everything/errors/E-*.md'] } // portability-lint: allow glob site string in YAML data, not filesystem path
|
|
837
|
+
], []);
|
|
838
|
+
const proseOnlyJson = jsonResult(run(proseOnlyFixture, ['--process-view', '--json']));
|
|
839
|
+
assert.strictEqual(proseOnlyJson.processView.counts.pathComparableRecords, 0);
|
|
840
|
+
assert.strictEqual(proseOnlyJson.processView.coverage.path.ratePathComparable, null);
|
|
841
|
+
assert.strictEqual(proseOnlyJson.processView.coverage.path.rateAll, 0);
|
|
842
|
+
const proseOnlyMd = run(proseOnlyFixture, ['--process-view']);
|
|
843
|
+
assert.strictEqual(proseOnlyMd.status, 0);
|
|
844
|
+
assert.match(proseOnlyMd.stdout, /\| path coverage \(path-comparable\) \| n\/a \|/);
|
|
845
|
+
|
|
846
|
+
// (b) Empty ledger (0 records) -> all rates null / n/a
|
|
847
|
+
const emptyLedgerFixture = makeFixture('process-view-empty-ledger', [], []);
|
|
848
|
+
const emptyLedgerJson = jsonResult(run(emptyLedgerFixture, ['--process-view', '--json']));
|
|
849
|
+
assert.strictEqual(emptyLedgerJson.processView.coverage.path.ratePathComparable, null);
|
|
850
|
+
assert.strictEqual(emptyLedgerJson.processView.coverage.path.rateAll, null);
|
|
851
|
+
assert.strictEqual(emptyLedgerJson.processView.coverage.uniqueSignature.rateAll, null);
|
|
852
|
+
assert.strictEqual(emptyLedgerJson.processView.coverage.union.rateAll, null);
|
|
853
|
+
const emptyLedgerMd = run(emptyLedgerFixture, ['--process-view']);
|
|
854
|
+
assert.strictEqual(emptyLedgerMd.status, 0);
|
|
855
|
+
assert.match(emptyLedgerMd.stdout, /\| union coverage \(all records\) \| n\/a \|/);
|
|
856
|
+
assert.match(emptyLedgerMd.stdout, /\| unique-signature coverage \(all records\) \| n\/a \|/);
|
|
857
|
+
|
|
858
|
+
// 3. Windows platform normalization control under --process-view
|
|
859
|
+
const winProcFixture = makeFixture('process-view-windows', [
|
|
860
|
+
{ id: 'E-0301', sites: ['Src\\My Parser.JS'] },
|
|
861
|
+
{ id: 'E-0302', sites: ['C:\\repo\\src\\file.js', '\\\\server\\share\\file.js'] }
|
|
862
|
+
], [
|
|
863
|
+
{ id: 'cand-win-space', sites: ['src/my parser.js'], sources: [{ type: 'git', sha: 'e'.repeat(40) }] },
|
|
864
|
+
{ id: 'cand-win-drive', sites: ['D:/repo/src/file.js'], sources: [{ type: 'git', sha: 'f'.repeat(40) }] }
|
|
865
|
+
]);
|
|
866
|
+
const winProcPayload = jsonResult(run(winProcFixture, ['--process-view', '--platform', 'win32', '--json']));
|
|
867
|
+
assert.deepStrictEqual(winProcPayload.processView.pathLinked, [{ id: 'E-0301', candidateIds: ['cand-win-space'] }]);
|
|
868
|
+
assert.deepStrictEqual(winProcPayload.processView.pathNonComparable, ['E-0302']);
|
|
869
|
+
|
|
870
|
+
// 4. Preservation control: --process-view off keeps legacy and #484 outputs byte-identical;
|
|
871
|
+
// --process-view + --labels composes without altering #484 labelled results.
|
|
872
|
+
const legacyOffCheck = run(fixture, ['--json']);
|
|
873
|
+
assert.strictEqual(legacyOffCheck.stdout, expectedLegacyJson, 'legacy JSON unchanged when --process-view is off');
|
|
874
|
+
const labelledOffCheck = run(fixture, ['--labels', mainLabelsFile, '--json']);
|
|
875
|
+
assert.strictEqual(labelledOffCheck.stdout, labelledJsonRun.stdout, '#484 labelled JSON unchanged when --process-view is off');
|
|
876
|
+
const composedRun = jsonResult(run(fixture, ['--labels', mainLabelsFile, '--process-view', '--json']));
|
|
877
|
+
assert.deepStrictEqual(composedRun.labelled, labelledPayload.labelled, '--process-view preserves #484 labelled section');
|
|
878
|
+
assert.ok(composedRun.processView, 'composed run includes processView');
|
|
879
|
+
|
|
880
|
+
// 5. Real scanner-to-oracle local-store controls (pathless positive, different-signature negative, same-signature ambiguity)
|
|
881
|
+
const lsRoot = path.join(TMP, 'real-local-store-oracle');
|
|
882
|
+
const lsRepo = path.join(lsRoot, 'repo');
|
|
883
|
+
const lsHome = path.join(lsRoot, 'home');
|
|
884
|
+
const lsStore = path.join(lsRoot, 'store');
|
|
885
|
+
const lsLedger = path.join(lsRoot, 'errors');
|
|
886
|
+
fs.mkdirSync(lsRepo, { recursive: true });
|
|
887
|
+
fs.mkdirSync(lsHome, { recursive: true });
|
|
888
|
+
fs.mkdirSync(lsStore, { recursive: true });
|
|
889
|
+
fs.mkdirSync(lsLedger, { recursive: true });
|
|
890
|
+
|
|
891
|
+
function gitLs(args, extraEnv = {}) {
|
|
892
|
+
return childProcess.execFileSync('git', ['-C', lsRepo, ...args], {
|
|
893
|
+
encoding: 'utf8',
|
|
894
|
+
env: {
|
|
895
|
+
...process.env,
|
|
896
|
+
GIT_CONFIG_NOSYSTEM: '1',
|
|
897
|
+
HOME: lsHome,
|
|
898
|
+
USERPROFILE: lsHome,
|
|
899
|
+
GIT_AUTHOR_NAME: 'Oracle LS Fixture',
|
|
900
|
+
GIT_AUTHOR_EMAIL: 'oracle-ls@example.invalid',
|
|
901
|
+
GIT_COMMITTER_NAME: 'Oracle LS Fixture',
|
|
902
|
+
GIT_COMMITTER_EMAIL: 'oracle-ls@example.invalid',
|
|
903
|
+
GIT_AUTHOR_DATE: '2026-11-25T12:00:00Z',
|
|
904
|
+
GIT_COMMITTER_DATE: '2026-11-25T12:00:00Z',
|
|
905
|
+
...extraEnv
|
|
906
|
+
},
|
|
907
|
+
stdio: ['ignore', 'pipe', 'pipe']
|
|
908
|
+
}).trim();
|
|
909
|
+
}
|
|
910
|
+
gitLs(['init', '-q']);
|
|
911
|
+
write(path.join(lsRepo, 'README.md'), '# Synthetic Local Store Fixture\n');
|
|
912
|
+
gitLs(['add', '-A']);
|
|
913
|
+
gitLs(['commit', '-q', '-m', 'chore: init local-store fixture']);
|
|
914
|
+
|
|
915
|
+
const lsEnv = { ...process.env, HARNESS_OBSERVATIONS_DIR: lsStore, HOME: lsHome, USERPROFILE: lsHome };
|
|
916
|
+
for (const key of ['HARNESS_WORKSPACE_ROOT', 'CLAUDE_PROJECT_DIR', 'CODEX_PROJECT_DIR', 'HARNESS_SYSTEM_ONE_MODE']) delete lsEnv[key];
|
|
917
|
+
|
|
918
|
+
const addLsLesson = (provisionalId, signature, subcommand) => {
|
|
919
|
+
const res = localErrors.addProvisionalLesson({
|
|
920
|
+
workspaceRoot: lsRepo,
|
|
921
|
+
destination: 'harness',
|
|
922
|
+
provisionalId,
|
|
923
|
+
signature,
|
|
924
|
+
match: { actions: [{ tool: 'shell', executable: 'git', subcommand }] },
|
|
925
|
+
lesson: `PRIVATE_LS_LESSON_${provisionalId}`,
|
|
926
|
+
cue: `PRIVATE_LS_CUE_${provisionalId}`,
|
|
927
|
+
issueUrl: null
|
|
928
|
+
}, { env: lsEnv });
|
|
929
|
+
assert.ok(['appended', 'duplicate'].includes(res.status), `failed to seed local-store lesson ${provisionalId}: ${res.status}`);
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
// Seed three pathless local-store lessons:
|
|
933
|
+
// 1) pathless positive: matches E-0034 by exact signature
|
|
934
|
+
// 2) different-signature negative: has a different signature from every ledger record
|
|
935
|
+
// 3) same-signature ambiguity: matches BOTH E-0091 and E-0092
|
|
936
|
+
addLsLesson('prov-positive-1', 'git-stash-in-active-worker-worktree', 'stash');
|
|
937
|
+
addLsLesson('prov-negative-1', 'different-signature-negative', 'push');
|
|
938
|
+
addLsLesson('prov-ambig-1', 'ambiguous-process-signature', 'pull');
|
|
939
|
+
|
|
940
|
+
const lsScanOutDir = path.join(lsRoot, 'scan-out');
|
|
941
|
+
const lsScan = childProcess.spawnSync(process.execPath, [
|
|
942
|
+
SCANNER, '--root', lsRepo, '--out', lsScanOutDir, '--no-memory', '--hide-ledger',
|
|
943
|
+
'--source', 'local-store', '--destination', 'harness', '--home', lsHome, '--json'
|
|
944
|
+
], { cwd: ROOT, encoding: 'utf8', env: lsEnv });
|
|
945
|
+
assert.ifError(lsScan.error);
|
|
946
|
+
assert.strictEqual(lsScan.status, 0, `real local-store scan.js failed: ${lsScan.stderr}`);
|
|
947
|
+
const lsScanSummary = JSON.parse(lsScan.stdout);
|
|
948
|
+
assert.strictEqual(lsScanSummary.ok, true);
|
|
949
|
+
const lsReportFile = lsScanSummary.reportJson;
|
|
950
|
+
|
|
951
|
+
// Ledger with prose-only sites: 1 exact match (E-0034), 1 different-signature target (E-0090), 2 ambiguous-signature records (E-0091, E-0092)
|
|
952
|
+
write(path.join(lsLedger, 'E-0034-git-stash.md'), [
|
|
953
|
+
'---', 'id: E-0034', 'signature: git-stash-in-active-worker-worktree',
|
|
954
|
+
'sites:', ' - "coordinator base-control testing (git stash / git stash pop in a worker worktree)"',
|
|
955
|
+
'---', '', 'PRIVATE_LS_LEDGER_BODY_34', ''
|
|
956
|
+
].join('\n'));
|
|
957
|
+
write(path.join(lsLedger, 'E-0090-other-sig.md'), [
|
|
958
|
+
'---', 'id: E-0090', 'signature: expected-other-signature',
|
|
959
|
+
'sites:', ' - "coordinator packet construction"',
|
|
960
|
+
'---', '', 'PRIVATE_LS_LEDGER_BODY_90', ''
|
|
961
|
+
].join('\n'));
|
|
962
|
+
write(path.join(lsLedger, 'E-0091-ambig-a.md'), [
|
|
963
|
+
'---', 'id: E-0091', 'signature: ambiguous-process-signature',
|
|
964
|
+
'sites:', ' - "shared coordinator workflow"',
|
|
965
|
+
'---', '', 'PRIVATE_LS_LEDGER_BODY_91', ''
|
|
966
|
+
].join('\n'));
|
|
967
|
+
write(path.join(lsLedger, 'E-0092-ambig-b.md'), [
|
|
968
|
+
'---', 'id: E-0092', 'signature: ambiguous-process-signature',
|
|
969
|
+
'sites:', ' - "another coordinator workflow"',
|
|
970
|
+
'---', '', 'PRIVATE_LS_LEDGER_BODY_92', ''
|
|
971
|
+
].join('\n'));
|
|
972
|
+
|
|
973
|
+
const lsOracleFixture = { root: lsRoot, ledger: lsLedger, report: lsReportFile };
|
|
974
|
+
const lsOracleRun = run(lsOracleFixture, ['--process-view', '--json']);
|
|
975
|
+
const lsOraclePayload = jsonResult(lsOracleRun);
|
|
976
|
+
const lspv = lsOraclePayload.processView;
|
|
977
|
+
|
|
978
|
+
assert.strictEqual(lspv.counts.records, 4);
|
|
979
|
+
assert.strictEqual(lspv.counts.pathComparableRecords, 0);
|
|
980
|
+
assert.strictEqual(lspv.coverage.path.ratePathComparable, null);
|
|
981
|
+
assert.strictEqual(lspv.coverage.path.rateAll, 0);
|
|
982
|
+
assert.strictEqual(lspv.counts.uniqueSignatureLinkedRecords, 1, 'only E-0034 links uniquely via scanner local-store signature');
|
|
983
|
+
assert.strictEqual(lspv.uniqueSignatureLinked.length, 1);
|
|
984
|
+
assert.strictEqual(lspv.uniqueSignatureLinked[0].id, 'E-0034');
|
|
985
|
+
assert.strictEqual(lspv.uniqueSignatureLinked[0].signature, 'git-stash-in-active-worker-worktree');
|
|
986
|
+
assert.strictEqual(lspv.counts.unionLinkedRecords, 1);
|
|
987
|
+
assert.strictEqual(lspv.coverage.uniqueSignature.rateAll, 1 / 4);
|
|
988
|
+
assert.strictEqual(lspv.coverage.union.rateAll, 1 / 4);
|
|
989
|
+
assert.deepStrictEqual(lspv.breakdown.unlinkedRecords, ['E-0090', 'E-0091', 'E-0092']);
|
|
990
|
+
assert.strictEqual(lspv.ambiguousSignatureMatches.length, 1);
|
|
991
|
+
assert.strictEqual(lspv.ambiguousSignatureMatches[0].signature, 'ambiguous-process-signature');
|
|
992
|
+
assert.deepStrictEqual(lspv.ambiguousSignatureMatches[0].recordIds, ['E-0091', 'E-0092']);
|
|
993
|
+
assert.strictEqual(lspv.ambiguousSignatureMatches[0].candidateIds.length, 1);
|
|
994
|
+
assert.ok(!lsOracleRun.stdout.includes('PRIVATE_LS_LESSON_') &&
|
|
995
|
+
!lsOracleRun.stdout.includes('PRIVATE_LS_CUE_') &&
|
|
996
|
+
!lsOracleRun.stdout.includes('PRIVATE_LS_LEDGER_BODY_') &&
|
|
997
|
+
!lsOracleRun.stdout.includes('prov-positive-1'),
|
|
998
|
+
'scanner-to-oracle processView must not leak private local-store text or raw provisional IDs');
|
|
999
|
+
|
|
217
1000
|
try {
|
|
218
1001
|
fs.rmSync(TMP, { recursive: true, force: true });
|
|
219
1002
|
} catch (error) {
|