@codyswann/lisa 8.3.0 → 8.4.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.
Files changed (183) hide show
  1. package/cdk/package-lisa/package.lisa.json +1 -1
  2. package/dist/cli/confined-project-read.d.ts +2 -1
  3. package/dist/cli/confined-project-read.d.ts.map +1 -1
  4. package/dist/cli/confined-project-read.js +22 -5
  5. package/dist/cli/confined-project-read.js.map +1 -1
  6. package/dist/cli/gh-cli.d.ts +2 -1
  7. package/dist/cli/gh-cli.d.ts.map +1 -1
  8. package/dist/cli/gh-cli.js +5 -3
  9. package/dist/cli/gh-cli.js.map +1 -1
  10. package/dist/cli/github-read-issue-cmd.d.ts +62 -0
  11. package/dist/cli/github-read-issue-cmd.d.ts.map +1 -0
  12. package/dist/cli/github-read-issue-cmd.js +121 -0
  13. package/dist/cli/github-read-issue-cmd.js.map +1 -0
  14. package/dist/cli/github-reader-relationships.d.ts +41 -0
  15. package/dist/cli/github-reader-relationships.d.ts.map +1 -0
  16. package/dist/cli/github-reader-relationships.js +218 -0
  17. package/dist/cli/github-reader-relationships.js.map +1 -0
  18. package/dist/cli/github-reader-target.d.ts +24 -0
  19. package/dist/cli/github-reader-target.d.ts.map +1 -0
  20. package/dist/cli/github-reader-target.js +95 -0
  21. package/dist/cli/github-reader-target.js.map +1 -0
  22. package/dist/cli/github-reader-wire.d.ts +72 -0
  23. package/dist/cli/github-reader-wire.d.ts.map +1 -0
  24. package/dist/cli/github-reader-wire.js +125 -0
  25. package/dist/cli/github-reader-wire.js.map +1 -0
  26. package/dist/cli/index.d.ts.map +1 -1
  27. package/dist/cli/index.js +2 -2
  28. package/dist/cli/index.js.map +1 -1
  29. package/dist/controls/commands/declaration-check.d.ts.map +1 -1
  30. package/dist/controls/commands/declaration-check.js +7 -4
  31. package/dist/controls/commands/declaration-check.js.map +1 -1
  32. package/dist/controls/commands/seed.d.ts +1 -9
  33. package/dist/controls/commands/seed.d.ts.map +1 -1
  34. package/dist/controls/commands/seed.js +72 -65
  35. package/dist/controls/commands/seed.js.map +1 -1
  36. package/dist/controls/configure-road.d.ts +2 -0
  37. package/dist/controls/configure-road.d.ts.map +1 -1
  38. package/dist/controls/configure-road.js +18 -14
  39. package/dist/controls/configure-road.js.map +1 -1
  40. package/dist/controls/register-evidence-rule.d.ts +2 -0
  41. package/dist/controls/register-evidence-rule.d.ts.map +1 -1
  42. package/dist/controls/register-evidence-rule.js +8 -7
  43. package/dist/controls/register-evidence-rule.js.map +1 -1
  44. package/dist/controls/register-rules.d.ts +2 -0
  45. package/dist/controls/register-rules.d.ts.map +1 -1
  46. package/dist/controls/register-rules.js.map +1 -1
  47. package/dist/controls/register-types.d.ts +2 -4
  48. package/dist/controls/register-types.d.ts.map +1 -1
  49. package/dist/controls/register-types.js.map +1 -1
  50. package/dist/controls/register.d.ts +2 -0
  51. package/dist/controls/register.d.ts.map +1 -1
  52. package/dist/controls/register.js +3 -1
  53. package/dist/controls/register.js.map +1 -1
  54. package/dist/controls/shipped-parts.d.ts +82 -0
  55. package/dist/controls/shipped-parts.d.ts.map +1 -0
  56. package/dist/controls/shipped-parts.js +216 -0
  57. package/dist/controls/shipped-parts.js.map +1 -0
  58. package/dist/core/lisa-owned-hash-ledger.json +6 -0
  59. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  60. package/dist/core/upstream-evidence-manifest.json +41 -14
  61. package/dist/strategies/package-lisa-host-pins.d.ts +7 -12
  62. package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -1
  63. package/dist/strategies/package-lisa-host-pins.js +29 -30
  64. package/dist/strategies/package-lisa-host-pins.js.map +1 -1
  65. package/dist/strategies/package-lisa-range-intersection.d.ts +8 -0
  66. package/dist/strategies/package-lisa-range-intersection.d.ts.map +1 -0
  67. package/dist/strategies/package-lisa-range-intersection.js +73 -0
  68. package/dist/strategies/package-lisa-range-intersection.js.map +1 -0
  69. package/harper-fabric/package-lisa/package.lisa.json +3 -2
  70. package/package.json +4 -4
  71. package/phaser/package-lisa/package.lisa.json +3 -2
  72. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  74. package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +8 -7
  75. package/plugins/lisa/.codex-plugin/skills/lisa-github-read-issue/SKILL.md +22 -106
  76. package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +37 -5
  77. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +9 -10
  78. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  79. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  80. package/plugins/lisa/skills/lisa-configure/SKILL.md +8 -7
  81. package/plugins/lisa/skills/lisa-github-read-issue/SKILL.md +22 -106
  82. package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +37 -5
  83. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +9 -10
  84. package/plugins/lisa/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  85. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  86. package/plugins/lisa-agy/plugin.json +1 -1
  87. package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +8 -7
  88. package/plugins/lisa-agy/skills/lisa-github-read-issue/SKILL.md +22 -106
  89. package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +37 -5
  90. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +9 -10
  91. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  92. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  93. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  94. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  95. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  96. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  97. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  98. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  99. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  100. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  101. package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +8 -7
  102. package/plugins/lisa-copilot/skills/lisa-github-read-issue/SKILL.md +22 -106
  103. package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +37 -5
  104. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +9 -10
  105. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  106. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  107. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  108. package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +8 -7
  109. package/plugins/lisa-cursor/skills/lisa-github-read-issue/SKILL.md +22 -106
  110. package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +37 -5
  111. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +9 -10
  112. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  113. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  114. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  115. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  116. package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +8 -7
  117. package/plugins/lisa-devin/skills/lisa-github-read-issue/SKILL.md +22 -106
  118. package/plugins/lisa-devin/skills/lisa-persist-learning/SKILL.md +37 -5
  119. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +9 -10
  120. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  121. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  122. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  123. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  124. package/plugins/lisa-expo-agy/plugin.json +1 -1
  125. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  126. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  127. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  128. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  129. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  130. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  131. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  132. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  133. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  134. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  135. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  136. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  137. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  138. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  139. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  140. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  141. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  142. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  143. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  144. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  145. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  146. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  147. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  148. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  149. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  150. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  151. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  152. package/plugins/lisa-rails-agy/plugin.json +1 -1
  153. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  154. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  155. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  156. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  157. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  158. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  159. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  160. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  161. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  162. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  163. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  164. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  165. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  166. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  167. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  168. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  169. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  170. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  171. package/plugins/src/base/skills/lisa-configure/SKILL.md +8 -7
  172. package/plugins/src/base/skills/lisa-github-read-issue/SKILL.md +22 -106
  173. package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +37 -5
  174. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +9 -10
  175. package/plugins/src/base/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  176. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  177. package/rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs +5115 -0
  178. package/scripts/check-derived-artifacts.mjs +1 -0
  179. package/scripts/generate-nightly-e2e-guard-certificate.mjs +15 -1
  180. package/scripts/two-channel-couplings.json +5 -3
  181. package/typescript/copy-overwrite/.prettierignore +1 -0
  182. package/typescript/copy-overwrite/scripts/lisa-typecheck.mjs +82 -0
  183. package/typescript/package-lisa/package.lisa.json +3 -2
