@codyswann/lisa 4.3.3 → 4.3.5

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 (73) hide show
  1. package/all/copy-overwrite/scripts/check-conflict-markers.mjs +30 -5
  2. package/all/copy-overwrite/scripts/lib/bounded-spawn.mjs +26 -14
  3. package/all/copy-overwrite/scripts/lisa-environment-prepare.mjs +29 -2
  4. package/all/copy-overwrite/scripts/lisa-postinstall.mjs +18 -2
  5. package/all/copy-overwrite/scripts/lisa-reconcile-policy.mjs +35 -7
  6. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +38 -4
  7. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  8. package/dist/core/lisa-owned-hash-ledger.js +8 -0
  9. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  10. package/dist/core/lisa-owned-templates.d.ts +25 -0
  11. package/dist/core/lisa-owned-templates.d.ts.map +1 -1
  12. package/dist/core/lisa-owned-templates.js +39 -0
  13. package/dist/core/lisa-owned-templates.js.map +1 -1
  14. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  15. package/dist/core/upstream-evidence-manifest.js +12 -9
  16. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  17. package/dist/strategies/copy-overwrite.d.ts.map +1 -1
  18. package/dist/strategies/copy-overwrite.js +29 -1
  19. package/dist/strategies/copy-overwrite.js.map +1 -1
  20. package/expo/copy-overwrite/scripts/lib/bounded-spawn.mjs +26 -14
  21. package/package.json +1 -1
  22. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  24. package/plugins/lisa-agy/plugin.json +1 -1
  25. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  27. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  28. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  34. package/plugins/lisa-expo-agy/plugin.json +1 -1
  35. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  40. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  45. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  49. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  50. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  55. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  59. package/plugins/lisa-rails-agy/plugin.json +1 -1
  60. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  64. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  65. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  69. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  70. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  72. package/scripts/lib/bounded-spawn.mjs +26 -14
  73. package/typescript/copy-overwrite/scripts/lib/bounded-spawn.mjs +26 -14
@@ -61,11 +61,11 @@
61
61
  *
62
62
  * @module all/copy-overwrite/scripts/check-conflict-markers
63
63
  */
64
- import { execFileSync } from "node:child_process";
65
64
  import fs from "node:fs";
66
65
  import path from "node:path";
67
66
  import process from "node:process";
68
67
 
68
+ import { boundedExecFileSync, isChildTimeout } from "./lib/bounded-spawn.mjs";
69
69
  import { invokedAsScript } from "./lib/invoked-as-script.mjs";
70
70
 
71
71
  /**
@@ -201,7 +201,10 @@ function isBinary(buffer) {
201
201
  function listTrackedFiles(root) {
202
202
  let stdout;
203
203
  try {
204
- stdout = execFileSync("git", ["-C", root, "ls-files", "-z"], {
204
+ // A killed child arrives here as an ordinary throw and leaves as a
205
+ // `UsageError` naming ETIMEDOUT, so this call site was already fail-closed
206
+ // and needed only the deadline. Nothing about the catch changes.
207
+ stdout = boundedExecFileSync("git", ["-C", root, "ls-files", "-z"], {
205
208
  encoding: "utf8",
206
209
  maxBuffer: MAX_GIT_OUTPUT_BYTES,
207
210
  stdio: ["ignore", "pipe", "ignore"],
@@ -224,12 +227,19 @@ function listTrackedFiles(root) {
224
227
  * A failure here is deliberately NOT fatal: an empty set degrades this gate to
225
228
  * exactly its previous behaviour, which is a weaker true position rather than a
226
229
  * false one.
230
+ *
231
+ * That reasoning covers a KILLED child as well, and the swallow is kept for it
232
+ * deliberately rather than by inheritance. An empty diff set means every path
233
+ * is read from the working tree, which is where this gate read from before the
234
+ * index was consulted at all — so a timeout here costs the improvement, not the
235
+ * gate. Contrast `readIndexedBlob`, where the same swallow WOULD cost the
236
+ * gate, and is not kept.
227
237
  * @param {string} root - the repository root.
228
238
  * @returns {Set<string>} paths that differ, relative to `root`.
229
239
  */
