@codyswann/lisa 3.33.7 → 3.33.8

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 (64) hide show
  1. package/all/copy-overwrite/scripts/lisa-gates.mjs +35 -3
  2. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +6 -0
  3. package/dist/configs/eslint/base.d.ts.map +1 -1
  4. package/dist/configs/eslint/base.js +8 -0
  5. package/dist/configs/eslint/base.js.map +1 -1
  6. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  7. package/dist/core/lisa-owned-hash-ledger.js +2 -0
  8. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  9. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  10. package/dist/core/upstream-evidence-manifest.js +5 -4
  11. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  12. package/eslint-plugin-component-structure/rules/enforce-component-structure.js +63 -43
  13. package/package.json +2 -1
  14. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  15. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  16. package/plugins/lisa-agy/plugin.json +1 -1
  17. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  19. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  20. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  24. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  26. package/plugins/lisa-expo-agy/plugin.json +1 -1
  27. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  31. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  32. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  36. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  37. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  41. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  42. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  46. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  47. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-rails-agy/plugin.json +1 -1
  52. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  56. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  57. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  62. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  64. package/typescript/copy-contents/.husky/pre-push +88 -1
@@ -11,7 +11,74 @@ if ! command -v node >/dev/null 2>&1; then
11
11
  echo "❌ Push blocked: Node.js is required to validate tracker work items."
12
12
  exit 1
13
13
  fi
14
- node "$WORK_ITEM_SCRIPT" validate-push "${1:-origin}" || exit 1
14
+ # ---------------------------------------------------------------------------
15
+ # Work-item traceability, at the push moment.
16
+ #
17
+ # This call used to be unconditional, and it was the last check in either hook
18
+ # that ran outside the gate facade: `gates.traceability` could say `off` and it
19
+ # still ran, could say `required` and nothing changed. That is the defect #2680
20
+ # measured in CI, one moment earlier. The declaration decides now, and this is
21
+ # the FALLBACK:
22
+ #
23
+ # declared at push, at any level -> the registry owns the property. The gate
24
+ # runner below runs what the project
25
+ # declared, and this step stands down.
26
+ # not declared, or the registry
27
+ # cannot be read at all -> this runs, exactly as it always has. A
28
+ # project that has declared nothing loses
29
+ # no protection whatsoever.
30
+ #
31
+ # `off` needs no third branch, for the same reason it needed none in CI: an off
32
+ # declaration is still a declaration, the runner records it as covered, and the
33
+ # built-in step stands down having correctly done nothing. What is refused is
34
+ # the shape where this step runs and its exit code is discarded — a check that
35
+ # reports green having proved nothing is the defect the facade exists to remove.
36
+ #
37
+ # WHY THE DECISION IS RESOLVED HERE rather than read from the coverage file the
38
+ # other built-in steps consult. This step must run BEFORE the GIT_* set is
39
+ # unset below, and before anything else reads the hook's stdin, because Git
40
+ # feeds the refs being pushed in on stdin and that is what the validator parses.
41
+ # No coverage file exists this early, so the declaration is resolved directly.
42
+ # That makes deferring only half a decision; the other half is further down,
43
+ # where this runs after all if the registry never actually proved it.
44
+ # ---------------------------------------------------------------------------
45
+ GATE_REGISTRY=""
46
+ for LISA_GATE_REGISTRY_CANDIDATE in \
47
+ "node_modules/@codyswann/lisa/all/copy-overwrite/scripts/lisa-gates.mjs" \
48
+ "scripts/lisa-gates.mjs" \
49
+ "all/copy-overwrite/scripts/lisa-gates.mjs"
50
+ do
51
+ if [ -f "$LISA_GATE_REGISTRY_CANDIDATE" ]; then
52
+ GATE_REGISTRY="$LISA_GATE_REGISTRY_CANDIDATE"
53
+ break
54
+ fi
55
+ done
56
+ unset LISA_GATE_REGISTRY_CANDIDATE
57
+
58
+ # Nothing here discards stderr. A resolver that failed and a project that
59
+ # declared nothing produce the same empty answer, and both send this hook to the
60
+ # built-in step — which is the safe direction — but only one of them is a
61
+ # problem somebody needs to see.
62
+ TRACEABILITY_DECLARED=""
63
+ if [ -n "$GATE_REGISTRY" ]; then
64
+ TRACEABILITY_DECLARED=$(node "$GATE_REGISTRY" list --moment=push --json --include-off | node -e '
65
+ let raw = "";
66
+ process.stdin.on("data", chunk => { raw += chunk }).on("end", () => {
67
+ try {
68
+ const declared = JSON.parse(raw || "[]").some(gate => gate.id === "traceability");
69
+ process.stdout.write(declared ? "declared" : "");
70
+ } catch (error) {
71
+ process.stderr.write(`\u26a0\ufe0f Could not read the gate registry: ${error.message}\n`);
72
+ }
73
+ });
74
+ ')
75
+ fi
76
+
77
+ if [ "$TRACEABILITY_DECLARED" = "declared" ]; then
78
+ echo "ℹ️ gates.traceability is declared at push; the gate registry decides what runs."
79
+ else
80
+ node "$WORK_ITEM_SCRIPT" validate-push "${1:-origin}" || exit 1
81
+ fi
15
82
 
16
83
  # Git supplies repository-local GIT_* variables to hooks. Keep them for push
17
84
  # validation above, then remove exactly Git's documented local set so nested
@@ -117,6 +184,26 @@ lisa_gate_covers() {
117
184
  # BEGIN: built-in checks — the pre-registry path, kept step for step so a
118
185
  # project without a `gates` block behaves exactly as it did before.
119
186
 
187
+ # Work-item traceability, when the registry took the property and then proved
188
+ # nothing with it — no runner on disk, a runner that could not run, a coverage
189
+ # file that could not be written. Each of those means nothing was proved, and a
190
+ # declared gate must never be a quieter way of turning a check off than
191
+ # declaring it `off`.
192
+ #
193
+ # A late run is not identical to the early one: the repository-local GIT_*
194
+ # variables are gone by here, and a declared gate that read stdin has already
195
+ # consumed the pushed refs. `validate-push` survives both — with empty stdin it
196
+ # falls back to `git rev-list HEAD --not --remotes=<remote>` — which is what
197
+ # makes a degraded run worth having, and why the early position stays the
198
+ # normal one.
199
+ if lisa_gate_covers traceability; then
200
+ echo "ℹ️ Covered by the traceability gate; the built-in work-item validation stands down."
201
+ elif [ "$TRACEABILITY_DECLARED" = "declared" ]; then
202
+ echo "⚠️ gates.traceability is declared at push, but the gate registry proved nothing here."
203
+ echo " Running the built-in work-item validation so the property is not lost."
204
+ node "$WORK_ITEM_SCRIPT" validate-push "${1:-origin}" || exit 1
205
+ fi
206
+
120
207
  # Run the whole-project type check once before code leaves the machine. It is
121
208
  # intentionally not a pre-commit gate because TypeScript cannot check only the
122
209
  # staged files and rebuilding the full program makes small commits too slow.