@@ -107,6 +107,7 @@ export function requiresLedgerCheck(stagedPaths) {
107
107
  const NIGHTLY_GUARD_CERTIFICATE_INPUTS = Object.freeze([
108
108
  "package.json",
109
109
  "scripts/generate-nightly-e2e-guard-certificate.mjs",
110
+ "rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs",
110
111
  "src/core/nightly-e2e-guard-behavior-certificate.ts",
111
112
  "typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs",
112
113
  "typescript/copy-overwrite/scripts/lib/invoked-as-script.mjs",
@@ -28,6 +28,8 @@ import { invokedAsScript } from "./lib/invoked-as-script.mjs";
28
28
  const DEFAULT_REPO_ROOT = path.resolve(import.meta.dirname, "..");
29
29
  const GUARD_PATH =
30
30
  "typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs";
31
+ const RAILS_GUARD_PATH =
32
+ "rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs";
31
33
  const HELPER_PATH =
32
34
  "typescript/copy-overwrite/scripts/lib/invoked-as-script.mjs";
33
35
  const OUTPUT_PATH = "src/core/nightly-e2e-guard-behavior-certificate.ts";
@@ -385,7 +387,7 @@ export async function generateNightlyGuardBehaviorCertificate(
385
387
  }
386
388
 
387
389
  /**
388
- * Generate or verify the checked-in artifact.
390
+ * Generate or verify the behavior certificate and the installed Rails copy.
389
391
  * @param {readonly string[]} argv - CLI arguments
390
392
  * @param {string} [repoRoot] - Canonical Lisa checkout
391
393
  * @returns {Promise<number>} Process exit code
@@ -393,7 +395,18 @@ export async function generateNightlyGuardBehaviorCertificate(
393
395
  export async function runCertificateCli(argv, repoRoot = DEFAULT_REPO_ROOT) {
394
396
  const generated = await generateNightlyGuardBehaviorCertificate(repoRoot);
395
397
  const output = path.join(repoRoot, OUTPUT_PATH);
398
+ const railsGuard = path.join(repoRoot, RAILS_GUARD_PATH);
399
+ // Existing consumers also read GUARD_PATH directly from tagged Lisa source.
400
+ // Keep that address and certify the same program for both applied stacks.
401
+ const guardBytes = await readFile(path.join(repoRoot, GUARD_PATH));
396
402
  if (argv.includes("--check")) {
403
+ const railsBytes = await readFile(railsGuard).catch(() => undefined);
404
+ if (!railsBytes?.equals(guardBytes)) {
405
+ process.stderr.write(
406
+ "The Rails nightly guard differs from the certified source. Run `bun run build:nightly-guard-certificate` and commit the generated copy.\n"
407
+ );
408
+ return 1;
409
+ }
397
410
  const current = await readFile(output, "utf8").catch(() => "");
398
411
  if (current === generated.source) {
399
412
  process.stdout.write("Nightly guard behavior certificate is current.\n");
@@ -404,6 +417,7 @@ export async function runCertificateCli(argv, repoRoot = DEFAULT_REPO_ROOT) {
404
417
  );
405
418
  return 1;
406
419
  }
420
+ await writeFile(railsGuard, guardBytes);
407
421
  await writeFile(output, generated.source);
408
422
  process.stdout.write(
409
423
  `Wrote ${OUTPUT_PATH} (${generated.certificates.length} certified digest(s)).\n`
@@ -173,7 +173,7 @@
173
173
  "workflows": 27,
174
174
  "steps": 890,
175
175
  "couplings": 51,
176
- "inventory": 257
176
+ "inventory": 258
177
177
  },
178
178
  "counts": {
179
179
  "package-backed": 11,
@@ -327,9 +327,10 @@
327
327
  "decision": "handshake",
328
328
  "reason": null,
329
329
  "lanes": [
330
+ "rails/copy-overwrite",
330
331
  "typescript/copy-overwrite"
331
332
  ],
332
- "detail": "`nightly-e2e-health.yml` is delivered at `@main`, so this step is live in every consumer on their next run. It reads `scripts/check-nightly-e2e-health.mjs` from the CALLER's tree with no package-relative candidate, and Lisa delivers that path on the `lisa apply` channel (typescript/copy-overwrite). The two halves land in the wrong order: this step is live everywhere immediately, the file it needs is live only where somebody applied. No existence test guards the read, which is ALL this scan examined of the step's control flow: it did not read anything that could absorb the failure. An absent path most likely fails the job loudly — the better of the two failures, because it is visible — but that is inferred from the missing guard, NOT MEASURED. The step's text carries none of the tokens this scan can see (`else-branch`, `exit-zero`, `exit-nonzero`, `error-annotation`, `notice-annotation`, `failure-suppression`), which is a statement about those names and not about the step's behaviour. STALENESS (a separate dimension from the delivery verdict above): `version-handshake`. The delivered artifact answers a contract version and the workflow asks for one, so a copy too old to speak the same contract is NAMED rather than silently run. Tokens found: `artifact-declares-version`, `artifact-answers-version`, `workflow-requests-version`. `workflow-requests-version` is workflow-scoped — it does not say THIS step asks."
333
+ "detail": "`nightly-e2e-health.yml` is delivered at `@main`, so this step is live in every consumer on their next run. It reads `scripts/check-nightly-e2e-health.mjs` from the CALLER's tree with no package-relative candidate, and Lisa delivers that path on the `lisa apply` channel (rails/copy-overwrite, typescript/copy-overwrite). The two halves land in the wrong order: this step is live everywhere immediately, the file it needs is live only where somebody applied. No existence test guards the read, which is ALL this scan examined of the step's control flow: it did not read anything that could absorb the failure. An absent path most likely fails the job loudly — the better of the two failures, because it is visible — but that is inferred from the missing guard, NOT MEASURED. The step's text carries none of the tokens this scan can see (`else-branch`, `exit-zero`, `exit-nonzero`, `error-annotation`, `notice-annotation`, `failure-suppression`), which is a statement about those names and not about the step's behaviour. STALENESS (a separate dimension from the delivery verdict above): `version-handshake`. The delivered artifact answers a contract version and the workflow asks for one, so a copy too old to speak the same contract is NAMED rather than silently run. Tokens found: `artifact-declares-version`, `artifact-answers-version`, `workflow-requests-version`. `workflow-requests-version` is workflow-scoped — it does not say THIS step asks."
333
334
  },
334
335
  {
335
336
  "key": "nightly-e2e-health.yml::scripts/nightly-e2e-suites.schema.json",
@@ -369,9 +370,10 @@
369
370
  "decision": "handshake",
370
371
  "reason": null,
371
372
  "lanes": [
373
+ "rails/copy-overwrite",
372
374
  "typescript/copy-overwrite"
373
375
  ],
374
- "detail": "`nightly-e2e-report.yml` is delivered at `@main`, so this step is live in every consumer on their next run. It reads `scripts/check-nightly-e2e-health.mjs` from the CALLER's tree with no package-relative candidate, and Lisa delivers that path on the `lisa apply` channel (typescript/copy-overwrite). The two halves land in the wrong order: this step is live everywhere immediately, the file it needs is live only where somebody applied. No existence test guards the read, which is ALL this scan examined of the step's control flow: it did not read anything that could absorb the failure. An absent path most likely fails the job loudly — the better of the two failures, because it is visible — but that is inferred from the missing guard, NOT MEASURED. The step's text carries none of the tokens this scan can see (`else-branch`, `exit-zero`, `exit-nonzero`, `error-annotation`, `notice-annotation`, `failure-suppression`), which is a statement about those names and not about the step's behaviour. STALENESS (a separate dimension from the delivery verdict above): `version-handshake`. The delivered artifact answers a contract version and the workflow asks for one, so a copy too old to speak the same contract is NAMED rather than silently run. Tokens found: `artifact-declares-version`, `artifact-answers-version`, `workflow-requests-version`. `workflow-requests-version` is workflow-scoped — it does not say THIS step asks."
376
+ "detail": "`nightly-e2e-report.yml` is delivered at `@main`, so this step is live in every consumer on their next run. It reads `scripts/check-nightly-e2e-health.mjs` from the CALLER's tree with no package-relative candidate, and Lisa delivers that path on the `lisa apply` channel (rails/copy-overwrite, typescript/copy-overwrite). The two halves land in the wrong order: this step is live everywhere immediately, the file it needs is live only where somebody applied. No existence test guards the read, which is ALL this scan examined of the step's control flow: it did not read anything that could absorb the failure. An absent path most likely fails the job loudly — the better of the two failures, because it is visible — but that is inferred from the missing guard, NOT MEASURED. The step's text carries none of the tokens this scan can see (`else-branch`, `exit-zero`, `exit-nonzero`, `error-annotation`, `notice-annotation`, `failure-suppression`), which is a statement about those names and not about the step's behaviour. STALENESS (a separate dimension from the delivery verdict above): `version-handshake`. The delivered artifact answers a contract version and the workflow asks for one, so a copy too old to speak the same contract is NAMED rather than silently run. Tokens found: `artifact-declares-version`, `artifact-answers-version`, `workflow-requests-version`. `workflow-requests-version` is workflow-scoped — it does not say THIS step asks."
375
377
  },
376
378
  {
377
379
  "key": "nightly-e2e-tracking.yml::scripts/reconcile-nightly-e2e-tracking.mjs",
@@ -81,6 +81,7 @@ scripts/fetch-test-access-map.mjs
81
81
  scripts/lisa-rspec-select.mjs
82
82
  scripts/lisa-rails-ast-grep.mjs
83
83
  scripts/lisa-rails-gates.mjs
84
+ scripts/lisa-typecheck.mjs
84
85
  scripts/review-evidence-event.mjs
85
86
  scripts/check-threshold-ratchet.mjs
86
87
  scripts/check-verification-coverage.mjs
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env node
2
+ // This file is managed by Lisa and IS replaced on each `lisa` run.
3
+ // Do not edit directly — durable changes belong upstream in Lisa.
4
+
5
+ /** Run the project's installed compiler without incidental declaration checks. */
6
+ import { spawnSync } from "node:child_process";
7
+ import { createRequire } from "node:module";
8
+ import { join } from "node:path";
9
+ import ts from "typescript";
10
+
11
+ const PURE_TYPECHECK = [
12
+ "--declaration",
13
+ "false",
14
+ "--declarationMap",
15
+ "false",
16
+ "--emitDeclarationOnly",
17
+ "false",
18
+ ];
19
+
20
+ /**
21
+ * Read effective compiler options from the same project tsc will use.
22
+ * The compiler owns file discovery and reports any configuration errors.
23
+ * @param {ReturnType<typeof ts.parseCommandLine>} commandLine Parsed tsc options.
24
+ * @returns {import("typescript").CompilerOptions|undefined} Effective options.
25
+ */
26
+ function compilerOptions({ options, fileNames }) {
27
+ if (fileNames.length > 0) return options;
28
+ const requested = options.project;
29
+ let file = ts.findConfigFile(process.cwd(), ts.sys.fileExists);
30
+ if (requested !== undefined) {
31
+ file = ts.sys.directoryExists(requested)
32
+ ? join(requested, "tsconfig.json")
33
+ : requested;
34
+ }
35
+ if (file === undefined) return options;
36
+ return ts.getParsedCommandLineOfConfigFile(file, options, {
37
+ ...ts.sys,
38
+ readDirectory: () => [],
39
+ onUnRecoverableConfigFileDiagnostic: () => {},
40
+ })?.options;
41
+ }
42
+
43
+ /**
44
+ * Keep declaration checks when explicitly requested or required by the project.
45
+ * @param {string[]} args Options forwarded to the compiler.
46
+ * @returns {string[]} Additional defaults for a plain typecheck.
47
+ */
48
+ function typecheckDefaults(args) {
49
+ const parsed = ts.parseCommandLine(args);
50
+ const { options } = parsed;
51
+ if (
52
+ parsed.errors.length > 0 ||
53
+ options.noEmit === false ||
54
+ options.declaration === true ||
55
+ options.declarationMap === true ||
56
+ options.emitDeclarationOnly === true
57
+ )
58
+ return [];
59
+ const project = compilerOptions(parsed);
60
+ return project &&
61
+ !project.composite &&
62
+ !project.isolatedDeclarations &&
63
+ project.declarationDir === undefined
64
+ ? PURE_TYPECHECK
65
+ : [];
66
+ }
67
+
68
+ const require = createRequire(import.meta.url);
69
+ const args = process.argv.slice(2);
70
+ const child = spawnSync(
71
+ process.execPath,
72
+ [
73
+ require.resolve("typescript/bin/tsc"),
74
+ "--noEmit",
75
+ ...typecheckDefaults(args),
76
+ ...args,
77
+ ],
78
+ { stdio: "inherit" }
79
+ );
80
+ if (child.error)
81
+ console.error(`TypeScript could not start: ${child.error.message}`);
82
+ process.exitCode = child.status ?? 1;
@@ -28,7 +28,7 @@
28
28
  "test:node:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile typescript --adapter direct -- node scripts/lisa-test-node.mjs",
29
29
  "test:unit:lisa": "node scripts/lib/worktree-dependencies.mjs && node scripts/lisa-affected-tests.mjs --push-only --fetch scripts/fetch-test-access-map.mjs -- lisa-test-run --profile typescript --adapter vitest -- vitest run --exclude='**/integration/**'",
30
30
  "test:watch:lisa": "node scripts/lib/worktree-dependencies.mjs && lisa-test-run --profile typescript --adapter vitest -- vitest",
31
- "typecheck:lisa": "node scripts/lib/worktree-dependencies.mjs && tsc --noEmit",
31
+ "typecheck:lisa": "node scripts/lib/worktree-dependencies.mjs && node scripts/lisa-typecheck.mjs",
32
32
  "security:audit:lisa": "node scripts/lisa-audit.mjs"
33
33
  },
34
34
  "devDependencies": {
@@ -188,7 +188,8 @@
188
188
  "lisa-test-run -- vitest"
189
189
  ],
190
190
  "typecheck": [
191
- "tsc --noEmit"
191
+ "tsc --noEmit",
192
+ "node scripts/lisa-typecheck.mjs"
192
193
  ]
193
194
  },
194
195
  "devDependencies": {