230
240
  function listStagedDifferences(root) {
231
241
  try {
232
- const stdout = execFileSync(
242
+ const stdout = boundedExecFileSync(
233
243
  "git",
234
244
  ["-C", root, "diff", "--name-only", "-z"],
235
245
  {
@@ -251,17 +261,32 @@ function listStagedDifferences(root) {
251
261
  * what happens to be on disk. An unmerged path has no stage-0 entry and this
252
262
  * throws, which is correct — the caller falls back to the working tree, where
253
263
  * an in-progress merge writes its markers.
264
+ *
265
+ * A KILLED child is the one failure this must NOT swallow, and it is the only
266
+ * call site in this file that re-raises. `contentToScan` reads
267
+ * `readIndexedBlob(...) ?? readWorkingTree(...)`, so returning null for a
268
+ * timeout silently reads the working tree in place of the index — which is
269
+ * precisely the weaker position CodySwannGT/lisa#2958 removed. Two shapes it
270
+ * measured go back to being invisible: a conflict block staged in the index
271
+ * with an unstaged resolution on disk, and a tracked file absent from the
272
+ * working tree that gets COUNTED as scanned and never read.
273
+ *
274
+ * So a busy machine would return this gate to reporting clean over bytes
275
+ * nobody looked at, with no signal — the exact defect it exists to end,
276
+ * reintroduced through its own error handling.
254
277
  * @param {string} root - the repository root.
255
278
  * @param {string} file - a tracked path relative to `root`.
256
279
  * @returns {Buffer|null} the indexed blob, or null.
280
+ * @throws {Error} When the child was killed at its deadline.
257
281
  */
258
282
  function readIndexedBlob(root, file) {
259
283
  try {
260
- return execFileSync("git", ["-C", root, "show", `:${file}`], {
284
+ return boundedExecFileSync("git", ["-C", root, "show", `:${file}`], {
261
285
  maxBuffer: MAX_FILE_BYTES,
262
286
  stdio: ["ignore", "pipe", "ignore"],
263
287
  });
264
- } catch {
288
+ } catch (error) {
289
+ if (isChildTimeout(error)) throw error;
265
290
  return null;
266
291
  }
267
292
  }
@@ -135,20 +135,21 @@ export function rethrowIfChildTimeout(error) {
135
135
  }
136
136
 
137
137
  /**
138
- * Options a bounded start always applies, whatever the caller asked for.
139
- *
140
- * `killSignal` is `SIGKILL` rather than the default `SIGTERM` deliberately: the
141
- * hang this module exists for is a process that is not servicing signals, and a
142
- * `SIGTERM` a child ignores turns the deadline into a suggestion.
138
+ * The deadline to hold a child to, given what the caller asked for.
139
+ *
140
+ * Split out as a value rather than folded into an options builder so that
141
+ * `timeout:` appears LITERALLY at both call sites below. That is not a style
142
+ * preference the conformance scan this module exists to satisfy reads the
143
+ * options object at each call, and a deadline supplied by a helper it cannot
144
+ * see through makes the helper itself the one unfixable offender in the tree.
145
+ * An offender that cannot be fixed is the pressure that produces an exemption
146
+ * list, and an exemption list is what CodySwannGT/lisa#2940 ruled out. The
147
+ * module that enforces the rule has to be able to pass it.
143
148
  * @param {object} options The caller's options.
144
- * @returns {object} The caller's options with the deadline enforced.
149
+ * @returns {number} Milliseconds before the child is killed.
145
150
  */
146
- function bounded(options) {
147
- return {
148
- ...options,
149
- killSignal: "SIGKILL",
150
- timeout: options.timeout ?? DEFAULT_CHILD_BUDGET_MS,
151
- };
151
+ function deadlineFor(options) {
152
+ return options.timeout ?? DEFAULT_CHILD_BUDGET_MS;
152
153
  }
153
154
 
154
155
  /**
@@ -165,7 +166,14 @@ function bounded(options) {
165
166
  * @throws {Error} When the child was killed at its deadline.
166
167
  */
167
168
  export function boundedSpawnSync(command, args = [], options = {}) {
168
- const result = spawnSync(command, [...args], bounded(options));
169
+ const result = spawnSync(command, [...args], {
170
+ ...options,
171
+ // `SIGKILL` rather than the default `SIGTERM`: the hang this module exists
172
+ // for is a process not servicing signals, and a `SIGTERM` a child ignores
173
+ // turns the deadline into a suggestion.
174
+ killSignal: "SIGKILL",
175
+ timeout: deadlineFor(options),
176
+ });
169
177
  if (isChildTimeout(result.error)) throw result.error;
170
178
  return result;
171
179
  }
@@ -184,5 +192,9 @@ export function boundedSpawnSync(command, args = [], options = {}) {
184
192
  * @throws {Error} When the child was killed, or exited non-zero.
185
193
  */
186
194
  export function boundedExecFileSync(command, args = [], options = {}) {
187
- return execFileSync(command, [...args], bounded(options));
195
+ return execFileSync(command, [...args], {
196
+ ...options,
197
+ killSignal: "SIGKILL",
198
+ timeout: deadlineFor(options),
199
+ });
188
200
  }
@@ -51,9 +51,9 @@
51
51
 
52
52
  import { existsSync, readFileSync } from "node:fs";
53
53
  import { join } from "node:path";
54
- import { spawnSync } from "node:child_process";
55
54
 
56
55
  import { classifyEnvironment } from "./lisa-destructive-guard.mjs";
56
+ import { boundedSpawnSync } from "./lib/bounded-spawn.mjs";
57
57
  import { invokedAsScript } from "./lib/invoked-as-script.mjs";
58
58
  import { readGates } from "./lisa-gates.mjs";
59
59
 
@@ -161,18 +161,45 @@ function argvFor(runner, verb, env) {
161
161
  return [...runner.trim().split(/\s+/u), taskFor(verb), "--", `--env=${env}`];
162
162
  }
163
163
 
164
+ /**
165
+ * Hang-detector deadline for one environment verb, in milliseconds.
166
+ *
167
+ * Twenty minutes, and the number is a ceiling rather than an expectation. A
168
+ * reset that drops and rebuilds a database, or a reseed that writes fixture
169
+ * data, is measured in minutes on a busy machine; anything past this is a
170
+ * process that has stopped making progress, and waiting longer converts a
171
+ * detectable hang into an operator staring at an inherited stdio that has gone
172
+ * quiet.
173
+ */
174
+ const ENVIRONMENT_VERB_BUDGET_MS = 20 * 60 * 1000;
175
+
164
176
  /**
165
177
  * The default executor: run the vector directly, inheriting stdio.
166
178
  *
167
179
  * No `shell: true`. stdio is inherited so a failing reset's own output reaches
168
180
  * the operator unaltered — a summary reprinted by this module would be strictly
169
181
  * less useful than what the project's own tooling already said.
182
+ *
183
+ * The deadline is deliberately NOT the shared default. The child here is the
184
+ * PROJECT's own environment tooling — a database reset, a reseed — which
185
+ * legitimately runs for minutes, so a default sized for a `git` call would make
186
+ * this module's own timeout the ordinary outcome. It is a hang detector, not a
187
+ * budget: a reset still running after this long is not going to finish.
188
+ *
189
+ * A killed child is already handled correctly downstream and always was — the
190
+ * caller reports "was killed before it finished. Nothing after it ran", which
191
+ * is the right verdict because a reseed layered onto a failed reset produces
192
+ * fixture data on top of whatever the last run left behind. This call site
193
+ * needed the deadline and nothing else.
170
194
  * @param {string[]} argv The argument vector.
171
195
  * @returns {number|null} Exit code, or null when the child was killed.
172
196
  */
173
197
  function spawnExec(argv) {
174
198
  const [file, ...args] = argv;
175
- const child = spawnSync(file, args, { stdio: "inherit" });
199
+ const child = boundedSpawnSync(file, args, {
200
+ stdio: "inherit",
201
+ timeout: ENVIRONMENT_VERB_BUDGET_MS,
202
+ });
176
203
  if (child.error) return null;
177
204
  return child.status;
178
205
  }
@@ -44,12 +44,27 @@
44
44
  * @module scripts/lisa-postinstall
45
45
  */
46
46
 
47
- import { spawnSync } from "node:child_process";
48
47
  import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
49
48
  import { dirname, join } from "node:path";
50
49
 
50
+ import { boundedSpawnSync } from "./lib/bounded-spawn.mjs";
51
51
  import { invokedAsScript } from "./lib/invoked-as-script.mjs";
52
52
 
53
+ /**
54
+ * Hang-detector deadline for the bootstrap apply, in milliseconds.
55
+ *
56
+ * Ten minutes, and it is a ceiling rather than a budget: an apply that has
57
+ * written nothing for ten minutes is not going to finish. Not the shared
58
+ * default, because a full apply writes templates, merges manifests and may
59
+ * install dependencies, so it is minutes rather than seconds.
60
+ *
61
+ * This one matters more than most. It runs inside a package manager's
62
+ * postinstall, where an unbounded child hangs THE INSTALL — no output after the
63
+ * last line it printed, and no gate anywhere to report it, because the thing
64
+ * that would have reported it is what is stuck.
65
+ */
66
+ const APPLY_BUDGET_MS = 10 * 60 * 1000;
67
+
53
68
  /** Where the failure marker lives, relative to the project root. */
54
69
  export const APPLY_FAILURE_MARKER = join(
55
70
  "node_modules",
@@ -133,7 +148,7 @@ export function runPostinstall(cwd = process.cwd(), env = process.env) {
133
148
  return;
134
149
  }
135
150
 
136
- const child = spawnSync(
151
+ const child = boundedSpawnSync(
137
152
  process.execPath,
138
153
  [LISA_ENTRY, "--yes", "--skip-git-check", "."],
139
154
  {
@@ -142,6 +157,7 @@ export function runPostinstall(cwd = process.cwd(), env = process.env) {
142
157
  encoding: "utf8",
143
158
  // Inherited, NOT captured-and-discarded. The whole point.
144
159
  stdio: ["ignore", "inherit", "pipe"],
160
+ timeout: APPLY_BUDGET_MS,
145
161
  }
146
162
  );
147
163
 
@@ -104,8 +104,11 @@
104
104
  * @module lisa-reconcile-policy
105
105
  */
106
106
 
107
- import { spawnSync } from "node:child_process";
108
-
107
+ import {
108
+ boundedSpawnSync,
109
+ DEFAULT_CHILD_BUDGET_MS,
110
+ isChildTimeout,
111
+ } from "./lib/bounded-spawn.mjs";
109
112
  import { invokedAsScript } from "./lib/invoked-as-script.mjs";
110
113
 
111
114
  import {
@@ -360,16 +363,41 @@ export const POLICY_RULESET_NAME = "base";
360
363
  * because "gh is not installed here" and "gh said no" are different findings
361
364
  * with different fixes, and collapsing them is how an unauthenticated machine
362
365
  * gets told to install a CLI it already has.
366
+ *
367
+ * `timedOut` exists for exactly that reason applied once more. "The box was
368
+ * busy" and "gh said no" are also different findings with different fixes, and
369
+ * a killed child returns EMPTY streams — so folded into the ordinary failure
370
+ * path it becomes an empty `stderr` and a verdict of no, indistinguishable from
371
+ * a clean refusal. This function is deliberately the one that refuses to
372
+ * collapse outcomes; a third one belongs here on the same principle rather than
373
+ * as an exception to it.
374
+ *
375
+ * It does not throw, unlike most call sites converted for
376
+ * CodySwannGT/lisa#2980, because callers read a result object and a throw would
377
+ * change that contract. Not-throwing is safe here precisely BECAUSE the outcome
378
+ * is named: `ok` is false, so every existing caller already treats it as a
379
+ * failure, and one that wants to say "the machine was busy" now can.
363
380
  * @param {string[]} args Arguments to `gh`.
364
381
  * @param {object} [options] Runner options.
365
382
  * @param {string} [options.input] Body to pipe to stdin.
366
- * @returns {{ok: boolean, stdout: string, stderr: string, missing?: boolean}} Outcome.
383
+ * @returns {{ok: boolean, stdout: string, stderr: string, missing?: boolean, timedOut?: boolean}} Outcome.
367
384
  */
368
385
  export function ghRunner(args, options = {}) {
369
- const result = spawnSync("gh", args, {
370
- encoding: "utf8",
371
- input: options.input,
372
- });
386
+ let result;
387
+ try {
388
+ result = boundedSpawnSync("gh", args, {
389
+ encoding: "utf8",
390
+ input: options.input,
391
+ });
392
+ } catch (error) {
393
+ if (!isChildTimeout(error)) throw error;
394
+ return {
395
+ ok: false,
396
+ stdout: "",
397
+ stderr: `gh was killed after ${String(DEFAULT_CHILD_BUDGET_MS)}ms without finishing: ${String(error.message)}`,
398
+ timedOut: true,
399
+ };
400
+ }
373
401
  if (result.error) {
374
402
  const missing = result.error.code === "ENOENT";
375
403
  return { ok: false, stdout: "", stderr: result.error.message, missing };
@@ -41,7 +41,6 @@
41
41
  * @module lisa-run-gates
42
42
  */
43
43
 
44
- import { spawnSync } from "node:child_process";
45
44
  import {
46
45
  existsSync,
47
46
  mkdtempSync,
@@ -53,6 +52,7 @@ import { tmpdir } from "node:os";
53
52
  import { join } from "node:path";
54
53
 
55
54
  import { DIAGNOSIS, diagnoseFailure } from "./lib/gate-failure-diagnosis.mjs";
55
+ import { boundedSpawnSync } from "./lib/bounded-spawn.mjs";
56
56
  import { invokedAsScript } from "./lib/invoked-as-script.mjs";
57
57
  import { projectScripts, readGates, resolveMoment } from "./lisa-gates.mjs";
58
58
 
@@ -827,6 +827,28 @@ function readPackageScripts(cwd) {
827
827
  */
828
828
  const CAPTURE_TAIL_BYTES = 512 * 1024;
829
829
 
830
+ /**
831
+ * Hang-detector deadline for one gate command, in milliseconds.
832
+ *
833
+ * Two hours, and deliberately not the shared default. The child here is the
834
+ * PROJECT's own gate command — `test:unit`, `test:integration`, a mutation run
835
+ * — which legitimately takes minutes and occasionally much longer on a loaded
836
+ * machine. A deadline sized for a `git` call would make this module's own
837
+ * timeout the ordinary outcome of running the test suite, which is the failure
838
+ * mode CodySwannGT/lisa#2980 exists to prevent, committed by its own fix.
839
+ *
840
+ * So this is a ceiling on "has stopped making progress", not a budget for "how
841
+ * long should this take". A gate still running after two hours is not going to
842
+ * finish, and every CI job that would host one caps out well below it.
843
+ *
844
+ * A killed child was already handled correctly here and always was: `code:
845
+ * null` routes into the KILLED diagnosis, which prints `NOT PROVED — KILLED`
846
+ * and counts the gate among those this run did not prove (#3032). These call
847
+ * sites needed the deadline and nothing else — this file is the reference for
848
+ * what correct handling looks like, not an instance of the defect.
849
+ */
850
+ const GATE_COMMAND_BUDGET_MS = 2 * 60 * 60 * 1000;
851
+
830
852
  /**
831
853
  * Run the command in a shell with stdio inherited, capturing nothing.
832
854
  *
@@ -837,7 +859,11 @@ const CAPTURE_TAIL_BYTES = 512 * 1024;
837
859
  * @returns {{code: number|null, output: null}} Exit code; null when killed.
838
860
  */
839
861
  function plainExec(command) {
840
- const child = spawnSync(command, { shell: true, stdio: "inherit" });
862
+ const child = boundedSpawnSync(command, [], {
863
+ shell: true,
864
+ stdio: "inherit",
865
+ timeout: GATE_COMMAND_BUDGET_MS,
866
+ });
841
867
  if (child.error) return { code: null, output: null };
842
868
  return { code: child.status, output: null };
843
869
  }
@@ -853,7 +879,12 @@ function plainExec(command) {
853
879
  */
854
880
  function captureAvailable() {
855
881
  if (process.env.LISA_GATES_CAPTURE === "0") return false;
856
- const probe = spawnSync("sh", ["-c", "command -v tee"], { stdio: "ignore" });
882
+ // The one child in this file that is NOT a project gate command, so it takes
883
+ // the shared default rather than the two-hour ceiling: `command -v tee`
884
+ // answers immediately or the shell is broken.
885
+ const probe = boundedSpawnSync("sh", ["-c", "command -v tee"], {
886
+ stdio: "ignore",
887
+ });
857
888
  return !probe.error && probe.status === 0;
858
889
  }
859
890
 
@@ -915,7 +946,10 @@ function spawnExec(command) {
915
946
  // comment or redirection still has `echo` run as its own statement.
916
947
  const script = `{\n${command}\necho $? > '${statusPath}'\n} 2>&1 | tee '${logPath}'\n`;
917
948
  try {
918
- const child = spawnSync("sh", ["-c", script], { stdio: "inherit" });
949
+ const child = boundedSpawnSync("sh", ["-c", script], {
950
+ stdio: "inherit",
951
+ timeout: GATE_COMMAND_BUDGET_MS,
952
+ });
919
953
  if (child.error) return { code: null, output: null };
920
954
  return readCaptured(statusPath, logPath);
921
955
  } finally {
@@ -1 +1 @@
1
- {"version":3,"file":"lisa-owned-hash-ledger.d.ts","sourceRoot":"","sources":["../../src/core/lisa-owned-hash-ledger.ts"],"names":[],"mappings":"AACA,6EAA6E;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CA+jBjC,CAAC"}
1
+ {"version":3,"file":"lisa-owned-hash-ledger.d.ts","sourceRoot":"","sources":["../../src/core/lisa-owned-hash-ledger.ts"],"names":[],"mappings":"AACA,6EAA6E;AAE7E;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAukBjC,CAAC"}
@@ -108,9 +108,11 @@ export const LISA_OWNED_HASH_LEDGER = Object.freeze({
108
108
  "scripts/check-conflict-markers.mjs": Object.freeze([
109
109
  "2bed218a452c100a40e6f4fd6ff1867ed580527d50146aa9858592f2cb610baa",
110
110
  "3a2ab8dde9deab3e8ee750d5678b6653751abad2eb8f961500585ba38f502047",
111
+ "635c60842f6fa27eb18a491f646e10fa7af7bd7a5b00e6d47cc22fefddea22e3",
111
112
  "78c286ed6d7cce3a030fd7561fbe6285e2051d34540640f016b86ef89e3fb08b",
112
113
  "92f4413e8becaf66244b67297acfb223227ac42c2ddb1f715c8bce269708e526",
113
114
  "d1b6949202ea5623807a8631791726aec8943accddfae6273a7fb17ebd95b4d0",
115
+ "d7a689bcc122af7f38d1c536924fc2f3dcb503b09658ffc6035ccbe720d14d6b",
114
116
  "e2b25dd56eb3742f074ae5b8ece13ef194518e70e5bac4c2f49e3b819d3f7dc4",
115
117
  ]),
116
118
  "scripts/check-e2e-coverage.mjs": Object.freeze([
@@ -219,6 +221,7 @@ export const LISA_OWNED_HASH_LEDGER = Object.freeze({
219
221
  ]),
220
222
  "scripts/lib/bounded-spawn.mjs": Object.freeze([
221
223
  "1ba16da749319304cee0ae39b8028c652bbe1b42496418983c90ff2236fe507d",
224
+ "72e277ada531914d7bc51c3cb8dc67b8881aa817d96fa2f9f4d81668a3d3bbc1",
222
225
  "a9e4ebf6a91ef2b0b058566db425edd133fe7c0229fff5c5e4b916c8701822e0",
223
226
  ]),
224
227
  "scripts/lib/gate-failure-diagnosis.mjs": Object.freeze([
@@ -271,6 +274,7 @@ export const LISA_OWNED_HASH_LEDGER = Object.freeze({
271
274
  "e17c45f7cadf0fb55dd07270776caf211af99b7d4771a4fde75aafe5919e8dbe",
272
275
  ]),
273
276
  "scripts/lisa-environment-prepare.mjs": Object.freeze([
277
+ "63879152ebb67f289e900167daf035f2d03d7773c6e110ed5ab708c95417c55c",
274
278
  "c765c7a44ea81d54c7820f2068c8811fb73ca3e5f063cb55a8c30391d1326323",
275
279
  "f8c8e276fa6d68ed661f07882f20ee095d18a5e8a90136f78f1ed2b032ce33d4",
276
280
  "f936bc8a038a7901ade1ba58cc52e5f5a8b8b2a52a9f0c1516567cc80eb02ccb",
@@ -473,20 +477,24 @@ export const LISA_OWNED_HASH_LEDGER = Object.freeze({
473
477
  "eb3593f201f570db63a9568236446d4324ee8757cda5e234965f3278d653c7db",
474
478
  ]),
475
479
  "scripts/lisa-postinstall.mjs": Object.freeze([
480
+ "864bfbdc0b089a9b97e7ff053716f52e813071faff0be220294767b65918967b",
476
481
  "98fe3adf3192a72f40eb75757193ce866f0a6123387377f6041e54d938df8d96",
477
482
  "ceb4af32ef545b73300f63e591235d2aa041a55e1ddb64c1ce84cbf6ecc67ef8",
478
483
  ]),
479
484
  "scripts/lisa-reconcile-policy.mjs": Object.freeze([
485
+ "07542e977ed41f094d5a51cae512e4a3246fabe10d0f83676a176abc81d91624",
480
486
  "3c062d0b79961a9a93a822507e893dcdaa71d65d735557727d20464c2489d812",
481
487
  "3e67eb4b0710ec195ad7efa4a8c2fd64063897d67725ea2627cf869c7e066201",
482
488
  "4b383ff960d7da53e0dd46e37632ef55c5a38b004fb4aabfe91a25a9fe02d88f",
483
489
  "9b613888c4c1cc6cc2b1fb6e162a4c766012eab0ec4f8b7f2ac1bc3da6622c97",
484
490
  "d429b5c3ad47553a73cdb2e0ea3ee81268df85d5374b06a93233d1971f7d15da",
485
491
  "f490aa56b466d961d7372f94c2fb3f0e5deb31e53212a67dd79ac4afee48d4b4",
492
+ "f89fbf8baa62519b2527d9d3a7acc637c7e2080cf5174f4b293072b1fa9c6ccf",
486
493
  ]),
487
494
  "scripts/lisa-run-gates.mjs": Object.freeze([
488
495
  "080c69ab998309a0a8b4f3be74c445056da02f1403c5654bea13477fc3178604",
489
496
  "0978ac24f28bf9f11230781d271997384009b1528ed61de523333e52a5a4cf57",
497
+ "169d1ba136e4f413dfd8b1b9e296ded55442b083ec203ca5642295186d593cb9",
490
498
  "17a6bbf39e7de014d709e3d7f74d9b555316c4d57ab017ea8bfd88f5722de64c",
491
499
  "235c541534fc0eca510135ac39b9fbd196965fbeb54d42a09fbf052da1c925cd",
492
500
  "242ac60aa8d77842e3704c5568b426084d9f2643ec9bce2a0601f66497835093",
@@ -1 +1 @@
1
- {"version":3,"file":"lisa-owned-hash-ledger.js","sourceRoot":"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
1
+ {"version":3,"file":"lisa-owned-hash-ledger.js","sourceRoot":"","sources":["../../src/core/lisa-owned-hash-ledger.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,6EAA6E;AAE7E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAE/B,MAAM,CAAC,MAAM,CAAC;IAChB,wBAAwB,EAAE,MAAM,CAAC,MAAM,CAAC;QACtC,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;KACnE,CAAC;IACF,0BAA0B,EAAE,MAAM,CAAC,MAAM,CAAC;QACxC,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;KACnE,CAAC;IACF,0BAA0B,EAAE,MAAM,CAAC,MAAM,CAAC;QACxC,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;KACnE,CAAC;IACF,0BAA0B,EAAE,MAAM,CAAC,MAAM,CAAC;QACxC,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;KACnE,CAAC;IACF,0BAA0B,EAAE,MAAM,CAAC,MAAM,CAAC;QACxC,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;KACnE,CAAC;IACF,+BAA+B,EAAE,MAAM,CAAC,MAAM,CAAC;QAC7C,kEAAkE;QAClE,kEAAkE;KACnE,CAAC;IACF,uBAAuB,EAAE,MAAM,CAAC,MAAM,CAAC;QACrC,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;KACnE,CAAC;IACF,wBAAwB,EAAE,MAAM,CAAC,MAAM,CAAC;QACtC,kEAAkE;QAClE,kEAAkE;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AC;IACF,wCAAwC,EAAE,MAAM,CAAC,MAAM,CAAC;QACtD,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;KACnE,CAAC;CACH,CAAC,CAAC;AACH,sEAAsE"}
@@ -65,4 +65,29 @@
65
65
  * @returns True when Lisa owns the file outright and may refresh it unprompted
66
66
  */
67
67
  export declare function isLisaOwnedTemplate(relativePath: string): boolean;
68
+ /**
69
+ * Whether a template declares, in its own text, that Lisa replaces it wholesale
70
+ * on every run.
71
+ *
72
+ * This is the third population, and it exists because owned/not-owned is not a
73
+ * fine enough cut. `eslint.config.ts` is not Lisa-owned by
74
+ * {@link isLisaOwnedTemplate} — no `lisa-` segment, not under `scripts/` — and
75
+ * it is nonetheless replaced every run by design, with its header saying so and
76
+ * pointing at `eslint.config.local.ts` for customisation.
77
+ *
78
+ * Before this predicate existed that contract was honoured only by accident: a
79
+ * non-owned file fell through to the prompt branch, and under `--yes` the
80
+ * prompter said yes. The same fall-through discarded curated `knip.json` and
81
+ * `tsconfig.json` content, which is the defect. Separating the two populations
82
+ * by the declaration the template already carries fixes the second without
83
+ * freezing the first — freezing it would be #2374's undeliverable-fix incident
84
+ * returning through the door opened to fix this.
85
+ *
86
+ * Read from the PACKAGED source rather than the installed copy. The declaration
87
+ * is Lisa's statement about its own file, so a host cannot opt out by deleting
88
+ * the sentence; `.lisaignore` is the sanctioned way to hold your own version.
89
+ * @param templateContents - Contents of the packaged template file
90
+ * @returns True when the template declares it is replaced on every run
91
+ */
92
+ export declare function declaresReplacedEveryRun(templateContents: string): boolean;
68
93
  //# sourceMappingURL=lisa-owned-templates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lisa-owned-templates.d.ts","sourceRoot":"","sources":["../../src/core/lisa-owned-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAQH;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAQjE"}
1
+ {"version":3,"file":"lisa-owned-templates.d.ts","sourceRoot":"","sources":["../../src/core/lisa-owned-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAQH;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAQjE;AAeD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAE1E"}
@@ -75,4 +75,43 @@ export function isLisaOwnedTemplate(relativePath) {
75
75
  .split("/")
76
76
  .some(segment => segment.startsWith(LISA_NAMESPACE_PREFIX)));
77
77
  }
78
+ /**
79
+ * The sentence a template uses to declare that Lisa replaces it on every run.
80
+ *
81
+ * Authored in the template itself, which is what makes it trustworthy: the file
82
+ * that says it is replaced is the file being replaced, so the declaration
83
+ * cannot drift away from the thing it describes the way an external roster can.
84
+ * 42 shipped templates carry it — `eslint.config.ts`, `vitest.config.ts`,
85
+ * `jest.config.ts`, `sgconfig.yml`, `lefthook.yml`, the ast-grep rule files —
86
+ * and each pairs it with the customisation surface a host is meant to use
87
+ * instead (`eslint.config.local.ts`, `*.thresholds.json`).
88
+ */
89
+ const REPLACED_EVERY_RUN_MARKER = "IS replaced on each";
90
+ /**
91
+ * Whether a template declares, in its own text, that Lisa replaces it wholesale
92
+ * on every run.
93
+ *
94
+ * This is the third population, and it exists because owned/not-owned is not a
95
+ * fine enough cut. `eslint.config.ts` is not Lisa-owned by
96
+ * {@link isLisaOwnedTemplate} — no `lisa-` segment, not under `scripts/` — and
97
+ * it is nonetheless replaced every run by design, with its header saying so and
98
+ * pointing at `eslint.config.local.ts` for customisation.
99
+ *
100
+ * Before this predicate existed that contract was honoured only by accident: a
101
+ * non-owned file fell through to the prompt branch, and under `--yes` the
102
+ * prompter said yes. The same fall-through discarded curated `knip.json` and
103
+ * `tsconfig.json` content, which is the defect. Separating the two populations
104
+ * by the declaration the template already carries fixes the second without
105
+ * freezing the first — freezing it would be #2374's undeliverable-fix incident
106
+ * returning through the door opened to fix this.
107
+ *
108
+ * Read from the PACKAGED source rather than the installed copy. The declaration
109
+ * is Lisa's statement about its own file, so a host cannot opt out by deleting
110
+ * the sentence; `.lisaignore` is the sanctioned way to hold your own version.
111
+ * @param templateContents - Contents of the packaged template file
112
+ * @returns True when the template declares it is replaced on every run
113
+ */
114
+ export function declaresReplacedEveryRun(templateContents) {
115
+ return templateContents.includes(REPLACED_EVERY_RUN_MARKER);
116
+ }
78
117
  //# sourceMappingURL=lisa-owned-templates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lisa-owned-templates.js","sourceRoot":"","sources":["../../src/core/lisa-owned-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,2EAA2E;AAC3E,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAEtC,yEAAyE;AACzE,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAEpC;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,YAAoB;IACtD,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACtD,OAAO,CACL,UAAU,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACvC,UAAU;aACP,KAAK,CAAC,GAAG,CAAC;aACV,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAC9D,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"lisa-owned-templates.js","sourceRoot":"","sources":["../../src/core/lisa-owned-templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,2EAA2E;AAC3E,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAEtC,yEAAyE;AACzE,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAEpC;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,YAAoB;IACtD,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACtD,OAAO,CACL,UAAU,CAAC,UAAU,CAAC,gBAAgB,CAAC;QACvC,UAAU;aACP,KAAK,CAAC,GAAG,CAAC;aACV,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAC9D,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,yBAAyB,GAAG,qBAAqB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,wBAAwB,CAAC,gBAAwB;IAC/D,OAAO,gBAAgB,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;AAC9D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAs4EpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CA6iPjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}
1
+ {"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAs4EpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAgjPjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}