@codyswann/lisa 4.102.0 → 4.102.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.
Files changed (79) hide show
  1. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  2. package/dist/core/lisa-owned-hash-ledger.js +2 -0
  3. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  4. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  5. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  6. package/dist/core/upstream-evidence-manifest.js +19 -1
  7. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  8. package/package.json +4 -4
  9. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  10. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  11. package/plugins/lisa-agy/plugin.json +1 -1
  12. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  15. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  16. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  19. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  23. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  25. package/plugins/lisa-expo-agy/plugin.json +1 -1
  26. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  30. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  32. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  33. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  37. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  39. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  40. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  44. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  46. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  47. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  51. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  53. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  54. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  58. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  60. package/plugins/lisa-rails-agy/plugin.json +1 -1
  61. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  65. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  67. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  68. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  72. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  74. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  75. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  76. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  79. package/typescript/copy-overwrite/scripts/check-skipped-required-checks.mjs +143 -15
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.102.0",
3
+ "version": "4.102.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.102.0",
3
+ "version": "4.102.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.102.0",
3
+ "version": "4.102.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.102.0",
3
+ "version": "4.102.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "4.102.0",
3
+ "version": "4.102.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -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 checks this prover out from the WORKFLOW's own repository at the
104
- * workflow's own commit (`job.workflow_repository@job.workflow_sha`), never
105
- * from the caller's `scripts/`. `quality.yml` is consumed at `@main`; `scripts/`
106
- * arrives by `lisa apply` at whatever version the caller pinned. A caller's copy
107
- * predating this arm ignores `--outcomes` and prints the vestigial token line as
108
- * though it were a verdict — the false green this arm replaces. The workflow
109
- * defines the arguments, so the code reading them must come from the same
110
- * revision.
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
- * @returns {{examined: {context: string, job: string, result: string}[], notExamined: string[], violations: object[], prefix: {prefix: string|null, source: string}}} What was judged, what could not be seen, the findings, and whose contexts it judged
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(declaration, results, names) {
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
  *