@webpieces/rules-config 0.4.630 → 0.4.631

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webpieces/rules-config",
3
- "version": "0.4.630",
3
+ "version": "0.4.631",
4
4
  "description": "Shared webpieces.config.json loader. Single source of truth for validation rule configuration consumed by @webpieces/ai-hook-rules, @webpieces/code-rules, and @webpieces/nx-webpieces-rules.",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
@@ -10,15 +10,21 @@ reading this, one of the faults below fired and named this file.
10
10
 
11
11
  ## The faults
12
12
 
13
- | code | fault | detected by | enforced in |
14
- |---|---|---|---|
15
- | `D` | version drift root package.json pin != installed version | sh, before the bin runs | sh |
16
- | `X` | guard bin missing (fresh clone / new worktree / package removed) | sh, before the bin runs | sh |
17
- | `U` | guard bin missing AND @webpieces/ai-hook-rules is not declared in package.json | sh, before the bin runs | sh |
18
- | `K` | guard bin present but CRASHED (exit code not 0 or 2 — corrupt node_modules) | sh, before the bin runs | sh |
19
- | `S` | a webpieces-managed hook file, the .claude/settings.json registration or its managed env entry does not match this release | the guard bin | JS |
20
- | `C` | webpieces.config.json missing | the guard bin | JS |
21
- | `Y` | a loaded rule has no webpieces.config.json key | the guard bin | JS |
13
+ THE JOIN KEYS ARE `guard`, `fault=` and `row=`. Every L0 deny opens
14
+ `[<guard>] (layer=L0 fault=<code> row=3, …)`, and every audit line — from BOTH halves of L0, the
15
+ `sh` shim and the guard bin carries `layer=L0 row=<n> fault=<code>`. So one grep lands you in
16
+ the deny, the log line and the row below. The guard names come from `L0_FAULT_NAMES` and the row
17
+ numbers from `L0_ROW_*`, both spelled in exactly one place (`core/l0-fault-codes.ts`).
18
+
19
+ | code | guard | fault | detected by | enforced in |
20
+ |---|---|---|---|---|
21
+ | `D` | `version-drift` | version drift root package.json pin != installed version | sh, before the bin runs | sh |
22
+ | `X` | `guard-bin-missing` | guard bin missing (fresh clone / new worktree / package removed) | sh, before the bin runs | sh |
23
+ | `U` | `guard-pkg-undeclared` | guard bin missing AND @webpieces/ai-hook-rules is not declared in package.json | sh, before the bin runs | sh |
24
+ | `K` | `guard-bin-crashed` | guard bin present but CRASHED (exit code not 0 or 2 — corrupt node_modules) | sh, before the bin runs | sh |
25
+ | `S` | `managed-hook-surface` | a webpieces-managed hook file, the .claude/settings.json registration or its managed env entry does not match this release | the guard bin | JS |
26
+ | `C` | `config-missing` | webpieces.config.json missing | the guard bin | JS |
27
+ | `Y` | `config-out-of-sync` | a loaded rule has no webpieces.config.json key | the guard bin | JS |
22
28
 
23
29
  First match wins. `D`/`X`/`U`/`K` are decided in POSIX `sh` inside the committed shim, BEFORE the
24
30
  guard bin runs — a stale, missing or broken validator cannot be trusted to validate itself.
@@ -70,6 +76,10 @@ L0 has NO genuine second dimension. Every branch reduces to one question:
70
76
  | 2 | any | yes | PASS or ALLOW (see the entry) |
71
77
  | 3 | any | no | BLOCK — **only the message varies by fault** |
72
78
 
79
+ Row 3 is the only row that blocks, so every L0 deny cites it — `row=3` in the
80
+ deny header, `row=3` on the audit line, and this row here. Same numbers as L1 uses for
81
+ its own rows (see `L1_ROWS`), and for the same reason: a row number is IDENTITY, so it is never reused.
82
+
73
83
  The tool is not a dimension either: "any Read" is an allowlist ENTRY, not a tool check.
74
84
 
75
85
  ## The allowlist