@codyswann/lisa 4.27.5 → 4.27.6
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/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +27 -4
- package/dist/cli/doctor-enforcement-coverage.d.ts +14 -0
- package/dist/cli/doctor-enforcement-coverage.d.ts.map +1 -0
- package/dist/cli/doctor-enforcement-coverage.js +103 -0
- package/dist/cli/doctor-enforcement-coverage.js.map +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +9 -0
- package/dist/cli/doctor.js.map +1 -1
- package/dist/core/enforcement-census-report.d.ts +19 -0
- package/dist/core/enforcement-census-report.d.ts.map +1 -0
- package/dist/core/enforcement-census-report.js +198 -0
- package/dist/core/enforcement-census-report.js.map +1 -0
- package/dist/core/enforcement-census.d.ts +177 -0
- package/dist/core/enforcement-census.d.ts.map +1 -0
- package/dist/core/enforcement-census.js +252 -0
- package/dist/core/enforcement-census.js.map +1 -0
- package/dist/core/enforcement-coverage.d.ts +168 -0
- package/dist/core/enforcement-coverage.d.ts.map +1 -0
- package/dist/core/enforcement-coverage.js +342 -0
- package/dist/core/enforcement-coverage.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +4 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- 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 +17 -3
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +4 -3
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-setup-automations/SKILL.md +23 -0
- package/plugins/lisa/skills/lisa-setup-automations/SKILL.md +23 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-setup-automations/SKILL.md +23 -0
- 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-copilot/skills/lisa-setup-automations/SKILL.md +23 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/skills/lisa-setup-automations/SKILL.md +23 -0
- 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-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/skills/lisa-setup-automations/SKILL.md +23 -0
- package/scripts/lisa-enforcement-census.mjs +168 -0
- package/scripts/lisa-enforcement-fallback.sh +27 -4
|
@@ -407,10 +407,33 @@ fi
|
|
|
407
407
|
# - `main` cut 80 releases in 24 hours, median gap 10 minutes. "Behind the
|
|
408
408
|
# newest Lisa on this disk" is the DEFAULT state of a checkout within
|
|
409
409
|
# minutes of being cut, through nothing anyone did wrong.
|
|
410
|
-
# -
|
|
411
|
-
#
|
|
412
|
-
#
|
|
413
|
-
#
|
|
410
|
+
# - Measured once across the host checkouts on one fleet: of those that
|
|
411
|
+
# resolved guards at all, every one was behind or undateable and none was
|
|
412
|
+
# current, several by a whole MAJOR — while a larger number resolved NO
|
|
413
|
+
# guard at all.
|
|
414
|
+
#
|
|
415
|
+
# That second reading used to be written here as a set of counts, and that was
|
|
416
|
+
# the wrong place for it. A number in a comment is a measurement, not a monitor:
|
|
417
|
+
# it was true on the day it was taken and nothing re-took it, so the drift after
|
|
418
|
+
# that date was unobserved — which is the same defect the number documents. The
|
|
419
|
+
# counts are therefore not restated here. Re-derive them:
|
|
420
|
+
#
|
|
421
|
+
# Run these FROM A LISA MONOREPO CHECKOUT — the census and the fleet roster are
|
|
422
|
+
# Lisa-monorepo artifacts, and this comment travels into host projects where
|
|
423
|
+
# neither exists. The script wrapper builds `dist/` first, which a fresh clone
|
|
424
|
+
# does not have:
|
|
425
|
+
#
|
|
426
|
+
# bun run lisa:enforcement-census # roster on this machine
|
|
427
|
+
# bun run lisa:enforcement-census -- --redact # safe to quote publicly
|
|
428
|
+
#
|
|
429
|
+
# In a host project the local half of the same question is `lisa doctor`, which
|
|
430
|
+
# reports what THIS checkout resolves and needs no roster.
|
|
431
|
+
#
|
|
432
|
+
# The census reports and never gates, and it keeps "resolves NO guard" apart
|
|
433
|
+
# from "resolves something old" — different failures, different remedies, and
|
|
434
|
+
# folding them is what made the unenforced checkouts easy to miss
|
|
435
|
+
# (CodySwannGT/lisa#3490). `lisa doctor` carries the same finding for the single
|
|
436
|
+
# checkout it is run in.
|
|
414
437
|
#
|
|
415
438
|
# So no distance threshold rescues it — even the strictest version predicate is
|
|
416
439
|
# permanently true across the fleet. The noise is the REPETITION, not the
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** One doctor check result, structurally identical to `DoctorCheck`. */
|
|
2
|
+
interface CoverageCheck {
|
|
3
|
+
name: string;
|
|
4
|
+
status: "ok" | "warn" | "fail";
|
|
5
|
+
detail: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Report what this checkout resolves.
|
|
9
|
+
* @param targetPath - Project path
|
|
10
|
+
* @returns The check result
|
|
11
|
+
*/
|
|
12
|
+
export declare function checkEnforcementCoverage(targetPath: string): Promise<CoverageCheck>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=doctor-enforcement-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-enforcement-coverage.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-enforcement-coverage.ts"],"names":[],"mappings":"AAsCA,wEAAwE;AACxE,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB;AAcD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC,CAsDxB"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor check: does THIS checkout resolve enforcement, and of what vintage?
|
|
3
|
+
*
|
|
4
|
+
* The dispatcher already answers this to an agent session, once per session.
|
|
5
|
+
* Nobody had asked it from outside a session, which is why nothing noticed that
|
|
6
|
+
* most checkouts in a fleet resolve nothing at all (CodySwannGT/lisa#3490).
|
|
7
|
+
* `lisa doctor` is where an operator asks a checkout what state it is in, so
|
|
8
|
+
* this is the local half of the census — the half a host project gets, since
|
|
9
|
+
* the fleet roster the fleet census reads exists only on the machine that
|
|
10
|
+
* manages the fleet.
|
|
11
|
+
*
|
|
12
|
+
* Three findings, kept apart on purpose:
|
|
13
|
+
*
|
|
14
|
+
* - **Resolves nothing.** Not a stale guard — no guard. An agent working here
|
|
15
|
+
* is checked by nothing and the session says nothing.
|
|
16
|
+
* - **Resolves something old, or undateable.** A stale copy still refuses
|
|
17
|
+
* things and names its vintage in every refusal, so it is the quieter half
|
|
18
|
+
* of the same question, not the same finding.
|
|
19
|
+
* - **Installed behind declared.** This one fails in the affirmative: the
|
|
20
|
+
* guards run, every check answers, and every answer is about a version
|
|
21
|
+
* nobody is using — which is how a reviewer diffed a branch against
|
|
22
|
+
* templates from a version majors behind the one being claimed, and got a
|
|
23
|
+
* confident wrong answer.
|
|
24
|
+
*
|
|
25
|
+
* Warn, never fail, for the same reason `doctor-apply-freshness` warns: the
|
|
26
|
+
* remedy is one command, a checkout mid-upgrade is legitimately in this state
|
|
27
|
+
* for a few minutes, and reddening the exit code trains operators to ignore it.
|
|
28
|
+
* @module cli/doctor-enforcement-coverage
|
|
29
|
+
*/
|
|
30
|
+
import { getPackageVersion } from "./version.js";
|
|
31
|
+
import { collectCheckoutCoverage } from "../core/enforcement-coverage.js";
|
|
32
|
+
import { isInstallBehindDeclared } from "../core/enforcement-census.js";
|
|
33
|
+
const CHECK_NAME = "Enforcement guards resolve in this checkout?";
|
|
34
|
+
const FLEET_HINT = "Run `node scripts/lisa-enforcement-census.mjs` from the Lisa monorepo to ask the same question of every checkout on the fleet roster.";
|
|
35
|
+
const REPAIR = "npx @codyswann/lisa apply";
|
|
36
|
+
/**
|
|
37
|
+
* Read this build's own version without throwing when metadata is unreadable.
|
|
38
|
+
* @returns The version, or null when it cannot be determined
|
|
39
|
+
*/
|
|
40
|
+
function referenceVersion() {
|
|
41
|
+
try {
|
|
42
|
+
return getPackageVersion();
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Report what this checkout resolves.
|
|
50
|
+
* @param targetPath - Project path
|
|
51
|
+
* @returns The check result
|
|
52
|
+
*/
|
|
53
|
+
export async function checkEnforcementCoverage(targetPath) {
|
|
54
|
+
const coverage = await collectCheckoutCoverage({
|
|
55
|
+
label: targetPath,
|
|
56
|
+
checkoutPath: targetPath,
|
|
57
|
+
reference: referenceVersion(),
|
|
58
|
+
});
|
|
59
|
+
if (coverage.resolution === "unreadable") {
|
|
60
|
+
return {
|
|
61
|
+
name: CHECK_NAME,
|
|
62
|
+
status: "warn",
|
|
63
|
+
detail: `Could not look: ${coverage.unreadableReason ?? "unknown"}. That is not the same as being unprotected, and it is not the same as being covered.`,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (coverage.resolution === "none") {
|
|
67
|
+
return {
|
|
68
|
+
name: CHECK_NAME,
|
|
69
|
+
status: "warn",
|
|
70
|
+
detail: `This checkout resolves NO Lisa enforcement guard. Not a stale guard — none. A tool call here is checked by nothing, and nothing in the session says so. Searched scripts/lisa-hooks/ and plugins/lisa/hooks/. Repair: \`${REPAIR}\`. ${FLEET_HINT}`,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
const notes = [
|
|
74
|
+
coverage.resolution === "partial"
|
|
75
|
+
? `only ${coverage.guards.length - coverage.unresolvedGuards.length} of ${coverage.guards.length} guards resolve (missing: ${coverage.unresolvedGuards.join(", ")})`
|
|
76
|
+
: null,
|
|
77
|
+
coverage.vintage === "undateable"
|
|
78
|
+
? "the copy in force carries no Lisa manifest beside it, so it cannot be shown current"
|
|
79
|
+
: null,
|
|
80
|
+
coverage.vintage === "behind"
|
|
81
|
+
? `the copy in force is lisa ${coverage.governing?.version ?? "?"}, behind ${referenceVersion() ?? "the newest known"}`
|
|
82
|
+
: null,
|
|
83
|
+
coverage.receipt.present
|
|
84
|
+
? null
|
|
85
|
+
: "no apply receipt records a completed `lisa apply` here",
|
|
86
|
+
isInstallBehindDeclared(coverage)
|
|
87
|
+
? `installed @codyswann/lisa is ${coverage.install.installed ?? "?"} while this project declares ${coverage.install.declared ?? "?"} — every answer read out of node_modules is about a version nobody is running`
|
|
88
|
+
: null,
|
|
89
|
+
].filter((note) => note !== null);
|
|
90
|
+
if (notes.length === 0) {
|
|
91
|
+
return {
|
|
92
|
+
name: CHECK_NAME,
|
|
93
|
+
status: "ok",
|
|
94
|
+
detail: `All ${coverage.guards.length} guards resolve from ${coverage.governing?.tree === "host" ? "scripts/lisa-hooks/" : "plugins/lisa/hooks/"} at lisa ${coverage.governing?.version ?? "?"}, with an apply receipt.`,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
name: CHECK_NAME,
|
|
99
|
+
status: "warn",
|
|
100
|
+
detail: `${notes.join("; ")}. Repair: \`${REPAIR}\`. ${FLEET_HINT}`,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=doctor-enforcement-coverage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-enforcement-coverage.js","sourceRoot":"","sources":["../../src/cli/doctor-enforcement-coverage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,MAAM,UAAU,GAAG,8CAA8C,CAAC;AAClE,MAAM,UAAU,GACd,uIAAuI,CAAC;AAC1I,MAAM,MAAM,GAAG,2BAA2B,CAAC;AAS3C;;;GAGG;AACH,SAAS,gBAAgB;IACvB,IAAI,CAAC;QACH,OAAO,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,UAAkB;IAElB,MAAM,QAAQ,GAAG,MAAM,uBAAuB,CAAC;QAC7C,KAAK,EAAE,UAAU;QACjB,YAAY,EAAE,UAAU;QACxB,SAAS,EAAE,gBAAgB,EAAE;KAC9B,CAAC,CAAC;IAEH,IAAI,QAAQ,CAAC,UAAU,KAAK,YAAY,EAAE,CAAC;QACzC,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,MAAM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AAK,CAAC,EAAE,CAAC;QACvB,OAAO;YACL,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,OAAO,QAAQ,CAAC,MAAM,CAAC,MAAM,wBAAwB,QAAQ,CAAC,SAAS,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,YAAY,QAAQ,CAAC,SAAS,EAAE,OAAO,IAAI,GAAG,0BAA0B;SACzN,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,MAAM,OAAO,UAAU,EAAE;KACpE,CAAC;AACJ,CAAC"}
|
package/dist/cli/doctor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAuBnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAWzD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,mDAAmD;AACnD,KAAK,YAAY,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAO3C,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,sCAAsC;AACtC,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,wCAAwC;AACxC,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wCAAwC;AACxC,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,OAAO,KAAK,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,kBAAkB,EAAE,OAAO,kBAAkB,CAAC;IAC9C,mBAAmB,EAAE,OAAO,mBAAmB,CAAC;CACjD;AAwBD;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,EAChD,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,WAAW,CAAC,CAyBtB;AA8JD;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,EAAE,aAAa,EACtB,YAAY,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC7C,OAAO,CAAC,YAAY,CAAC,CA4HvB"}
|
package/dist/cli/doctor.js
CHANGED
|
@@ -7,6 +7,7 @@ import { migrateInstructionFiles } from "../core/instruction-files-migration.js"
|
|
|
7
7
|
import { probeKaneReadiness } from "../core/kane-cli.js";
|
|
8
8
|
import { probeSonarReadiness } from "../core/sonar-integration.js";
|
|
9
9
|
import { checkApplyFreshness, checkYamlRuntime, } from "./doctor-apply-freshness.js";
|
|
10
|
+
import { checkEnforcementCoverage } from "./doctor-enforcement-coverage.js";
|
|
10
11
|
import { checkLockfileReconciliation } from "./doctor-reconciliation.js";
|
|
11
12
|
import { checkKaneProvider } from "./doctor-kane.js";
|
|
12
13
|
import { checkLearningsLedger } from "./doctor-learnings-ledger.js";
|
|
@@ -247,6 +248,14 @@ export async function runDoctor(targetPath, options, dependencies = {}) {
|
|
|
247
248
|
// consumers it never did, and the only symptom was a frozen-lockfile
|
|
248
249
|
// failure in CI hours later (CodySwannGT/lisa#2750).
|
|
249
250
|
await checkLockfileReconciliation(resolvedTarget),
|
|
251
|
+
// Third in the same run of questions, and the one nothing was asking. The
|
|
252
|
+
// two above ask whether apply ran and whether its lockfile repair landed;
|
|
253
|
+
// this asks whether the guards that apply writes actually RESOLVE here, and
|
|
254
|
+
// of what vintage. A checkout resolving none of them produces no output at
|
|
255
|
+
// all from inside a session, so "protected by an old policy" and "not
|
|
256
|
+
// protected" are indistinguishable there — which is how most of a fleet
|
|
257
|
+
// came to resolve nothing without anyone noticing (CodySwannGT/lisa#3490).
|
|
258
|
+
await checkEnforcementCoverage(resolvedTarget),
|
|
250
259
|
checkYamlRuntime(),
|
|
251
260
|
await checkProjectConfig(resolvedTarget),
|
|
252
261
|
// Immediately after the config check, because it repairs the same file and
|
package/dist/cli/doctor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/cli/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,u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EAAuE;QACvE,yEAAyE;QACzE,gCAAgC;QAChC,qEAAqE;QACrE,4EAA4E;QAC5E,MAAM,0BAA0B,CAAC,cAAc,CAAC;QAChD,oEAAoE;QACpE,2EAA2E;QAC3E,yEAAyE;QACzE,wCAAwC;QACxC,MAAM,mBAAmB,CAAC,cAAc,CAAC;QACzC,MAAM,oBAAoB,CAAC,cAAc,CAAC;QAC1C,wEAAwE;QACxE,2EAA2E;QAC3E,yEAAyE;QACzE,uEAAuE;QACvE,MAAM,uBAAuB,CAAC,cAAc,CAAC;QAC7C,MAAM,kBAAkB,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,KAAK,IAAI,CAAC;QACxD,SAAS,CAAC,cAAc,CAAC;QACzB,GAAG,CAAC,OAAO,CAAC,SAAS,KAAK,IAAI;YAC5B,CAAC,CAAC,CAAC,MAAM,wBAAwB,CAAC,cAAc,CAAC,CAAC;YAClD,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,kBAAkB,CACrC,MAAM,EACN,cAAc,EACd,OAAO,EACP,IAAI,CAAC,KAAK,CACX,CAAC;IAEF,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,EAAE,CAAC;QAClD,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACtB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FleetCensus } from "./enforcement-census.js";
|
|
2
|
+
/**
|
|
3
|
+
* Replace every real path in a census with a stable anonymous label.
|
|
4
|
+
*
|
|
5
|
+
* The paths this census reads name real local checkouts, and they embed client
|
|
6
|
+
* and product names that must never reach a public issue, PR, or commit. The
|
|
7
|
+
* counts and the per-checkout rows survive redaction intact, so a fleet finding
|
|
8
|
+
* loses nothing by being quoted safely.
|
|
9
|
+
* @param census - A measured fleet
|
|
10
|
+
* @returns The same fleet with paths replaced by derived labels
|
|
11
|
+
*/
|
|
12
|
+
export declare function redactCensus(census: FleetCensus): FleetCensus;
|
|
13
|
+
/**
|
|
14
|
+
* Render the whole census for a terminal.
|
|
15
|
+
* @param census - A measured fleet
|
|
16
|
+
* @returns The report
|
|
17
|
+
*/
|
|
18
|
+
export declare function renderFleetCensusReport(census: FleetCensus): string;
|
|
19
|
+
//# sourceMappingURL=enforcement-census-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforcement-census-report.d.ts","sourceRoot":"","sources":["../../src/core/enforcement-census-report.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAiB3D;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CA6B7D;AAyJD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAgBnE"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { isInstallBehindDeclared, redactedLabel, } from "./enforcement-census.js";
|
|
2
|
+
/** Where a host tree lives inside a checkout. */
|
|
3
|
+
const HOST_TREE = "scripts/lisa-hooks";
|
|
4
|
+
/** Where the monorepo's own tree lives inside a checkout. */
|
|
5
|
+
const PLUGIN_TREE = "plugins/lisa/hooks";
|
|
6
|
+
/** What dates a host tree. */
|
|
7
|
+
const HOST_DATED_BY = ".lisa/apply-receipt.json";
|
|
8
|
+
/** What dates a plugin tree. */
|
|
9
|
+
const PLUGIN_DATED_BY = "plugins/lisa/.claude-plugin/plugin.json";
|
|
10
|
+
/** What a redacted field says instead of a real path. */
|
|
11
|
+
const REDACTED = "redacted";
|
|
12
|
+
/**
|
|
13
|
+
* Replace every real path in a census with a stable anonymous label.
|
|
14
|
+
*
|
|
15
|
+
* The paths this census reads name real local checkouts, and they embed client
|
|
16
|
+
* and product names that must never reach a public issue, PR, or commit. The
|
|
17
|
+
* counts and the per-checkout rows survive redaction intact, so a fleet finding
|
|
18
|
+
* loses nothing by being quoted safely.
|
|
19
|
+
* @param census - A measured fleet
|
|
20
|
+
* @returns The same fleet with paths replaced by derived labels
|
|
21
|
+
*/
|
|
22
|
+
export function redactCensus(census) {
|
|
23
|
+
const scrubTree = (tree, label) => ({
|
|
24
|
+
...tree,
|
|
25
|
+
root: `${label}/${tree.tree === "host" ? HOST_TREE : PLUGIN_TREE}`,
|
|
26
|
+
datedBy: `${label}/${tree.tree === "host" ? HOST_DATED_BY : PLUGIN_DATED_BY}`,
|
|
27
|
+
});
|
|
28
|
+
const scrub = (coverage) => {
|
|
29
|
+
const label = redactedLabel(coverage.checkoutPath);
|
|
30
|
+
return {
|
|
31
|
+
...coverage,
|
|
32
|
+
label,
|
|
33
|
+
checkoutPath: label,
|
|
34
|
+
guards: coverage.guards.map(guard => ({ ...guard, script: null })),
|
|
35
|
+
trees: coverage.trees.map(tree => scrubTree(tree, label)),
|
|
36
|
+
governing: coverage.governing === null
|
|
37
|
+
? null
|
|
38
|
+
: scrubTree(coverage.governing, label),
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
return {
|
|
42
|
+
...census,
|
|
43
|
+
rosterOrigin: REDACTED,
|
|
44
|
+
referenceSource: REDACTED,
|
|
45
|
+
checkouts: census.checkouts.map(scrub),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Describe which copy governs a checkout and how old it is.
|
|
50
|
+
* @param coverage - One record
|
|
51
|
+
* @param reference - Newest Lisa the run could point at
|
|
52
|
+
* @returns One operator-readable clause
|
|
53
|
+
*/
|
|
54
|
+
function describeGoverning(coverage, reference) {
|
|
55
|
+
const governing = coverage.governing;
|
|
56
|
+
if (governing === null)
|
|
57
|
+
return "no copy in force";
|
|
58
|
+
const where = governing.tree === "host" ? HOST_TREE : PLUGIN_TREE;
|
|
59
|
+
if (governing.version === null) {
|
|
60
|
+
return `governed by ${where} — vintage unknown, so it cannot be shown current`;
|
|
61
|
+
}
|
|
62
|
+
if (coverage.vintage === "behind") {
|
|
63
|
+
return `governed by ${where} — lisa ${governing.version}, behind ${reference ?? "the newest on this disk"}`;
|
|
64
|
+
}
|
|
65
|
+
return `governed by ${where} — lisa ${governing.version}`;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Say what a checkout has installed against what it declares.
|
|
69
|
+
* @param coverage - One record
|
|
70
|
+
* @returns One operator-readable clause
|
|
71
|
+
*/
|
|
72
|
+
function describeInstallDrift(coverage) {
|
|
73
|
+
return `installed ${coverage.install.installed ?? "?"}, declares ${coverage.install.declared ?? "?"}`;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* One row for a checkout that resolves at least one guard.
|
|
77
|
+
* @param coverage - One record
|
|
78
|
+
* @param reference - Newest Lisa the run could point at
|
|
79
|
+
* @returns The row
|
|
80
|
+
*/
|
|
81
|
+
function resolvingRow(coverage, reference) {
|
|
82
|
+
const parts = [
|
|
83
|
+
describeGoverning(coverage, reference),
|
|
84
|
+
coverage.receipt.present ? null : "no apply receipt",
|
|
85
|
+
coverage.resolution === "partial"
|
|
86
|
+
? `unresolved: ${coverage.unresolvedGuards.join(", ")}`
|
|
87
|
+
: null,
|
|
88
|
+
isInstallBehindDeclared(coverage) ? describeInstallDrift(coverage) : null,
|
|
89
|
+
].filter((part) => part !== null);
|
|
90
|
+
return ` - ${coverage.label} — ${parts.join("; ")}`;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Build the section for checkouts that resolve nothing.
|
|
94
|
+
*
|
|
95
|
+
* First in the report, and never merged into the stale section below it. These
|
|
96
|
+
* are not behind — they are unenforced, and the remedy is different.
|
|
97
|
+
* @param census - A measured fleet
|
|
98
|
+
* @returns The section
|
|
99
|
+
*/
|
|
100
|
+
function unguardedSection(census) {
|
|
101
|
+
const rows = census.checkouts
|
|
102
|
+
.filter(entry => entry.resolution === "none")
|
|
103
|
+
.map(entry => ` - ${entry.label}`);
|
|
104
|
+
return {
|
|
105
|
+
heading: `NOT ENFORCING — ${rows.length} of ${census.summary.total} resolve no guard at all`,
|
|
106
|
+
note: "An agent working in one of these is checked by nothing, and nothing in the session says so. Repair: run `npx @codyswann/lisa apply` in that checkout.",
|
|
107
|
+
rows,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Build the section for checkouts the census could not read.
|
|
112
|
+
* @param census - A measured fleet
|
|
113
|
+
* @returns The section
|
|
114
|
+
*/
|
|
115
|
+
function unreadableSection(census) {
|
|
116
|
+
const rows = census.checkouts
|
|
117
|
+
.filter(entry => entry.resolution === "unreadable")
|
|
118
|
+
.map(entry => ` - ${entry.label} — ${entry.unreadableReason ?? "unknown"}`);
|
|
119
|
+
return {
|
|
120
|
+
heading: `COULD NOT LOOK — ${rows.length} of ${census.summary.total}`,
|
|
121
|
+
note: "Not counted as covered and not counted as unenforced: the census does not know. Repair: fix the path on the roster, or remove it.",
|
|
122
|
+
rows,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Build the section for checkouts that resolve at least one guard.
|
|
127
|
+
* @param census - A measured fleet
|
|
128
|
+
* @returns The section
|
|
129
|
+
*/
|
|
130
|
+
function resolvingSection(census) {
|
|
131
|
+
const { summary } = census;
|
|
132
|
+
const rows = census.checkouts
|
|
133
|
+
.filter(entry => entry.resolution === "partial" || entry.resolution === "full")
|
|
134
|
+
.map(entry => resolvingRow(entry, census.reference));
|
|
135
|
+
return {
|
|
136
|
+
heading: `ENFORCING — ${summary.resolving} of ${summary.total} (${summary.partial} of them only partly)`,
|
|
137
|
+
note: `behind: ${summary.behind} · vintage unknown: ${summary.undateable} · current: ${summary.current} · no apply receipt: ${summary.withoutReceipt}`,
|
|
138
|
+
rows,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Build the section for checkouts whose installed Lisa is behind their own
|
|
143
|
+
* manifest.
|
|
144
|
+
*
|
|
145
|
+
* Its own section because it fails in the affirmative: these checkouts resolve
|
|
146
|
+
* guards, run them, and answer confidently about a version nobody is using.
|
|
147
|
+
* @param census - A measured fleet
|
|
148
|
+
* @returns The section
|
|
149
|
+
*/
|
|
150
|
+
function installDriftSection(census) {
|
|
151
|
+
const rows = census.checkouts
|
|
152
|
+
.filter(entry => isInstallBehindDeclared(entry))
|
|
153
|
+
.map(entry => ` - ${entry.label} — ${describeInstallDrift(entry)}`);
|
|
154
|
+
return {
|
|
155
|
+
heading: `INSTALLED BEHIND DECLARED — ${rows.length} of ${census.summary.total}`,
|
|
156
|
+
note: "These answer every question confidently about a Lisa version nobody is running. Repair: reinstall dependencies in that checkout.",
|
|
157
|
+
rows,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Render one section, or nothing when it is empty and uninteresting.
|
|
162
|
+
* @param section - The section
|
|
163
|
+
* @param always - Whether to print it even when empty
|
|
164
|
+
* @returns The rendered lines
|
|
165
|
+
*/
|
|
166
|
+
function renderSection(section, always) {
|
|
167
|
+
if (section.rows.length === 0 && !always)
|
|
168
|
+
return [];
|
|
169
|
+
return [
|
|
170
|
+
"",
|
|
171
|
+
section.heading,
|
|
172
|
+
` ${section.note}`,
|
|
173
|
+
...(section.rows.length === 0 ? [" (none)"] : section.rows),
|
|
174
|
+
];
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Render the whole census for a terminal.
|
|
178
|
+
* @param census - A measured fleet
|
|
179
|
+
* @returns The report
|
|
180
|
+
*/
|
|
181
|
+
export function renderFleetCensusReport(census) {
|
|
182
|
+
const { summary } = census;
|
|
183
|
+
const lines = [
|
|
184
|
+
`Lisa enforcement fleet census — ${census.measuredAt}`,
|
|
185
|
+
`Roster: ${census.rosterOrigin} (${summary.total} checkout${summary.total === 1 ? "" : "s"})`,
|
|
186
|
+
`Newest Lisa found: ${census.reference ?? "none"} (${census.referenceSource})`,
|
|
187
|
+
...renderSection(unguardedSection(census), true),
|
|
188
|
+
...renderSection(unreadableSection(census), true),
|
|
189
|
+
...renderSection(resolvingSection(census), true),
|
|
190
|
+
...renderSection(installDriftSection(census), false),
|
|
191
|
+
"",
|
|
192
|
+
`Covered — all six guards, a current copy, and an apply receipt: ${summary.covered} of ${summary.total}.`,
|
|
193
|
+
"This census reports and never gates: its exit status is 0 whatever it finds.",
|
|
194
|
+
"A checkout not on the roster was not measured, which is not the same as covered.",
|
|
195
|
+
];
|
|
196
|
+
return `${lines.join("\n")}\n`;
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=enforcement-census-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enforcement-census-report.js","sourceRoot":"","sources":["../../src/core/enforcement-census-report.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,uBAAuB,EACvB,aAAa,GACd,MAAM,yBAAyB,CAAC;AAEjC,iDAAiD;AACjD,MAAM,SAAS,GAAG,oBAAoB,CAAC;AACvC,6DAA6D;AAC7D,MAAM,WAAW,GAAG,oBAAoB,CAAC;AACzC,8BAA8B;AAC9B,MAAM,aAAa,GAAG,0BAA0B,CAAC;AACjD,gCAAgC;AAChC,MAAM,eAAe,GAAG,yCAAyC,CAAC;AAClE,yDAAyD;AACzD,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAC,MAAmB;IAC9C,MAAM,SAAS,GAAG,CAChB,IAAO,EACP,KAAa,EACV,EAAE,CAAC,CAAC;QACP,GAAG,IAAI;QACP,IAAI,EAAE,GAAG,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE;QAClE,OAAO,EAAE,GAAG,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,EAAE;KAC9E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