@codyswann/lisa 3.47.1 → 3.47.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  2. package/dist/core/lisa-owned-hash-ledger.js +2 -0
  3. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  4. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  5. package/dist/core/upstream-evidence-manifest.js +4 -3
  6. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  7. package/package.json +1 -1
  8. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  9. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  10. package/plugins/lisa/hooks/threshold-ratchet-compare.mjs +41 -2
  11. package/plugins/lisa-agy/plugin.json +1 -1
  12. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  15. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  16. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-copilot/hooks/threshold-ratchet-compare.mjs +41 -2
  19. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-cursor/hooks/threshold-ratchet-compare.mjs +41 -2
  21. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  23. package/plugins/lisa-expo-agy/plugin.json +1 -1
  24. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  28. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  29. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  33. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  34. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  38. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  39. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  43. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  44. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  48. package/plugins/lisa-rails-agy/plugin.json +1 -1
  49. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  53. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  54. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  58. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  59. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  61. package/plugins/src/base/hooks/threshold-ratchet-compare.mjs +41 -2
  62. package/rails/copy-overwrite/scripts/threshold-ratchet-compare.mjs +41 -2
  63. package/typescript/copy-overwrite/scripts/threshold-ratchet-compare.mjs +41 -2
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "3.47.1",
3
+ "version": "3.47.2",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "3.47.1",
3
+ "version": "3.47.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "3.47.1",
3
+ "version": "3.47.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "3.47.1",
3
+ "version": "3.47.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -28,7 +28,7 @@ const KIND_ALLOW_LIST = "allow-list";
28
28
  * @typedef {object} Finding
29
29
  * @property {string} file Repo-relative path of the gate file
30
30
  * @property {string} key Dotted key path within the file
31
- * @property {"weakened"|"removed"|"exemption-added"|"file-deleted"|"allow-added"|"unparseable"} type
31
+ * @property {"weakened"|"removed"|"exemption-added"|"file-deleted"|"allow-added"|"unparseable"|"unparseable-baseline"} type
32
32
  * Which ratchet rule the change violated
33
33
  * @property {number|string} [base] Baseline value
34
34
  * @property {number|string} [current] Current value
@@ -49,6 +49,25 @@ function unparseable(relPath) {
49
49
  };
50
50
  }
51
51
 
