@codyswann/lisa 4.102.0 → 4.102.1
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/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +2 -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 +2 -1
- 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-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-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-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-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-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-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-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-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-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-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-openclaw-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.devin-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-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-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-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-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-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-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/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/typescript/copy-overwrite/scripts/check-skipped-required-checks.mjs +143 -15
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* node scripts/check-skipped-required-checks.mjs [rootDir] [--json]
|
|
16
16
|
* node scripts/check-skipped-required-checks.mjs --vacuity [--fail-on-vacuous]
|
|
17
17
|
* node scripts/check-skipped-required-checks.mjs --pr=1234 [--repo=OWNER/NAME]
|
|
18
|
-
* node scripts/check-skipped-required-checks.mjs --outcomes (reads LISA_JOB_RESULTS, LISA_JOB_NAMES, LISA_GATE_MOMENT)
|
|
18
|
+
* node scripts/check-skipped-required-checks.mjs --outcomes (reads LISA_JOB_RESULTS, LISA_JOB_NAMES, LISA_GATE_MOMENT, LISA_EVENT_NAME, LISA_PULL_REQUEST_ONLY_JOBS)
|
|
19
19
|
*
|
|
20
20
|
* `--outcomes` is the arm the `🔒 Skipped Required Checks` job rests its verdict
|
|
21
21
|
* on. Without it, this reports only the vestigial `skip_jobs` token arm, which
|
|
@@ -92,6 +92,14 @@
|
|
|
92
92
|
* prefix is reported NOT EXAMINED. See {@link owningPrefix}.
|
|
93
93
|
* - **Only at `pull-request`.** Other moments skip most jobs by design and gate
|
|
94
94
|
* no merge; see {@link MERGE_GATE_MOMENT}.
|
|
95
|
+
* - **Except a pull-request-only job on an event that gates no merge.** When
|
|
96
|
+
* `workflow_dispatch`, `push` or `schedule` started the run, a required
|
|
97
|
+
* context whose job is listed in `LISA_PULL_REQUEST_ONLY_JOBS` (its `if:`
|
|
98
|
+
* requires `github.event_name == 'pull_request'`) and concluded `skipped` is
|
|
99
|
+
* reported NOT JUDGED instead of refused. Every other skip, every other
|
|
100
|
+
* result, every other event, and a missing or unreadable `LISA_EVENT_NAME`
|
|
101
|
+
* or `LISA_PULL_REQUEST_ONLY_JOBS` is judged exactly as before; see
|
|
102
|
+
* {@link pullRequestOnlyExemption} (#4620).
|
|
95
103
|
* - **Only what this run posts.** An external app, another workflow, or a
|
|
96
104
|
* matrix leg named at runtime posts a context no job here can speak for. It
|
|
97
105
|
* is listed as NOT EXAMINED, never silently counted — GitHub records that
|
|
@@ -100,14 +108,19 @@
|
|
|
100
108
|
* untranscribed snapshot, or results that cannot be read each fail. "Examined
|
|
101
109
|
* nothing" must never render like "found nothing" (see `OUTCOME_REFUSALS`).
|
|
102
110
|
*
|
|
103
|
-
* The job
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
+
* The job never runs the caller's `scripts/` copy. Where the repository ships
|
|
112
|
+
* this prover at its template path (Lisa itself), it runs that workspace copy,
|
|
113
|
+
* so a change here is proved by the pull request that makes it. Everywhere
|
|
114
|
+
* else it checks the prover out from Lisa's `main`. `quality.yml` is consumed
|
|
115
|
+
* at `@main`; `scripts/` arrives by `lisa apply` at whatever version the caller
|
|
116
|
+
* pinned, and a caller's copy predating this arm ignores `--outcomes` and
|
|
117
|
+
* prints the vestigial token line as though it were a verdict — the false green
|
|
118
|
+
* this arm replaces. Pinning the checkout to the workflow's own commit is not
|
|
119
|
+
* possible: GitHub rejects the whole workflow file when it references the
|
|
120
|
+
* `job.workflow_*` context fields — see Note 17 in
|
|
121
|
+
* `docs/quality-workflow-notes.md`. Because hosts run `main`'s prover whatever
|
|
122
|
+
* `quality.yml` ref they call, every new input this prover reads must be
|
|
123
|
+
* optional and fail closed when absent.
|
|
111
124
|
*
|
|
112
125
|
* ## Where this runs
|
|
113
126
|
*
|
|
@@ -5120,13 +5133,64 @@ export const OUTCOMES_FLAG = "--outcomes";
|
|
|
5120
5133
|
* - `results` — `toJSON(needs)`: each sibling job's final `result`.
|
|
5121
5134
|
* - `names` — job id → the display name GitHub composes into the context.
|
|
5122
5135
|
* - `moment` — the workflow's `moment` input.
|
|
5136
|
+
* - `event` — `github.event_name`, the event that started the run.
|
|
5137
|
+
* - `pullRequestOnly` — JSON array of the job ids whose `if:` requires
|
|
5138
|
+
* `github.event_name == 'pull_request'`. See {@link pullRequestOnlyExemption}.
|
|
5123
5139
|
*/
|
|
5124
5140
|
export const OUTCOME_ENV = Object.freeze({
|
|
5125
5141
|
results: "LISA_JOB_RESULTS",
|
|
5126
5142
|
names: "LISA_JOB_NAMES",
|
|
5127
5143
|
moment: "LISA_GATE_MOMENT",
|
|
5144
|
+
event: "LISA_EVENT_NAME",
|
|
5145
|
+
pullRequestOnly: "LISA_PULL_REQUEST_ONLY_JOBS",
|
|
5128
5146
|
});
|
|
5129
5147
|
|
|
5148
|
+
/**
|
|
5149
|
+
* Events whose run can gate no merge, so a pull-request-only job's skip there
|
|
5150
|
+
* proves nothing either way (#4620).
|
|
5151
|
+
*
|
|
5152
|
+
* A caller such as `ci.yml` runs on `pull_request` AND `workflow_dispatch`
|
|
5153
|
+
* without passing a `moment`, so a manual run is judged at `pull-request` — and
|
|
5154
|
+
* the jobs whose own `if:` admits only `pull_request` skip by construction. A
|
|
5155
|
+
* guard that reddens every manual run over that gets ignored, and this guard is
|
|
5156
|
+
* what stops a merge on a required check that never ran.
|
|
5157
|
+
*
|
|
5158
|
+
* Deliberately a closed list. `pull_request_target` and `merge_group` CAN gate a
|
|
5159
|
+
* merge, and an event this list does not know is judged exactly as before.
|
|
5160
|
+
*/
|
|
5161
|
+
export const NON_MERGE_EVENTS = Object.freeze([
|
|
5162
|
+
"workflow_dispatch",
|
|
5163
|
+
"push",
|
|
5164
|
+
"schedule",
|
|
5165
|
+
]);
|
|
5166
|
+
|
|
5167
|
+
/**
|
|
5168
|
+
* Which skipped jobs this run may excuse, or null to judge every skip.
|
|
5169
|
+
*
|
|
5170
|
+
* FAIL-CLOSED on every input it cannot read: an event outside
|
|
5171
|
+
* {@link NON_MERGE_EVENTS}, an absent or empty event, or a pull-request-only
|
|
5172
|
+
* list that is absent, not JSON, or not an array of job ids all return null, so
|
|
5173
|
+
* the run is judged exactly as before. That keeps a caller on an older
|
|
5174
|
+
* `quality.yml` — which sets neither variable — safe while hosts run `main`'s
|
|
5175
|
+
* prover.
|
|
5176
|
+
*
|
|
5177
|
+
* @param {Record<string, string|undefined>} env - Environment
|
|
5178
|
+
* @returns {{event: string, jobs: ReadonlyArray<string>}|null} The excusable jobs and the event that excuses them
|
|
5179
|
+
*/
|
|
5180
|
+
export function pullRequestOnlyExemption(env) {
|
|
5181
|
+
const event = String(env[OUTCOME_ENV.event] ?? "").trim();
|
|
5182
|
+
if (!NON_MERGE_EVENTS.includes(event)) return null;
|
|
5183
|
+
let jobs;
|
|
5184
|
+
try {
|
|
5185
|
+
jobs = JSON.parse(String(env[OUTCOME_ENV.pullRequestOnly] ?? ""));
|
|
5186
|
+
} catch {
|
|
5187
|
+
return null;
|
|
5188
|
+
}
|
|
5189
|
+
const readable =
|
|
5190
|
+
Array.isArray(jobs) && jobs.every(job => typeof job === "string");
|
|
5191
|
+
return readable ? { event, jobs } : null;
|
|
5192
|
+
}
|
|
5193
|
+
|
|
5130
5194
|
/**
|
|
5131
5195
|
* The one moment whose run is the merge gate a ruleset's required checks read.
|
|
5132
5196
|
*
|
|
@@ -5263,9 +5327,15 @@ export function owningPrefix(declaration, matches) {
|
|
|
5263
5327
|
* @param {object} declaration - The per-repo declaration
|
|
5264
5328
|
* @param {Record<string, {result?: string}>} results - `toJSON(needs)`, parsed
|
|
5265
5329
|
* @param {Record<string, string>} names - Job id → display name
|
|
5266
|
-
* @
|
|
5330
|
+
* @param {{event: string, jobs: ReadonlyArray<string>}|null} [exemption] - Pull-request-only jobs whose skip this run's event excuses; see {@link pullRequestOnlyExemption}
|
|
5331
|
+
* @returns {{examined: {context: string, job: string, result: string}[], notExamined: string[], notJudged: {context: string, job: string, result: string, reason: string}[], violations: object[], prefix: {prefix: string|null, source: string}}} What was judged, what could not be seen, what was excused, the findings, and whose contexts it judged
|
|
5267
5332
|
*/
|
|
5268
|
-
export function evaluateRequiredOutcomes(
|
|
5333
|
+
export function evaluateRequiredOutcomes(
|
|
5334
|
+
declaration,
|
|
5335
|
+
results,
|
|
5336
|
+
names,
|
|
5337
|
+
exemption = null
|
|
5338
|
+
) {
|
|
5269
5339
|
const required = Array.isArray(declaration.required_contexts)
|
|
5270
5340
|
? declaration.required_contexts
|
|
5271
5341
|
: [];
|
|
@@ -5288,6 +5358,7 @@ export function evaluateRequiredOutcomes(declaration, results, names) {
|
|
|
5288
5358
|
|
|
5289
5359
|
const examined = [];
|
|
5290
5360
|
const notExamined = [];
|
|
5361
|
+
const notJudged = [];
|
|
5291
5362
|
const violations = [];
|
|
5292
5363
|
for (const context of required) {
|
|
5293
5364
|
const jobs = owned.get(context) ?? [];
|
|
@@ -5306,10 +5377,39 @@ export function evaluateRequiredOutcomes(declaration, results, names) {
|
|
|
5306
5377
|
}
|
|
5307
5378
|
const [job] = jobs;
|
|
5308
5379
|
const result = String(results[job]?.result ?? "");
|
|
5380
|
+
const excused = excusedSkip(context, job, result, exemption);
|
|
5381
|
+
if (excused !== null) {
|
|
5382
|
+
notJudged.push(excused);
|
|
5383
|
+
continue;
|
|
5384
|
+
}
|
|
5309
5385
|
examined.push({ context, job, result });
|
|
5310
5386
|
violations.push(...outcomeViolations(context, job, result));
|
|
5311
5387
|
}
|
|
5312
|
-
return { examined, notExamined, violations, prefix };
|
|
5388
|
+
return { examined, notExamined, notJudged, violations, prefix };
|
|
5389
|
+
}
|
|
5390
|
+
|
|
5391
|
+
/**
|
|
5392
|
+
* The not-judged entry for a skip this run's event excuses, or null.
|
|
5393
|
+
*
|
|
5394
|
+
* Only `skipped`, and only for a job the workflow declares pull-request-only:
|
|
5395
|
+
* a `failure`, a `cancelled` or an unreadable result is judged as ever, and so
|
|
5396
|
+
* is every other job's skip.
|
|
5397
|
+
*
|
|
5398
|
+
* @param {string} context - Required context
|
|
5399
|
+
* @param {string} job - The job that posts it
|
|
5400
|
+
* @param {string} result - That job's result in this run
|
|
5401
|
+
* @param {{event: string, jobs: ReadonlyArray<string>}|null} exemption - See {@link pullRequestOnlyExemption}
|
|
5402
|
+
* @returns {{context: string, job: string, result: string, reason: string}|null} The excused entry
|
|
5403
|
+
*/
|
|
5404
|
+
function excusedSkip(context, job, result, exemption) {
|
|
5405
|
+
if (exemption === null || result !== "skipped") return null;
|
|
5406
|
+
if (!exemption.jobs.includes(job)) return null;
|
|
5407
|
+
return {
|
|
5408
|
+
context,
|
|
5409
|
+
job,
|
|
5410
|
+
result,
|
|
5411
|
+
reason: `this run was started by \`${exemption.event}\`, which gates no merge, and the job runs only on pull requests`,
|
|
5412
|
+
};
|
|
5313
5413
|
}
|
|
5314
5414
|
|
|
5315
5415
|
/**
|
|
@@ -5382,7 +5482,7 @@ function readOutcomeEnv(env) {
|
|
|
5382
5482
|
* @param {ReadonlyArray<string>} argv - CLI arguments
|
|
5383
5483
|
* @param {object} declaration - The per-repo declaration
|
|
5384
5484
|
* @param {{env?: Record<string, string|undefined>, trust?: {trusted: boolean, reason: string}}} [options] - Environment and snapshot trust
|
|
5385
|
-
* @returns {{moment: string, applicable: boolean, examined: object[], notExamined: string[], violations: object[], refusal: {kind: string, reason: string}|null}|undefined} The inspection, or undefined when `--outcomes` was not passed
|
|
5485
|
+
* @returns {{moment: string, applicable: boolean, examined: object[], notExamined: string[], notJudged: object[], violations: object[], refusal: {kind: string, reason: string}|null}|undefined} The inspection, or undefined when `--outcomes` was not passed
|
|
5386
5486
|
*/
|
|
5387
5487
|
export function inspectOutcomes(argv, declaration, options = {}) {
|
|
5388
5488
|
if (!argv.includes(OUTCOMES_FLAG)) return undefined;
|
|
@@ -5393,6 +5493,7 @@ export function inspectOutcomes(argv, declaration, options = {}) {
|
|
|
5393
5493
|
applicable: true,
|
|
5394
5494
|
examined: [],
|
|
5395
5495
|
notExamined: [],
|
|
5496
|
+
notJudged: [],
|
|
5396
5497
|
violations: [],
|
|
5397
5498
|
refusal: null,
|
|
5398
5499
|
};
|
|
@@ -5424,10 +5525,13 @@ export function inspectOutcomes(argv, declaration, options = {}) {
|
|
|
5424
5525
|
const evaluated = evaluateRequiredOutcomes(
|
|
5425
5526
|
declaration,
|
|
5426
5527
|
read.results,
|
|
5427
|
-
read.names
|
|
5528
|
+
read.names,
|
|
5529
|
+
pullRequestOnlyExemption(env)
|
|
5428
5530
|
);
|
|
5531
|
+
// An excused context was matched and owned, so the snapshot is not the defect
|
|
5532
|
+
// this refusal exists for: it was seen and excused, not unseen.
|
|
5429
5533
|
const refusal =
|
|
5430
|
-
evaluated.examined.length > 0
|
|
5534
|
+
evaluated.examined.length + evaluated.notJudged.length > 0
|
|
5431
5535
|
? null
|
|
5432
5536
|
: {
|
|
5433
5537
|
kind: OUTCOME_REFUSALS.examinedNothing,
|
|
@@ -5930,9 +6034,33 @@ function appendOutcomeReport(lines, outcomes) {
|
|
|
5930
6034
|
}
|
|
5931
6035
|
appendOutcomeRefusal(lines, outcomes.refusal);
|
|
5932
6036
|
appendExaminedOutcomes(lines, outcomes);
|
|
6037
|
+
appendNotJudgedContexts(lines, outcomes.notJudged ?? []);
|
|
5933
6038
|
appendUnexaminedContexts(lines, outcomes.notExamined);
|
|
5934
6039
|
}
|
|
5935
6040
|
|
|
6041
|
+
/**
|
|
6042
|
+
* Appends the required contexts excused because their pull-request-only job
|
|
6043
|
+
* could not run on the event that started this run (#4620).
|
|
6044
|
+
*
|
|
6045
|
+
* Listed rather than dropped, so a reader sees what was set aside and why.
|
|
6046
|
+
*
|
|
6047
|
+
* @param {string[]} lines - Report lines
|
|
6048
|
+
* @param {ReadonlyArray<{context: string, job: string, result: string, reason: string}>} notJudged - Excused contexts
|
|
6049
|
+
* @returns {void}
|
|
6050
|
+
*/
|
|
6051
|
+
function appendNotJudgedContexts(lines, notJudged) {
|
|
6052
|
+
if (notJudged.length === 0) return;
|
|
6053
|
+
lines.push(
|
|
6054
|
+
`Not judged — ${notJudged.length} required context(s) whose job skipped on an event that gates no merge. Each one is still judged on every pull request run.`,
|
|
6055
|
+
"",
|
|
6056
|
+
...notJudged.map(
|
|
6057
|
+
({ context, job, result, reason }) =>
|
|
6058
|
+
`- \`${context}\` ← job \`${job}\`: \`${result}\` — ${reason}.`
|
|
6059
|
+
),
|
|
6060
|
+
""
|
|
6061
|
+
);
|
|
6062
|
+
}
|
|
6063
|
+
|
|
5936
6064
|
/**
|
|
5937
6065
|
* Appends and annotates an outcome inspection that judged nothing.
|
|
5938
6066
|
*
|