@codyswann/lisa 8.3.0 → 8.5.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 (281) hide show
  1. package/all/copy-overwrite/scripts/lib/private-key-redaction.d.mts +4 -0
  2. package/all/copy-overwrite/scripts/lib/private-key-redaction.mjs +59 -0
  3. package/all/copy-overwrite/scripts/lisa-gates.mjs +1 -0
  4. package/all/copy-overwrite/scripts/lisa-hooks/block-direct-issue-create.sh +4 -1
  5. package/all/copy-overwrite/scripts/lisa-hooks/worktree-binding-guard.mjs +56 -1
  6. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +17 -14
  7. package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +2 -2
  8. package/cdk/package-lisa/package.lisa.json +1 -1
  9. package/dist/cli/confined-project-read.d.ts +2 -1
  10. package/dist/cli/confined-project-read.d.ts.map +1 -1
  11. package/dist/cli/confined-project-read.js +22 -5
  12. package/dist/cli/confined-project-read.js.map +1 -1
  13. package/dist/cli/gh-cli.d.ts +2 -1
  14. package/dist/cli/gh-cli.d.ts.map +1 -1
  15. package/dist/cli/gh-cli.js +5 -3
  16. package/dist/cli/gh-cli.js.map +1 -1
  17. package/dist/cli/github-read-issue-cmd.d.ts +62 -0
  18. package/dist/cli/github-read-issue-cmd.d.ts.map +1 -0
  19. package/dist/cli/github-read-issue-cmd.js +121 -0
  20. package/dist/cli/github-read-issue-cmd.js.map +1 -0
  21. package/dist/cli/github-reader-relationships.d.ts +41 -0
  22. package/dist/cli/github-reader-relationships.d.ts.map +1 -0
  23. package/dist/cli/github-reader-relationships.js +218 -0
  24. package/dist/cli/github-reader-relationships.js.map +1 -0
  25. package/dist/cli/github-reader-target.d.ts +24 -0
  26. package/dist/cli/github-reader-target.d.ts.map +1 -0
  27. package/dist/cli/github-reader-target.js +95 -0
  28. package/dist/cli/github-reader-target.js.map +1 -0
  29. package/dist/cli/github-reader-wire.d.ts +72 -0
  30. package/dist/cli/github-reader-wire.d.ts.map +1 -0
  31. package/dist/cli/github-reader-wire.js +125 -0
  32. package/dist/cli/github-reader-wire.js.map +1 -0
  33. package/dist/cli/index.d.ts.map +1 -1
  34. package/dist/cli/index.js +2 -2
  35. package/dist/cli/index.js.map +1 -1
  36. package/dist/controls/carrier-edits.d.ts +1 -1
  37. package/dist/controls/carrier-edits.d.ts.map +1 -1
  38. package/dist/controls/carrier-edits.js +13 -3
  39. package/dist/controls/carrier-edits.js.map +1 -1
  40. package/dist/controls/carriers.d.ts.map +1 -1
  41. package/dist/controls/carriers.js +7 -2
  42. package/dist/controls/carriers.js.map +1 -1
  43. package/dist/controls/checks-binding.d.ts.map +1 -1
  44. package/dist/controls/checks-binding.js +13 -7
  45. package/dist/controls/checks-binding.js.map +1 -1
  46. package/dist/controls/commands/attest-before-enforce.d.ts.map +1 -1
  47. package/dist/controls/commands/attest-before-enforce.js +4 -5
  48. package/dist/controls/commands/attest-before-enforce.js.map +1 -1
  49. package/dist/controls/commands/attest-workspace.d.ts.map +1 -1
  50. package/dist/controls/commands/attest-workspace.js +3 -1
  51. package/dist/controls/commands/attest-workspace.js.map +1 -1
  52. package/dist/controls/commands/declaration-check.d.ts.map +1 -1
  53. package/dist/controls/commands/declaration-check.js +7 -4
  54. package/dist/controls/commands/declaration-check.js.map +1 -1
  55. package/dist/controls/commands/proof-check.js +1 -1
  56. package/dist/controls/commands/proof-check.js.map +1 -1
  57. package/dist/controls/commands/seed.d.ts +1 -9
  58. package/dist/controls/commands/seed.d.ts.map +1 -1
  59. package/dist/controls/commands/seed.js +72 -65
  60. package/dist/controls/commands/seed.js.map +1 -1
  61. package/dist/controls/configure-road.d.ts +2 -0
  62. package/dist/controls/configure-road.d.ts.map +1 -1
  63. package/dist/controls/configure-road.js +18 -14
  64. package/dist/controls/configure-road.js.map +1 -1
  65. package/dist/controls/enforce-entry-outcome.d.ts +2 -1
  66. package/dist/controls/enforce-entry-outcome.d.ts.map +1 -1
  67. package/dist/controls/enforce-entry-outcome.js +17 -15
  68. package/dist/controls/enforce-entry-outcome.js.map +1 -1
  69. package/dist/controls/enforce-points.d.ts +2 -0
  70. package/dist/controls/enforce-points.d.ts.map +1 -1
  71. package/dist/controls/enforce-points.js +4 -1
  72. package/dist/controls/enforce-points.js.map +1 -1
  73. package/dist/controls/enforce-report.d.ts.map +1 -1
  74. package/dist/controls/enforce-report.js +6 -1
  75. package/dist/controls/enforce-report.js.map +1 -1
  76. package/dist/controls/evidence-redact.d.ts.map +1 -1
  77. package/dist/controls/evidence-redact.js +11 -6
  78. package/dist/controls/evidence-redact.js.map +1 -1
  79. package/dist/controls/gates-declaration.d.ts.map +1 -1
  80. package/dist/controls/gates-declaration.js +6 -1
  81. package/dist/controls/gates-declaration.js.map +1 -1
  82. package/dist/controls/proof-copy-preparation.d.ts +33 -0
  83. package/dist/controls/proof-copy-preparation.d.ts.map +1 -0
  84. package/dist/controls/proof-copy-preparation.js +159 -0
  85. package/dist/controls/proof-copy-preparation.js.map +1 -0
  86. package/dist/controls/proof-copy-prepared-state.d.ts +33 -0
  87. package/dist/controls/proof-copy-prepared-state.d.ts.map +1 -0
  88. package/dist/controls/proof-copy-prepared-state.js +117 -0
  89. package/dist/controls/proof-copy-prepared-state.js.map +1 -0
  90. package/dist/controls/proof-copy-workspace.d.ts.map +1 -1
  91. package/dist/controls/proof-copy-workspace.js +17 -4
  92. package/dist/controls/proof-copy-workspace.js.map +1 -1
  93. package/dist/controls/proof-copy.d.ts +5 -0
  94. package/dist/controls/proof-copy.d.ts.map +1 -1
  95. package/dist/controls/proof-copy.js +17 -15
  96. package/dist/controls/proof-copy.js.map +1 -1
  97. package/dist/controls/proof-patch.d.ts +12 -0
  98. package/dist/controls/proof-patch.d.ts.map +1 -1
  99. package/dist/controls/proof-patch.js +28 -0
  100. package/dist/controls/proof-patch.js.map +1 -1
  101. package/dist/controls/proof-preparation-declaration.d.ts +15 -0
  102. package/dist/controls/proof-preparation-declaration.d.ts.map +1 -0
  103. package/dist/controls/proof-preparation-declaration.js +57 -0
  104. package/dist/controls/proof-preparation-declaration.js.map +1 -0
  105. package/dist/controls/proof-tools.d.ts +7 -4
  106. package/dist/controls/proof-tools.d.ts.map +1 -1
  107. package/dist/controls/proof-tools.js +1 -1
  108. package/dist/controls/proof-tools.js.map +1 -1
  109. package/dist/controls/register-drift.d.ts.map +1 -1
  110. package/dist/controls/register-drift.js +4 -3
  111. package/dist/controls/register-drift.js.map +1 -1
  112. package/dist/controls/register-evidence-rule.d.ts +2 -0
  113. package/dist/controls/register-evidence-rule.d.ts.map +1 -1
  114. package/dist/controls/register-evidence-rule.js +8 -7
  115. package/dist/controls/register-evidence-rule.js.map +1 -1
  116. package/dist/controls/register-rules.d.ts +2 -0
  117. package/dist/controls/register-rules.d.ts.map +1 -1
  118. package/dist/controls/register-rules.js.map +1 -1
  119. package/dist/controls/register-types.d.ts +2 -4
  120. package/dist/controls/register-types.d.ts.map +1 -1
  121. package/dist/controls/register-types.js.map +1 -1
  122. package/dist/controls/register.d.ts +2 -0
  123. package/dist/controls/register.d.ts.map +1 -1
  124. package/dist/controls/register.js +3 -1
  125. package/dist/controls/register.js.map +1 -1
  126. package/dist/controls/secret-scan.d.ts.map +1 -1
  127. package/dist/controls/secret-scan.js +7 -5
  128. package/dist/controls/secret-scan.js.map +1 -1
  129. package/dist/controls/secret-shapes.d.ts +7 -7
  130. package/dist/controls/secret-shapes.d.ts.map +1 -1
  131. package/dist/controls/secret-shapes.js +7 -18
  132. package/dist/controls/secret-shapes.js.map +1 -1
  133. package/dist/controls/shipped-parts.d.ts +89 -0
  134. package/dist/controls/shipped-parts.d.ts.map +1 -0
  135. package/dist/controls/shipped-parts.js +233 -0
  136. package/dist/controls/shipped-parts.js.map +1 -0
  137. package/dist/core/lisa-owned-hash-ledger.json +38 -0
  138. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  139. package/dist/core/upstream-evidence-manifest.json +90 -23
  140. package/dist/strategies/package-lisa-host-pins.d.ts +7 -12
  141. package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -1
  142. package/dist/strategies/package-lisa-host-pins.js +29 -30
  143. package/dist/strategies/package-lisa-host-pins.js.map +1 -1
  144. package/dist/strategies/package-lisa-range-intersection.d.ts +8 -0
  145. package/dist/strategies/package-lisa-range-intersection.d.ts.map +1 -0
  146. package/dist/strategies/package-lisa-range-intersection.js +73 -0
  147. package/dist/strategies/package-lisa-range-intersection.js.map +1 -0
  148. package/harper-fabric/package-lisa/package.lisa.json +3 -2
  149. package/package.json +4 -4
  150. package/phaser/package-lisa/package.lisa.json +3 -2
  151. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  152. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  153. package/plugins/lisa/.codex-plugin/skills/lisa-attest/SKILL.md +12 -2
  154. package/plugins/lisa/.codex-plugin/skills/lisa-configure/SKILL.md +27 -13
  155. package/plugins/lisa/.codex-plugin/skills/lisa-github-read-issue/SKILL.md +22 -106
  156. package/plugins/lisa/.codex-plugin/skills/lisa-persist-learning/SKILL.md +37 -5
  157. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +9 -10
  158. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  159. package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  160. package/plugins/lisa/hooks/block-direct-issue-create.sh +4 -1
  161. package/plugins/lisa/hooks/worktree-binding-guard.mjs +56 -1
  162. package/plugins/lisa/skills/lisa-attest/SKILL.md +12 -2
  163. package/plugins/lisa/skills/lisa-configure/SKILL.md +27 -13
  164. package/plugins/lisa/skills/lisa-github-read-issue/SKILL.md +22 -106
  165. package/plugins/lisa/skills/lisa-persist-learning/SKILL.md +37 -5
  166. package/plugins/lisa/skills/lisa-session-manager/SKILL.md +9 -10
  167. package/plugins/lisa/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  168. package/plugins/lisa/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  169. package/plugins/lisa-agy/hooks/block-direct-issue-create.sh +4 -1
  170. package/plugins/lisa-agy/plugin.json +1 -1
  171. package/plugins/lisa-agy/skills/lisa-attest/SKILL.md +12 -2
  172. package/plugins/lisa-agy/skills/lisa-configure/SKILL.md +27 -13
  173. package/plugins/lisa-agy/skills/lisa-github-read-issue/SKILL.md +22 -106
  174. package/plugins/lisa-agy/skills/lisa-persist-learning/SKILL.md +37 -5
  175. package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +9 -10
  176. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  177. package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  178. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  179. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  180. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  181. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  182. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  183. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  184. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  185. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  186. package/plugins/lisa-copilot/hooks/block-direct-issue-create.sh +4 -1
  187. package/plugins/lisa-copilot/hooks/worktree-binding-guard.mjs +56 -1
  188. package/plugins/lisa-copilot/skills/lisa-attest/SKILL.md +12 -2
  189. package/plugins/lisa-copilot/skills/lisa-configure/SKILL.md +27 -13
  190. package/plugins/lisa-copilot/skills/lisa-github-read-issue/SKILL.md +22 -106
  191. package/plugins/lisa-copilot/skills/lisa-persist-learning/SKILL.md +37 -5
  192. package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +9 -10
  193. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  194. package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  195. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  196. package/plugins/lisa-cursor/hooks/block-direct-issue-create.sh +4 -1
  197. package/plugins/lisa-cursor/hooks/worktree-binding-guard.mjs +56 -1
  198. package/plugins/lisa-cursor/skills/lisa-attest/SKILL.md +12 -2
  199. package/plugins/lisa-cursor/skills/lisa-configure/SKILL.md +27 -13
  200. package/plugins/lisa-cursor/skills/lisa-github-read-issue/SKILL.md +22 -106
  201. package/plugins/lisa-cursor/skills/lisa-persist-learning/SKILL.md +37 -5
  202. package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +9 -10
  203. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  204. package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  205. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  206. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  207. package/plugins/lisa-devin/hooks/block-direct-issue-create.sh +4 -1
  208. package/plugins/lisa-devin/hooks/worktree-binding-guard.mjs +56 -1
  209. package/plugins/lisa-devin/skills/lisa-attest/SKILL.md +12 -2
  210. package/plugins/lisa-devin/skills/lisa-configure/SKILL.md +27 -13
  211. package/plugins/lisa-devin/skills/lisa-github-read-issue/SKILL.md +22 -106
  212. package/plugins/lisa-devin/skills/lisa-persist-learning/SKILL.md +37 -5
  213. package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +9 -10
  214. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  215. package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  216. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  217. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  218. package/plugins/lisa-expo-agy/plugin.json +1 -1
  219. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  220. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  221. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  222. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  223. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  224. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  225. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  226. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  227. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  228. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  229. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  230. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  231. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  232. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  233. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  234. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  235. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  236. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  237. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  238. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  239. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  240. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  241. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  242. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  243. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  244. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  245. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  246. package/plugins/lisa-rails-agy/plugin.json +1 -1
  247. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  248. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  249. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  250. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  251. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  252. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  253. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  254. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  255. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  256. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  257. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  258. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  259. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  260. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  261. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  262. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  263. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  264. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  265. package/plugins/src/base/hooks/block-direct-issue-create.sh +4 -1
  266. package/plugins/src/base/hooks/worktree-binding-guard.mjs +56 -1
  267. package/plugins/src/base/skills/lisa-attest/SKILL.md +12 -2
  268. package/plugins/src/base/skills/lisa-configure/SKILL.md +27 -13
  269. package/plugins/src/base/skills/lisa-github-read-issue/SKILL.md +22 -106
  270. package/plugins/src/base/skills/lisa-persist-learning/SKILL.md +37 -5
  271. package/plugins/src/base/skills/lisa-session-manager/SKILL.md +9 -10
  272. package/plugins/src/base/skills/lisa-session-manager/scripts/answer-record.mjs +24 -20
  273. package/plugins/src/base/skills/lisa-session-manager/scripts/cli-answer-record.mjs +3 -1
  274. package/rails/copy-overwrite/scripts/check-nightly-e2e-health.mjs +5115 -0
  275. package/scripts/check-derived-artifacts.mjs +1 -0
  276. package/scripts/generate-nightly-e2e-guard-certificate.mjs +15 -1
  277. package/scripts/lib/phrase-tests/redact.mjs +3 -8
  278. package/scripts/two-channel-couplings.json +5 -3
  279. package/typescript/copy-overwrite/.prettierignore +2 -0
  280. package/typescript/copy-overwrite/scripts/lisa-typecheck.mjs +82 -0
  281. 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`
@@ -14,17 +14,12 @@
14
14
  * @module scripts/lib/phrase-tests/redact
15
15
  */
16
16
 
17
+ import { redactPrivateKeyBlocks } from "../../../all/copy-overwrite/scripts/lib/private-key-redaction.mjs";
18
+
17
19
  /** @typedef {{ kind: string, re: RegExp, replace?: string }} SecretShape */
18
20
 
19
21
  /** @type {readonly SecretShape[]} */
20
22
  export const SECRET_SHAPES = Object.freeze([
21
- {
22
- kind: "PRIVATE_KEY",
23
- // The body stops at its own last line or at the first line of another
24
- // block, whichever comes first, so no first line is read from to the
25
- // end of the text and the time stays in proportion to the length.
26
- re: /-----BEGIN [A-Z ]*PRIVATE KEY-----(?:(?:(?!-----BEGIN )[\s\S])+?(?:-----END [A-Z ]*PRIVATE KEY-----|(?=-----BEGIN )))?/gu,
27
- },
28
23
  {
29
24
  kind: "URL_CREDENTIALS",
30
25
  // The scheme is bounded: with `*`, a long run of letters, dots and signs
@@ -67,7 +62,7 @@ export function redactText(text) {
67
62
  return SECRET_SHAPES.reduce(
68
63
  (current, shape) =>
69
64
  current.replace(shape.re, shape.replace ?? `[REDACTED:${shape.kind}]`),
70
- text
65
+ redactPrivateKeyBlocks(text)
71
66
  );
72
67
  }
73
68
 
@@ -173,7 +173,7 @@
173
173
  "workflows": 27,
174
174
  "steps": 890,
175
175
  "couplings": 51,
176
- "inventory": 257
176
+ "inventory": 260
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
@@ -260,6 +261,7 @@ scripts/lib/npm-update-worker-inspection.mjs
260
261
  scripts/lib/npm-update-worker-lifecycle.mjs
261
262
  scripts/lib/npm-update-worker-policy.mjs
262
263
  scripts/lib/placeholder-expiry.mjs
264
+ scripts/lib/private-key-redaction.mjs
263
265
  scripts/lib/process-tree-runner.mjs
264
266
  scripts/lib/push-admission.mjs
265
267
  scripts/lib/push-gate-defaults.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": {