52
+ /**
53
+ * Build the "baseline could not be parsed" finding.
54
+ *
55
+ * Separate from `unparseable` because the two send an operator to different
56
+ * files. Told only that `vitest.thresholds.json` is not valid JSON, they open
57
+ * the current file, find it well-formed, and conclude the gate is broken; the
58
+ * defect is at the base ref.
59
+ * @param {string} relPath Repo-relative path
60
+ * @returns {Finding} The unparseable-baseline finding
61
+ */
62
+ function unparseableBaseline(relPath) {
63
+ return {
64
+ file: relPath,
65
+ key: "*",
66
+ type: "unparseable-baseline",
67
+ message: `${relPath} is not valid JSON in the baseline — with no baseline to compare against, the ratchet cannot see a loosening in this file and will not see one in any later change either, until the baseline is repaired. A UTF-8 BOM, a trailing comma or an empty file all land here.`,
68
+ };
69
+ }
70
+
52
71
  /**
53
72
  * Compare two constraint maps: report removals and direction violations.
54
73
  * @param {string} relPath Repo-relative path the constraints came from
@@ -242,7 +261,27 @@ export function compareFile(relPath, baselineText, currentText) {
242
261
 
243
262
  const base = parseJson(baselineText);
244
263
  const current = parseJson(currentText);
245
- if (base === undefined) return [];
264
+ // Both sides are reported, and both used to not be. An unparseable baseline
265
+ // returned no findings at all, which did not merely miss one change: once a
266
+ // malformed threshold file is on the base branch, every later pull request
267
+ // compares against a baseline that yields no constraints, so the ratchet
268
+ // stops having an opinion about that file — permanently, and in silence.
269
+ //
270
+ // This is only reached for a file that EXISTS at the baseline and did not
271
+ // parse. A file absent from the base ref arrives as a null `baselineText`
272
+ // and returned above: new gate files have nothing to weaken, and the caller
273
+ // separates absent from present-but-unreadable with `cat-file -e` before
274
+ // calling.
275
+ //
276
+ // The allow-list carve-out is symmetric with the current side and holds for
277
+ // the same reason: an allow list nobody can read grants no exceptions, so an
278
+ // unreadable one on either side already fails closed. Reporting it would
279
+ // block every change touching the file without making anything safer.
280
+ if (base === undefined) {
281
+ return family.kind === KIND_ALLOW_LIST
282
+ ? []
283
+ : [unparseableBaseline(relPath)];
284
+ }
246
285
  if (current === undefined) {
247
286
  return family.kind === KIND_ALLOW_LIST ? [] : [unparseable(relPath)];
248
287
  }
@@ -31,7 +31,7 @@ const KIND_ALLOW_LIST = "allow-list";
31
31
  * @typedef {object} Finding
32
32
  * @property {string} file Repo-relative path of the gate file
33
33
  * @property {string} key Dotted key path within the file
34
- * @property {"weakened"|"removed"|"exemption-added"|"file-deleted"|"allow-added"|"unparseable"} type
34
+ * @property {"weakened"|"removed"|"exemption-added"|"file-deleted"|"allow-added"|"unparseable"|"unparseable-baseline"} type
35
35
  * Which ratchet rule the change violated
36
36
  * @property {number|string} [base] Baseline value
37
37
  * @property {number|string} [current] Current value
@@ -52,6 +52,25 @@ function unparseable(relPath) {
52
52
  };
53
53
  }
54
54
 
55
+ /**
56
+ * Build the "baseline could not be parsed" finding.
57
+ *
58
+ * Separate from `unparseable` because the two send an operator to different
59
+ * files. Told only that `vitest.thresholds.json` is not valid JSON, they open
60
+ * the current file, find it well-formed, and conclude the gate is broken; the
61
+ * defect is at the base ref.
62
+ * @param {string} relPath Repo-relative path
63
+ * @returns {Finding} The unparseable-baseline finding
64
+ */
65
+ function unparseableBaseline(relPath) {
66
+ return {
67
+ file: relPath,
68
+ key: "*",
69
+ type: "unparseable-baseline",
70
+ message: `${relPath} is not valid JSON in the baseline — with no baseline to compare against, the ratchet cannot see a loosening in this file and will not see one in any later change either, until the baseline is repaired. A UTF-8 BOM, a trailing comma or an empty file all land here.`,
71
+ };
72
+ }
73
+
55
74
  /**
56
75
  * Compare two constraint maps: report removals and direction violations.
57
76
  * @param {string} relPath Repo-relative path the constraints came from
@@ -245,7 +264,27 @@ export function compareFile(relPath, baselineText, currentText) {
245
264
 
246
265
  const base = parseJson(baselineText);
247
266
  const current = parseJson(currentText);
248
- if (base === undefined) return [];
267
+ // Both sides are reported, and both used to not be. An unparseable baseline
268
+ // returned no findings at all, which did not merely miss one change: once a
269
+ // malformed threshold file is on the base branch, every later pull request
270
+ // compares against a baseline that yields no constraints, so the ratchet
271
+ // stops having an opinion about that file — permanently, and in silence.
272
+ //
273
+ // This is only reached for a file that EXISTS at the baseline and did not
274
+ // parse. A file absent from the base ref arrives as a null `baselineText`
275
+ // and returned above: new gate files have nothing to weaken, and the caller
276
+ // separates absent from present-but-unreadable with `cat-file -e` before
277
+ // calling.
278
+ //
279
+ // The allow-list carve-out is symmetric with the current side and holds for
280
+ // the same reason: an allow list nobody can read grants no exceptions, so an
281
+ // unreadable one on either side already fails closed. Reporting it would
282
+ // block every change touching the file without making anything safer.
283
+ if (base === undefined) {
284
+ return family.kind === KIND_ALLOW_LIST
285
+ ? []
286
+ : [unparseableBaseline(relPath)];
287
+ }
249
288
  if (current === undefined) {
250
289
  return family.kind === KIND_ALLOW_LIST ? [] : [unparseable(relPath)];
251
290
  }
@@ -31,7 +31,7 @@ const KIND_ALLOW_LIST = "allow-list";
31
31
  * @typedef {object} Finding
32
32
  * @property {string} file Repo-relative path of the gate file
33
33
  * @property {string} key Dotted key path within the file
34
- * @property {"weakened"|"removed"|"exemption-added"|"file-deleted"|"allow-added"|"unparseable"} type
34
+ * @property {"weakened"|"removed"|"exemption-added"|"file-deleted"|"allow-added"|"unparseable"|"unparseable-baseline"} type
35
35
  * Which ratchet rule the change violated
36
36
  * @property {number|string} [base] Baseline value
37
37
  * @property {number|string} [current] Current value
@@ -52,6 +52,25 @@ function unparseable(relPath) {
52
52
  };
53
53
  }
54
54
 
55
+ /**
56
+ * Build the "baseline could not be parsed" finding.
57
+ *
58
+ * Separate from `unparseable` because the two send an operator to different
59
+ * files. Told only that `vitest.thresholds.json` is not valid JSON, they open
60
+ * the current file, find it well-formed, and conclude the gate is broken; the
61
+ * defect is at the base ref.
62
+ * @param {string} relPath Repo-relative path
63
+ * @returns {Finding} The unparseable-baseline finding
64
+ */
65
+ function unparseableBaseline(relPath) {
66
+ return {
67
+ file: relPath,
68
+ key: "*",
69
+ type: "unparseable-baseline",
70
+ message: `${relPath} is not valid JSON in the baseline — with no baseline to compare against, the ratchet cannot see a loosening in this file and will not see one in any later change either, until the baseline is repaired. A UTF-8 BOM, a trailing comma or an empty file all land here.`,
71
+ };
72
+ }
73
+
55
74
  /**
56
75
  * Compare two constraint maps: report removals and direction violations.
57
76
  * @param {string} relPath Repo-relative path the constraints came from
@@ -245,7 +264,27 @@ export function compareFile(relPath, baselineText, currentText) {
245
264
 
246
265
  const base = parseJson(baselineText);
247
266
  const current = parseJson(currentText);
248
- if (base === undefined) return [];
267
+ // Both sides are reported, and both used to not be. An unparseable baseline
268
+ // returned no findings at all, which did not merely miss one change: once a
269
+ // malformed threshold file is on the base branch, every later pull request
270
+ // compares against a baseline that yields no constraints, so the ratchet
271
+ // stops having an opinion about that file — permanently, and in silence.
272
+ //
273
+ // This is only reached for a file that EXISTS at the baseline and did not
274
+ // parse. A file absent from the base ref arrives as a null `baselineText`
275
+ // and returned above: new gate files have nothing to weaken, and the caller
276
+ // separates absent from present-but-unreadable with `cat-file -e` before
277
+ // calling.
278
+ //
279
+ // The allow-list carve-out is symmetric with the current side and holds for
280
+ // the same reason: an allow list nobody can read grants no exceptions, so an
281
+ // unreadable one on either side already fails closed. Reporting it would
282
+ // block every change touching the file without making anything safer.
283
+ if (base === undefined) {
284
+ return family.kind === KIND_ALLOW_LIST
285
+ ? []
286
+ : [unparseableBaseline(relPath)];
287
+ }
249
288
  if (current === undefined) {
250
289
  return family.kind === KIND_ALLOW_LIST ? [] : [unparseable(relPath)];
251
290
  }