@codyswann/lisa 3.69.5 → 3.70.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/all/copy-overwrite/scripts/lisa-gates.mjs +365 -45
- package/all/create-only/.github/workflows/continuous-gates.yml +74 -0
- package/cdk/create-only/.github/workflows/deploy.yml +41 -1
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +10 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +20 -12
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/expo/copy-overwrite/scripts/bdd/contract.mjs +41 -2
- package/expo/copy-overwrite/scripts/bdd/envelope.mjs +18 -68
- package/expo/copy-overwrite/scripts/check-bdd-coverage.mjs +135 -206
- package/expo/create-only/.github/workflows/deploy.yml +42 -1
- package/expo/create-only/bdd/coverage-map.json +1 -7
- package/harper-fabric/create-only/.github/workflows/deploy.yml +37 -0
- package/nestjs/create-only/.github/workflows/deploy.yml +44 -1
- package/package.json +1 -1
- 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-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/rails/create-only/.github/workflows/deploy.yml +41 -0
- package/scripts/check-learnings-budget.ts +93 -18
- package/typescript/github-rulesets/quality-checks.json +4 -0
|
@@ -78,8 +78,47 @@ export const TRACKER_KEY_PATTERN = /^([A-Z][A-Z0-9]{1,9})-(\d+)$/;
|
|
|
78
78
|
/** Repo-issue style tracker tag. Group 1 is an optional repo slug. */
|
|
79
79
|
export const TRACKER_GH_PATTERN = /^gh-(?:([a-z0-9]+(?:-[a-z0-9]+)*)-)?(\d+)$/;
|
|
80
80
|
|
|
81
|
-
/**
|
|
82
|
-
|
|
81
|
+
/**
|
|
82
|
+
* The three enforcement levels a project may declare this gate at.
|
|
83
|
+
*
|
|
84
|
+
* Restated here, and asserted equal to the registry's `LEVELS` by a unit test,
|
|
85
|
+
* so the prover can name the valid vocabulary in a refusal message without
|
|
86
|
+
* importing the registry — which lives in a different template directory and
|
|
87
|
+
* is not guaranteed to be installed beside this gate.
|
|
88
|
+
*/
|
|
89
|
+
export const GATE_LEVELS = ["required", "optional", "off"];
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Adoption vocabulary Lisa used to read, with what to say about each.
|
|
93
|
+
*
|
|
94
|
+
* The gate had its OWN adoption axis — a `BDD_MODE` workflow input mirrored by
|
|
95
|
+
* an `adoption` block in the coverage map — running alongside the gate registry
|
|
96
|
+
* that every other quality job answers to. Two controls for one question, and
|
|
97
|
+
* the losing one lost silently.
|
|
98
|
+
*
|
|
99
|
+
* `bootstrap` was the reason that axis looked necessary: a visible,
|
|
100
|
+
* non-blocking check with a named owner and a hard expiry, which is `optional`
|
|
101
|
+
* plus paperwork. A grace period does not belong in an adoption vocabulary at
|
|
102
|
+
* all — it hides red, which is the opposite of what adoption is for — so the
|
|
103
|
+
* state was removed and the axis with it.
|
|
104
|
+
*
|
|
105
|
+
* Distinguished from a merely unrecognised value because the gate *knows* what
|
|
106
|
+
* these were and can say something useful. An unrecognised value might be a
|
|
107
|
+
* typo; a retired one is not, and telling its author to check for a typo sends
|
|
108
|
+
* them looking for a mistake they did not make.
|
|
109
|
+
*/
|
|
110
|
+
export const RETIRED_ADOPTION_STATES = Object.freeze({
|
|
111
|
+
bootstrap:
|
|
112
|
+
"retired — a time-boxed grace period is `optional` carrying an owner and a " +
|
|
113
|
+
"date, and it hid red rather than showing it. Declare the gate at one of " +
|
|
114
|
+
`${GATE_LEVELS.join(", ")} instead.`,
|
|
115
|
+
"not-adopted":
|
|
116
|
+
"retired — absence of a declaration is no longer a state the gate carries. " +
|
|
117
|
+
`Declare the gate at one of ${GATE_LEVELS.join(", ")} instead.`,
|
|
118
|
+
enforced:
|
|
119
|
+
"retired — enforcement is what a declared gate does. Declare the gate at " +
|
|
120
|
+
`one of ${GATE_LEVELS.join(", ")} instead.`,
|
|
121
|
+
});
|
|
83
122
|
|
|
84
123
|
/**
|
|
85
124
|
* Classify a raw tag as a tracker reference, if it is one.
|
|
@@ -31,59 +31,6 @@ const ENVELOPE_MODULE_PATHS = Object.freeze([
|
|
|
31
31
|
"../../../all/copy-overwrite/scripts/lisa-command-envelope.mjs",
|
|
32
32
|
]);
|
|
33
33
|
|
|
34
|
-
/**
|
|
35
|
-
* Defect codes bootstrap is PERMITTED to downgrade to a warning.
|
|
36
|
-
*
|
|
37
|
-
* This is an allowlist and it is load-bearing: an unrecognized code — a new
|
|
38
|
-
* check, a typo, a future contributor's addition — is treated as FATAL. A
|
|
39
|
-
* denylist of "fatal codes" would fail OPEN on exactly the value nobody
|
|
40
|
-
* anticipated, which is how a gate quietly stops gating.
|
|
41
|
-
*
|
|
42
|
-
* Everything here is a contract-QUALITY defect: the manifest is legible and
|
|
43
|
-
* the adoption state is coherent, the contract just is not clean yet. Codes
|
|
44
|
-
* about adoption integrity itself (bootstrap-metadata, bootstrap-expired,
|
|
45
|
-
* adoption-drift, config-*, discovery-invalid) are deliberately absent, so
|
|
46
|
-
* they always fail: a malformed discovery block would silently switch off the
|
|
47
|
-
* only check that can see an undeclared test, exactly as a quoted coverage
|
|
48
|
-
* floor silently switches off the bar (`floor-invalid`, likewise absent).
|
|
49
|
-
*/
|
|
50
|
-
export const WARNABLE_DEFECT_CODES = Object.freeze([
|
|
51
|
-
"baseline",
|
|
52
|
-
"coverage-regression",
|
|
53
|
-
"discovery-missing",
|
|
54
|
-
"empty-contract",
|
|
55
|
-
"exclusion-metadata",
|
|
56
|
-
"exclusion-stale",
|
|
57
|
-
"execution-results",
|
|
58
|
-
"floor-missing",
|
|
59
|
-
"floor-regression",
|
|
60
|
-
"mapping-duplicate",
|
|
61
|
-
"mapping-evidence",
|
|
62
|
-
"mapping-file",
|
|
63
|
-
"mapping-orphan",
|
|
64
|
-
"mapping-platform",
|
|
65
|
-
"mapping-runner",
|
|
66
|
-
"obligation-uncovered",
|
|
67
|
-
"scenario-deleted",
|
|
68
|
-
"scenario-duplicate-id",
|
|
69
|
-
"scenario-id",
|
|
70
|
-
"scenario-lifecycle",
|
|
71
|
-
"scenario-platform",
|
|
72
|
-
"scenario-provenance",
|
|
73
|
-
"scenario-steps",
|
|
74
|
-
"spec-undisclosed",
|
|
75
|
-
"tracker-missing",
|
|
76
|
-
"tracker-orphan",
|
|
77
|
-
"waiver-duplicate",
|
|
78
|
-
"waiver-excluded",
|
|
79
|
-
"waiver-expired",
|
|
80
|
-
"waiver-masks-mapping",
|
|
81
|
-
"waiver-metadata",
|
|
82
|
-
"waiver-orphan",
|
|
83
|
-
"waiver-platform",
|
|
84
|
-
"waiver-runner",
|
|
85
|
-
]);
|
|
86
|
-
|
|
87
34
|
/**
|
|
88
35
|
* Envelope statuses that may exit 0.
|
|
89
36
|
*
|
|
@@ -128,19 +75,19 @@ export function subjectFor(item) {
|
|
|
128
75
|
}
|
|
129
76
|
|
|
130
77
|
/**
|
|
131
|
-
* Whether any defect must fail the run
|
|
78
|
+
* Whether any defect must fail the run.
|
|
132
79
|
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
* only
|
|
136
|
-
*
|
|
80
|
+
* Every defect does. There used to be a per-code severity split — an allowlist
|
|
81
|
+
* of 34 contract-quality codes that a `bootstrap` run graded `warning` and
|
|
82
|
+
* exited 0 on — and the split existed only to make that grace period possible.
|
|
83
|
+
* With the grace period gone the allowlist has nothing left to serve: a project
|
|
84
|
+
* that does not want this property enforced declares the gate `off`, which is a
|
|
85
|
+
* decision someone can read, rather than a green check that found 500 defects.
|
|
137
86
|
* @param {readonly object[]} defects - Defects found.
|
|
138
87
|
* @returns {boolean} True when the run must fail.
|
|
139
88
|
*/
|
|
140
|
-
export function hasFatalDefect(
|
|
141
|
-
|
|
142
|
-
if (adoptionState === "enforced") return true;
|
|
143
|
-
return defects.some(item => !WARNABLE_DEFECT_CODES.includes(item.code));
|
|
89
|
+
export function hasFatalDefect(defects) {
|
|
90
|
+
return defects.length > 0;
|
|
144
91
|
}
|
|
145
92
|
|
|
146
93
|
/**
|
|
@@ -187,23 +134,26 @@ export function contractVersion(contract) {
|
|
|
187
134
|
}
|
|
188
135
|
|
|
189
136
|
/**
|
|
190
|
-
* Counters describing the run
|
|
137
|
+
* Counters describing the run.
|
|
191
138
|
*
|
|
192
139
|
* The five facts stay separate here exactly as they do in the report: what is
|
|
193
140
|
* DECLARED, what is MAPPED (traceability), what RAN, what those runs
|
|
194
141
|
* RETURNED, and what is WAIVED. A reader comparing two runs must never have
|
|
195
142
|
* to infer which one a percentage refers to.
|
|
196
|
-
*
|
|
143
|
+
*
|
|
144
|
+
* There is no `findingsWarning` counter and no `adoptionState`. Both belonged
|
|
145
|
+
* to the retired adoption axis: severity was decided by it, and the state was
|
|
146
|
+
* the axis itself. A finding is a finding, and whether the property is governed
|
|
147
|
+
* at all is answered by the gate declaration, one layer out.
|
|
148
|
+
* @param {object} input - Report, defects, and files written.
|
|
197
149
|
* @returns {object} The envelope's `summary`.
|
|
198
150
|
*/
|
|
199
|
-
export function buildSummary({
|
|
151
|
+
export function buildSummary({ report, defects, filesWritten }) {
|
|
200
152
|
const counts = {
|
|
201
153
|
deleted: 0,
|
|
202
154
|
created: filesWritten,
|
|
203
155
|
preserved: 0,
|
|
204
|
-
|
|
205
|
-
findingsError: defects.filter(item => item.severity === "error").length,
|
|
206
|
-
findingsWarning: defects.filter(item => item.severity === "warning").length,
|
|
156
|
+
findings: defects.length,
|
|
207
157
|
};
|
|
208
158
|
if (!report) return counts;
|
|
209
159
|
return {
|