@codyswann/lisa 4.54.0 → 4.54.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +3 -2
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/scripts/lint-wiki.mjs +64 -12
- package/plugins/lisa-wiki/scripts/verify-migration.mjs +4 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/scripts/lint-wiki.mjs +64 -12
- package/plugins/lisa-wiki-agy/scripts/verify-migration.mjs +4 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/scripts/lint-wiki.mjs +64 -12
- package/plugins/lisa-wiki-copilot/scripts/verify-migration.mjs +4 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/scripts/lint-wiki.mjs +64 -12
- package/plugins/lisa-wiki-cursor/scripts/verify-migration.mjs +4 -1
- package/plugins/src/wiki/scripts/lint-wiki.mjs +64 -12
- package/plugins/src/wiki/scripts/verify-migration.mjs +4 -1
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Read-only: it reports findings, it never modifies the wiki. Default mode is
|
|
6
6
|
* "warning" (exit 1 only on FAIL items); `--strict` (hard-enforcement) also fails
|
|
7
|
-
* on WARN items.
|
|
7
|
+
* on WARN items. INFO items are reported and block in NEITHER mode — that is
|
|
8
|
+
* the level for a finding whose only available remedies would damage the wiki,
|
|
9
|
+
* such as an unresolved path cited by a preserved source note.
|
|
8
10
|
*
|
|
9
11
|
* Usage: node lint-wiki.mjs [--wiki <wikiRoot>] [--config <path>] [--strict] [--json]
|
|
10
12
|
* Exit 0 = clean (for the active mode), 1 = blocking findings.
|
|
@@ -303,14 +305,41 @@ const linkResolution = (f, target) => {
|
|
|
303
305
|
];
|
|
304
306
|
return { primary, hit: cands.find(exists) };
|
|
305
307
|
};
|
|
308
|
+
// A path inside `sources/` is PRESERVED material, not authored navigation.
|
|
309
|
+
// The contract (`Required Provenance`) says a source note records "what was
|
|
310
|
+
// ingested, when, from where, and with what scope" — so a path it names is a
|
|
311
|
+
// statement about the subject AT INGESTION TIME, and the subject moves on.
|
|
312
|
+
// `wiki/sources/repository/2026-05-14-monorepo-baseline.md` cites
|
|
313
|
+
// `docs/lisa-architecture.svg`, which existed on that date and was deleted
|
|
314
|
+
// three months later by the commit that made the wiki the documentation home.
|
|
315
|
+
// The citation is not broken; it is accurate about a repository that changed.
|
|
316
|
+
//
|
|
317
|
+
// Neither remedy available to a reader is legitimate. Repointing the link
|
|
318
|
+
// falsifies the record, and deleting it destroys the provenance the note
|
|
319
|
+
// exists to carry — so this cannot be reported at a level that blocks, or the
|
|
320
|
+
// only way to a green check is to damage the evidence. It is reported at INFO:
|
|
321
|
+
// visible in every run and in `--json`, blocking in none, `--strict` included.
|
|
322
|
+
// Authored pages are untouched and a broken link there still FAILs.
|
|
323
|
+
const preservedFinding = (id, message, f) =>
|
|
324
|
+
report.add(
|
|
325
|
+
"links",
|
|
326
|
+
`source-${id}`,
|
|
327
|
+
"INFO",
|
|
328
|
+
`${message} (preserved)`,
|
|
329
|
+
wrel(f)
|
|
330
|
+
);
|
|
306
331
|
const linkedTo = new Set();
|
|
307
332
|
for (const f of allMd) {
|
|
308
333
|
const text = fs.readFileSync(f, "utf8");
|
|
334
|
+
const preserved = isSourceNote(f);
|
|
309
335
|
for (const target of extractMarkdownLinks(text)) {
|
|
310
336
|
const { primary, hit } = linkResolution(f, target);
|
|
311
337
|
if (target.endsWith(".md") || primary.endsWith(".md")) {
|
|
312
338
|
linkedTo.add(hit ?? primary);
|
|
313
|
-
if (
|
|
339
|
+
if (hit) continue;
|
|
340
|
+
if (preserved) {
|
|
341
|
+
preservedFinding("citation", `cited page not present → ${target}`, f);
|
|
342
|
+
} else {
|
|
314
343
|
report.add(
|
|
315
344
|
"links",
|
|
316
345
|
"broken",
|
|
@@ -320,13 +349,21 @@ for (const f of allMd) {
|
|
|
320
349
|
);
|
|
321
350
|
}
|
|
322
351
|
} else if (!hit) {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
352
|
+
if (preserved) {
|
|
353
|
+
preservedFinding(
|
|
354
|
+
"citation-asset",
|
|
355
|
+
`cited path not present → ${target}`,
|
|
356
|
+
f
|
|
357
|
+
);
|
|
358
|
+
} else {
|
|
359
|
+
report.add(
|
|
360
|
+
"links",
|
|
361
|
+
"broken-asset",
|
|
362
|
+
"WARN",
|
|
363
|
+
`link to missing path → ${target}`,
|
|
364
|
+
wrel(f)
|
|
365
|
+
);
|
|
366
|
+
}
|
|
330
367
|
}
|
|
331
368
|
}
|
|
332
369
|
for (const cite of extractCitations(text)) {
|
|
@@ -335,7 +372,14 @@ for (const f of allMd) {
|
|
|
335
372
|
path.resolve(wikiRoot, "..", cite),
|
|
336
373
|
path.resolve(path.dirname(f), cite),
|
|
337
374
|
];
|
|
338
|
-
if (
|
|
375
|
+
if (candidates.some(exists)) continue;
|
|
376
|
+
if (preserved) {
|
|
377
|
+
preservedFinding(
|
|
378
|
+
"citation-path",
|
|
379
|
+
`citation path not present → ${cite}`,
|
|
380
|
+
f
|
|
381
|
+
);
|
|
382
|
+
} else {
|
|
339
383
|
report.add(
|
|
340
384
|
"links",
|
|
341
385
|
"citation-unresolved",
|
|
@@ -427,6 +471,12 @@ for (const f of allFiles) {
|
|
|
427
471
|
// --- output + verdict -----------------------------------------------------
|
|
428
472
|
const fails = report.items.filter(i => i.status === "FAIL");
|
|
429
473
|
const warns = report.items.filter(i => i.status === "WARN");
|
|
474
|
+
// INFO is reported and never counted. It is the level for a finding a reader
|
|
475
|
+
// is not permitted to fix — see the preserved-source note above. Deliberately
|
|
476
|
+
// excluded from `blocking` in BOTH modes, because `--strict` is what the
|
|
477
|
+
// shipped CI workflow runs and a level that blocks under strict is a blocking
|
|
478
|
+
// level with extra steps.
|
|
479
|
+
const infos = report.items.filter(i => i.status === "INFO");
|
|
430
480
|
const blocking = strict ? fails.length + warns.length : fails.length;
|
|
431
481
|
|
|
432
482
|
if (asJson) {
|
|
@@ -437,6 +487,7 @@ if (asJson) {
|
|
|
437
487
|
strict,
|
|
438
488
|
fails: fails.length,
|
|
439
489
|
warns: warns.length,
|
|
490
|
+
infos: infos.length,
|
|
440
491
|
items: report.items.filter(i => i.status !== "PASS"),
|
|
441
492
|
},
|
|
442
493
|
null,
|
|
@@ -444,13 +495,14 @@ if (asJson) {
|
|
|
444
495
|
)
|
|
445
496
|
);
|
|
446
497
|
} else {
|
|
498
|
+
const marker = { FAIL: "✗", INFO: "ℹ" };
|
|
447
499
|
for (const i of report.items.filter(i => i.status !== "PASS")) {
|
|
448
500
|
console.log(
|
|
449
|
-
`${i.status
|
|
501
|
+
`${marker[i.status] ?? "⚠"} [${i.group}] ${i.message}${i.file ? ` (${i.file})` : ""}`
|
|
450
502
|
);
|
|
451
503
|
}
|
|
452
504
|
console.log(
|
|
453
|
-
`\n${fails.length} fail, ${warns.length} warn${strict ? " (strict: warnings block)" : ""} — ${blocking === 0 ? "OK" : "BLOCKING"}`
|
|
505
|
+
`\n${fails.length} fail, ${warns.length} warn, ${infos.length} info (never blocking)${strict ? " (strict: warnings block)" : ""} — ${blocking === 0 ? "OK" : "BLOCKING"}`
|
|
454
506
|
);
|
|
455
507
|
}
|
|
456
508
|
|
|
@@ -188,7 +188,10 @@ const counts = all.reduce(
|
|
|
188
188
|
{}
|
|
189
189
|
);
|
|
190
190
|
console.log(
|
|
191
|
-
|
|
191
|
+
// INFO is listed so a finding this tool deliberately does not judge is still
|
|
192
|
+
// counted somewhere. Omitting it would make a reported finding invisible in
|
|
193
|
+
// the one line most readers stop at.
|
|
194
|
+
`verdict: ${verdict} (${["PASS", "INFO", "WARN", "FAIL", "SKIP"].map(s => `${counts[s] ?? 0} ${s}`).join(", ")})`
|
|
192
195
|
);
|
|
193
196
|
console.log(`report → ${path.relative(process.cwd(), outPath)}`);
|
|
194
197
|
console.log(
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Read-only: it reports findings, it never modifies the wiki. Default mode is
|
|
6
6
|
* "warning" (exit 1 only on FAIL items); `--strict` (hard-enforcement) also fails
|
|
7
|
-
* on WARN items.
|
|
7
|
+
* on WARN items. INFO items are reported and block in NEITHER mode — that is
|
|
8
|
+
* the level for a finding whose only available remedies would damage the wiki,
|
|
9
|
+
* such as an unresolved path cited by a preserved source note.
|
|
8
10
|
*
|
|
9
11
|
* Usage: node lint-wiki.mjs [--wiki <wikiRoot>] [--config <path>] [--strict] [--json]
|
|
10
12
|
* Exit 0 = clean (for the active mode), 1 = blocking findings.
|
|
@@ -303,14 +305,41 @@ const linkResolution = (f, target) => {
|
|
|
303
305
|
];
|
|
304
306
|
return { primary, hit: cands.find(exists) };
|
|
305
307
|
};
|
|
308
|
+
// A path inside `sources/` is PRESERVED material, not authored navigation.
|
|
309
|
+
// The contract (`Required Provenance`) says a source note records "what was
|
|
310
|
+
// ingested, when, from where, and with what scope" — so a path it names is a
|
|
311
|
+
// statement about the subject AT INGESTION TIME, and the subject moves on.
|
|
312
|
+
// `wiki/sources/repository/2026-05-14-monorepo-baseline.md` cites
|
|
313
|
+
// `docs/lisa-architecture.svg`, which existed on that date and was deleted
|
|
314
|
+
// three months later by the commit that made the wiki the documentation home.
|
|
315
|
+
// The citation is not broken; it is accurate about a repository that changed.
|
|
316
|
+
//
|
|
317
|
+
// Neither remedy available to a reader is legitimate. Repointing the link
|
|
318
|
+
// falsifies the record, and deleting it destroys the provenance the note
|
|
319
|
+
// exists to carry — so this cannot be reported at a level that blocks, or the
|
|
320
|
+
// only way to a green check is to damage the evidence. It is reported at INFO:
|
|
321
|
+
// visible in every run and in `--json`, blocking in none, `--strict` included.
|
|
322
|
+
// Authored pages are untouched and a broken link there still FAILs.
|
|
323
|
+
const preservedFinding = (id, message, f) =>
|
|
324
|
+
report.add(
|
|
325
|
+
"links",
|
|
326
|
+
`source-${id}`,
|
|
327
|
+
"INFO",
|
|
328
|
+
`${message} (preserved)`,
|
|
329
|
+
wrel(f)
|
|
330
|
+
);
|
|
306
331
|
const linkedTo = new Set();
|
|
307
332
|
for (const f of allMd) {
|
|
308
333
|
const text = fs.readFileSync(f, "utf8");
|
|
334
|
+
const preserved = isSourceNote(f);
|
|
309
335
|
for (const target of extractMarkdownLinks(text)) {
|
|
310
336
|
const { primary, hit } = linkResolution(f, target);
|
|
311
337
|
if (target.endsWith(".md") || primary.endsWith(".md")) {
|
|
312
338
|
linkedTo.add(hit ?? primary);
|
|
313
|
-
if (
|
|
339
|
+
if (hit) continue;
|
|
340
|
+
if (preserved) {
|
|
341
|
+
preservedFinding("citation", `cited page not present → ${target}`, f);
|
|
342
|
+
} else {
|
|
314
343
|
report.add(
|
|
315
344
|
"links",
|
|
316
345
|
"broken",
|
|
@@ -320,13 +349,21 @@ for (const f of allMd) {
|
|
|
320
349
|
);
|
|
321
350
|
}
|
|
322
351
|
} else if (!hit) {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
352
|
+
if (preserved) {
|
|
353
|
+
preservedFinding(
|
|
354
|
+
"citation-asset",
|
|
355
|
+
`cited path not present → ${target}`,
|
|
356
|
+
f
|
|
357
|
+
);
|
|
358
|
+
} else {
|
|
359
|
+
report.add(
|
|
360
|
+
"links",
|
|
361
|
+
"broken-asset",
|
|
362
|
+
"WARN",
|
|
363
|
+
`link to missing path → ${target}`,
|
|
364
|
+
wrel(f)
|
|
365
|
+
);
|
|
366
|
+
}
|
|
330
367
|
}
|
|
331
368
|
}
|
|
332
369
|
for (const cite of extractCitations(text)) {
|
|
@@ -335,7 +372,14 @@ for (const f of allMd) {
|
|
|
335
372
|
path.resolve(wikiRoot, "..", cite),
|
|
336
373
|
path.resolve(path.dirname(f), cite),
|
|
337
374
|
];
|
|
338
|
-
if (
|
|
375
|
+
if (candidates.some(exists)) continue;
|
|
376
|
+
if (preserved) {
|
|
377
|
+
preservedFinding(
|
|
378
|
+
"citation-path",
|
|
379
|
+
`citation path not present → ${cite}`,
|
|
380
|
+
f
|
|
381
|
+
);
|
|
382
|
+
} else {
|
|
339
383
|
report.add(
|
|
340
384
|
"links",
|
|
341
385
|
"citation-unresolved",
|
|
@@ -427,6 +471,12 @@ for (const f of allFiles) {
|
|
|
427
471
|
// --- output + verdict -----------------------------------------------------
|
|
428
472
|
const fails = report.items.filter(i => i.status === "FAIL");
|
|
429
473
|
const warns = report.items.filter(i => i.status === "WARN");
|
|
474
|
+
// INFO is reported and never counted. It is the level for a finding a reader
|
|
475
|
+
// is not permitted to fix — see the preserved-source note above. Deliberately
|
|
476
|
+
// excluded from `blocking` in BOTH modes, because `--strict` is what the
|
|
477
|
+
// shipped CI workflow runs and a level that blocks under strict is a blocking
|
|
478
|
+
// level with extra steps.
|
|
479
|
+
const infos = report.items.filter(i => i.status === "INFO");
|
|
430
480
|
const blocking = strict ? fails.length + warns.length : fails.length;
|
|
431
481
|
|
|
432
482
|
if (asJson) {
|
|
@@ -437,6 +487,7 @@ if (asJson) {
|
|
|
437
487
|
strict,
|
|
438
488
|
fails: fails.length,
|
|
439
489
|
warns: warns.length,
|
|
490
|
+
infos: infos.length,
|
|
440
491
|
items: report.items.filter(i => i.status !== "PASS"),
|
|
441
492
|
},
|
|
442
493
|
null,
|
|
@@ -444,13 +495,14 @@ if (asJson) {
|
|
|
444
495
|
)
|
|
445
496
|
);
|
|
446
497
|
} else {
|
|
498
|
+
const marker = { FAIL: "✗", INFO: "ℹ" };
|
|
447
499
|
for (const i of report.items.filter(i => i.status !== "PASS")) {
|
|
448
500
|
console.log(
|
|
449
|
-
`${i.status
|
|
501
|
+
`${marker[i.status] ?? "⚠"} [${i.group}] ${i.message}${i.file ? ` (${i.file})` : ""}`
|
|
450
502
|
);
|
|
451
503
|
}
|
|
452
504
|
console.log(
|
|
453
|
-
`\n${fails.length} fail, ${warns.length} warn${strict ? " (strict: warnings block)" : ""} — ${blocking === 0 ? "OK" : "BLOCKING"}`
|
|
505
|
+
`\n${fails.length} fail, ${warns.length} warn, ${infos.length} info (never blocking)${strict ? " (strict: warnings block)" : ""} — ${blocking === 0 ? "OK" : "BLOCKING"}`
|
|
454
506
|
);
|
|
455
507
|
}
|
|
456
508
|
|
|
@@ -188,7 +188,10 @@ const counts = all.reduce(
|
|
|
188
188
|
{}
|
|
189
189
|
);
|
|
190
190
|
console.log(
|
|
191
|
-
|
|
191
|
+
// INFO is listed so a finding this tool deliberately does not judge is still
|
|
192
|
+
// counted somewhere. Omitting it would make a reported finding invisible in
|
|
193
|
+
// the one line most readers stop at.
|
|
194
|
+
`verdict: ${verdict} (${["PASS", "INFO", "WARN", "FAIL", "SKIP"].map(s => `${counts[s] ?? 0} ${s}`).join(", ")})`
|
|
192
195
|
);
|
|
193
196
|
console.log(`report → ${path.relative(process.cwd(), outPath)}`);
|
|
194
197
|
console.log(
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Read-only: it reports findings, it never modifies the wiki. Default mode is
|
|
6
6
|
* "warning" (exit 1 only on FAIL items); `--strict` (hard-enforcement) also fails
|
|
7
|
-
* on WARN items.
|
|
7
|
+
* on WARN items. INFO items are reported and block in NEITHER mode — that is
|
|
8
|
+
* the level for a finding whose only available remedies would damage the wiki,
|
|
9
|
+
* such as an unresolved path cited by a preserved source note.
|
|
8
10
|
*
|
|
9
11
|
* Usage: node lint-wiki.mjs [--wiki <wikiRoot>] [--config <path>] [--strict] [--json]
|
|
10
12
|
* Exit 0 = clean (for the active mode), 1 = blocking findings.
|
|
@@ -303,14 +305,41 @@ const linkResolution = (f, target) => {
|
|
|
303
305
|
];
|
|
304
306
|
return { primary, hit: cands.find(exists) };
|
|
305
307
|
};
|
|
308
|
+
// A path inside `sources/` is PRESERVED material, not authored navigation.
|
|
309
|
+
// The contract (`Required Provenance`) says a source note records "what was
|
|
310
|
+
// ingested, when, from where, and with what scope" — so a path it names is a
|
|
311
|
+
// statement about the subject AT INGESTION TIME, and the subject moves on.
|
|
312
|
+
// `wiki/sources/repository/2026-05-14-monorepo-baseline.md` cites
|
|
313
|
+
// `docs/lisa-architecture.svg`, which existed on that date and was deleted
|
|
314
|
+
// three months later by the commit that made the wiki the documentation home.
|
|
315
|
+
// The citation is not broken; it is accurate about a repository that changed.
|
|
316
|
+
//
|
|
317
|
+
// Neither remedy available to a reader is legitimate. Repointing the link
|
|
318
|
+
// falsifies the record, and deleting it destroys the provenance the note
|
|
319
|
+
// exists to carry — so this cannot be reported at a level that blocks, or the
|
|
320
|
+
// only way to a green check is to damage the evidence. It is reported at INFO:
|
|
321
|
+
// visible in every run and in `--json`, blocking in none, `--strict` included.
|
|
322
|
+
// Authored pages are untouched and a broken link there still FAILs.
|
|
323
|
+
const preservedFinding = (id, message, f) =>
|
|
324
|
+
report.add(
|
|
325
|
+
"links",
|
|
326
|
+
`source-${id}`,
|
|
327
|
+
"INFO",
|
|
328
|
+
`${message} (preserved)`,
|
|
329
|
+
wrel(f)
|
|
330
|
+
);
|
|
306
331
|
const linkedTo = new Set();
|
|
307
332
|
for (const f of allMd) {
|
|
308
333
|
const text = fs.readFileSync(f, "utf8");
|
|
334
|
+
const preserved = isSourceNote(f);
|
|
309
335
|
for (const target of extractMarkdownLinks(text)) {
|
|
310
336
|
const { primary, hit } = linkResolution(f, target);
|
|
311
337
|
if (target.endsWith(".md") || primary.endsWith(".md")) {
|
|
312
338
|
linkedTo.add(hit ?? primary);
|
|
313
|
-
if (
|
|
339
|
+
if (hit) continue;
|
|
340
|
+
if (preserved) {
|
|
341
|
+
preservedFinding("citation", `cited page not present → ${target}`, f);
|
|
342
|
+
} else {
|
|
314
343
|
report.add(
|
|
315
344
|
"links",
|
|
316
345
|
"broken",
|
|
@@ -320,13 +349,21 @@ for (const f of allMd) {
|
|
|
320
349
|
);
|
|
321
350
|
}
|
|
322
351
|
} else if (!hit) {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
352
|
+
if (preserved) {
|
|
353
|
+
preservedFinding(
|
|
354
|
+
"citation-asset",
|
|
355
|
+
`cited path not present → ${target}`,
|
|
356
|
+
f
|
|
357
|
+
);
|
|
358
|
+
} else {
|
|
359
|
+
report.add(
|
|
360
|
+
"links",
|
|
361
|
+
"broken-asset",
|
|
362
|
+
"WARN",
|
|
363
|
+
`link to missing path → ${target}`,
|
|
364
|
+
wrel(f)
|
|
365
|
+
);
|
|
366
|
+
}
|
|
330
367
|
}
|
|
331
368
|
}
|
|
332
369
|
for (const cite of extractCitations(text)) {
|
|
@@ -335,7 +372,14 @@ for (const f of allMd) {
|
|
|
335
372
|
path.resolve(wikiRoot, "..", cite),
|
|
336
373
|
path.resolve(path.dirname(f), cite),
|
|
337
374
|
];
|
|
338
|
-
if (
|
|
375
|
+
if (candidates.some(exists)) continue;
|
|
376
|
+
if (preserved) {
|
|
377
|
+
preservedFinding(
|
|
378
|
+
"citation-path",
|
|
379
|
+
`citation path not present → ${cite}`,
|
|
380
|
+
f
|
|
381
|
+
);
|
|
382
|
+
} else {
|
|
339
383
|
report.add(
|
|
340
384
|
"links",
|
|
341
385
|
"citation-unresolved",
|
|
@@ -427,6 +471,12 @@ for (const f of allFiles) {
|
|
|
427
471
|
// --- output + verdict -----------------------------------------------------
|
|
428
472
|
const fails = report.items.filter(i => i.status === "FAIL");
|
|
429
473
|
const warns = report.items.filter(i => i.status === "WARN");
|
|
474
|
+
// INFO is reported and never counted. It is the level for a finding a reader
|
|
475
|
+
// is not permitted to fix — see the preserved-source note above. Deliberately
|
|
476
|
+
// excluded from `blocking` in BOTH modes, because `--strict` is what the
|
|
477
|
+
// shipped CI workflow runs and a level that blocks under strict is a blocking
|
|
478
|
+
// level with extra steps.
|
|
479
|
+
const infos = report.items.filter(i => i.status === "INFO");
|
|
430
480
|
const blocking = strict ? fails.length + warns.length : fails.length;
|
|
431
481
|
|
|
432
482
|
if (asJson) {
|
|
@@ -437,6 +487,7 @@ if (asJson) {
|
|
|
437
487
|
strict,
|
|
438
488
|
fails: fails.length,
|
|
439
489
|
warns: warns.length,
|
|
490
|
+
infos: infos.length,
|
|
440
491
|
items: report.items.filter(i => i.status !== "PASS"),
|
|
441
492
|
},
|
|
442
493
|
null,
|
|
@@ -444,13 +495,14 @@ if (asJson) {
|
|
|
444
495
|
)
|
|
445
496
|
);
|
|
446
497
|
} else {
|
|
498
|
+
const marker = { FAIL: "✗", INFO: "ℹ" };
|
|
447
499
|
for (const i of report.items.filter(i => i.status !== "PASS")) {
|
|
448
500
|
console.log(
|
|
449
|
-
`${i.status
|
|
501
|
+
`${marker[i.status] ?? "⚠"} [${i.group}] ${i.message}${i.file ? ` (${i.file})` : ""}`
|
|
450
502
|
);
|
|
451
503
|
}
|
|
452
504
|
console.log(
|
|
453
|
-
`\n${fails.length} fail, ${warns.length} warn${strict ? " (strict: warnings block)" : ""} — ${blocking === 0 ? "OK" : "BLOCKING"}`
|
|
505
|
+
`\n${fails.length} fail, ${warns.length} warn, ${infos.length} info (never blocking)${strict ? " (strict: warnings block)" : ""} — ${blocking === 0 ? "OK" : "BLOCKING"}`
|
|
454
506
|
);
|
|
455
507
|
}
|
|
456
508
|
|
|
@@ -188,7 +188,10 @@ const counts = all.reduce(
|
|
|
188
188
|
{}
|
|
189
189
|
);
|
|
190
190
|
console.log(
|
|
191
|
-
|
|
191
|
+
// INFO is listed so a finding this tool deliberately does not judge is still
|
|
192
|
+
// counted somewhere. Omitting it would make a reported finding invisible in
|
|
193
|
+
// the one line most readers stop at.
|
|
194
|
+
`verdict: ${verdict} (${["PASS", "INFO", "WARN", "FAIL", "SKIP"].map(s => `${counts[s] ?? 0} ${s}`).join(", ")})`
|
|
192
195
|
);
|
|
193
196
|
console.log(`report → ${path.relative(process.cwd(), outPath)}`);
|
|
194
197
|
console.log(
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Read-only: it reports findings, it never modifies the wiki. Default mode is
|
|
6
6
|
* "warning" (exit 1 only on FAIL items); `--strict` (hard-enforcement) also fails
|
|
7
|
-
* on WARN items.
|
|
7
|
+
* on WARN items. INFO items are reported and block in NEITHER mode — that is
|
|
8
|
+
* the level for a finding whose only available remedies would damage the wiki,
|
|
9
|
+
* such as an unresolved path cited by a preserved source note.
|
|
8
10
|
*
|
|
9
11
|
* Usage: node lint-wiki.mjs [--wiki <wikiRoot>] [--config <path>] [--strict] [--json]
|
|
10
12
|
* Exit 0 = clean (for the active mode), 1 = blocking findings.
|
|
@@ -303,14 +305,41 @@ const linkResolution = (f, target) => {
|
|
|
303
305
|
];
|
|
304
306
|
return { primary, hit: cands.find(exists) };
|
|
305
307
|
};
|
|
308
|
+
// A path inside `sources/` is PRESERVED material, not authored navigation.
|
|
309
|
+
// The contract (`Required Provenance`) says a source note records "what was
|
|
310
|
+
// ingested, when, from where, and with what scope" — so a path it names is a
|
|
311
|
+
// statement about the subject AT INGESTION TIME, and the subject moves on.
|
|
312
|
+
// `wiki/sources/repository/2026-05-14-monorepo-baseline.md` cites
|
|
313
|
+
// `docs/lisa-architecture.svg`, which existed on that date and was deleted
|
|
314
|
+
// three months later by the commit that made the wiki the documentation home.
|
|
315
|
+
// The citation is not broken; it is accurate about a repository that changed.
|
|
316
|
+
//
|
|
317
|
+
// Neither remedy available to a reader is legitimate. Repointing the link
|
|
318
|
+
// falsifies the record, and deleting it destroys the provenance the note
|
|
319
|
+
// exists to carry — so this cannot be reported at a level that blocks, or the
|
|
320
|
+
// only way to a green check is to damage the evidence. It is reported at INFO:
|
|
321
|
+
// visible in every run and in `--json`, blocking in none, `--strict` included.
|
|
322
|
+
// Authored pages are untouched and a broken link there still FAILs.
|
|
323
|
+
const preservedFinding = (id, message, f) =>
|
|
324
|
+
report.add(
|
|
325
|
+
"links",
|
|
326
|
+
`source-${id}`,
|
|
327
|
+
"INFO",
|
|
328
|
+
`${message} (preserved)`,
|
|
329
|
+
wrel(f)
|
|
330
|
+
);
|
|
306
331
|
const linkedTo = new Set();
|
|
307
332
|
for (const f of allMd) {
|
|
308
333
|
const text = fs.readFileSync(f, "utf8");
|
|
334
|
+
const preserved = isSourceNote(f);
|
|
309
335
|
for (const target of extractMarkdownLinks(text)) {
|
|
310
336
|
const { primary, hit } = linkResolution(f, target);
|
|
311
337
|
if (target.endsWith(".md") || primary.endsWith(".md")) {
|
|
312
338
|
linkedTo.add(hit ?? primary);
|
|
313
|
-
if (
|
|
339
|
+
if (hit) continue;
|
|
340
|
+
if (preserved) {
|
|
341
|
+
preservedFinding("citation", `cited page not present → ${target}`, f);
|
|
342
|
+
} else {
|
|
314
343
|
report.add(
|
|
315
344
|
"links",
|
|
316
345
|
"broken",
|
|
@@ -320,13 +349,21 @@ for (const f of allMd) {
|
|
|
320
349
|
);
|
|
321
350
|
}
|
|
322
351
|
} else if (!hit) {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
352
|
+
if (preserved) {
|
|
353
|
+
preservedFinding(
|
|
354
|
+
"citation-asset",
|
|
355
|
+
`cited path not present → ${target}`,
|
|
356
|
+
f
|
|
357
|
+
);
|
|
358
|
+
} else {
|
|
359
|
+
report.add(
|
|
360
|
+
"links",
|
|
361
|
+
"broken-asset",
|
|
362
|
+
"WARN",
|
|
363
|
+
`link to missing path → ${target}`,
|
|
364
|
+
wrel(f)
|
|
365
|
+
);
|
|
366
|
+
}
|
|
330
367
|
}
|
|
331
368
|
}
|
|
332
369
|
for (const cite of extractCitations(text)) {
|
|
@@ -335,7 +372,14 @@ for (const f of allMd) {
|
|
|
335
372
|
path.resolve(wikiRoot, "..", cite),
|
|
336
373
|
path.resolve(path.dirname(f), cite),
|
|
337
374
|
];
|
|
338
|
-
if (
|
|
375
|
+
if (candidates.some(exists)) continue;
|
|
376
|
+
if (preserved) {
|
|
377
|
+
preservedFinding(
|
|
378
|
+
"citation-path",
|
|
379
|
+
`citation path not present → ${cite}`,
|
|
380
|
+
f
|
|
381
|
+
);
|
|
382
|
+
} else {
|
|
339
383
|
report.add(
|
|
340
384
|
"links",
|
|
341
385
|
"citation-unresolved",
|
|
@@ -427,6 +471,12 @@ for (const f of allFiles) {
|
|
|
427
471
|
// --- output + verdict -----------------------------------------------------
|
|
428
472
|
const fails = report.items.filter(i => i.status === "FAIL");
|
|
429
473
|
const warns = report.items.filter(i => i.status === "WARN");
|
|
474
|
+
// INFO is reported and never counted. It is the level for a finding a reader
|
|
475
|
+
// is not permitted to fix — see the preserved-source note above. Deliberately
|
|
476
|
+
// excluded from `blocking` in BOTH modes, because `--strict` is what the
|
|
477
|
+
// shipped CI workflow runs and a level that blocks under strict is a blocking
|
|
478
|
+
// level with extra steps.
|
|
479
|
+
const infos = report.items.filter(i => i.status === "INFO");
|
|
430
480
|
const blocking = strict ? fails.length + warns.length : fails.length;
|
|
431
481
|
|
|
432
482
|
if (asJson) {
|
|
@@ -437,6 +487,7 @@ if (asJson) {
|
|
|
437
487
|
strict,
|
|
438
488
|
fails: fails.length,
|
|
439
489
|
warns: warns.length,
|
|
490
|
+
infos: infos.length,
|
|
440
491
|
items: report.items.filter(i => i.status !== "PASS"),
|
|
441
492
|
},
|
|
442
493
|
null,
|
|
@@ -444,13 +495,14 @@ if (asJson) {
|
|
|
444
495
|
)
|
|
445
496
|
);
|
|
446
497
|
} else {
|
|
498
|
+
const marker = { FAIL: "✗", INFO: "ℹ" };
|
|
447
499
|
for (const i of report.items.filter(i => i.status !== "PASS")) {
|
|
448
500
|
console.log(
|
|
449
|
-
`${i.status
|
|
501
|
+
`${marker[i.status] ?? "⚠"} [${i.group}] ${i.message}${i.file ? ` (${i.file})` : ""}`
|
|
450
502
|
);
|
|
451
503
|
}
|
|
452
504
|
console.log(
|
|
453
|
-
`\n${fails.length} fail, ${warns.length} warn${strict ? " (strict: warnings block)" : ""} — ${blocking === 0 ? "OK" : "BLOCKING"}`
|
|
505
|
+
`\n${fails.length} fail, ${warns.length} warn, ${infos.length} info (never blocking)${strict ? " (strict: warnings block)" : ""} — ${blocking === 0 ? "OK" : "BLOCKING"}`
|
|
454
506
|
);
|
|
455
507
|
}
|
|
456
508
|
|
|
@@ -188,7 +188,10 @@ const counts = all.reduce(
|
|
|
188
188
|
{}
|
|
189
189
|
);
|
|
190
190
|
console.log(
|
|
191
|
-
|
|
191
|
+
// INFO is listed so a finding this tool deliberately does not judge is still
|
|
192
|
+
// counted somewhere. Omitting it would make a reported finding invisible in
|
|
193
|
+
// the one line most readers stop at.
|
|
194
|
+
`verdict: ${verdict} (${["PASS", "INFO", "WARN", "FAIL", "SKIP"].map(s => `${counts[s] ?? 0} ${s}`).join(", ")})`
|
|
192
195
|
);
|
|
193
196
|
console.log(`report → ${path.relative(process.cwd(), outPath)}`);
|
|
194
197
|
console.log(
|