Commit cfa7f92
feat: add paths-ignore input; default-skip vendored/fixture content (#7)
* feat: add paths-ignore input; default-skip vendored/fixture content
Adopts the provenance-aware suppression pattern established by
hyperpolymath/hypatia#243 and matched in hyperpolymath/a2ml-validate-action#7
for the K9 validator. Content-pattern validators must distinguish a target
file from a vendored / fixture / training-corpus file that legitimately
contains the very pattern being checked.
This action was firing "Pedigree block missing 'name' field" on every K9
file in vendored project trees (e.g. verified-container-spec/ consumed by
stapeln). The vendored files have their own pedigree declarations in their
upstream context.
New input `paths-ignore` (newline-separated, substring match), default-on
with the canonical RSR vendored / fixture path set. Pass '' to disable.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix: count `pedigree = {` opening brace; nested-block close no longer terminates view
When the validator detected the pedigree block start, it `continue`d
before counting that line's `{`. So depth started at 0 instead of 1,
and the next nested block's closing brace took depth back to 0 —
prematurely setting `in_pedigree=false`. Any field (name, version,
leash, signature) defined AFTER an inner block close was therefore
invisible to the validator, even when present in the file.
Repro: any K9 file where `metadata = { name = "…", …, }` is the LAST
top-level field in pedigree (the canonical RSR template shape). All 6
templates / examples in hyperpolymath/stapeln#32 hit this — the
`security = { … },` block prematurely closed pedigree before `metadata`
was reached.
Fix: drop the `continue` so the `pedigree = {` line falls through to
the brace counter. Depth now starts at 1 and tracks correctly.
Verified by mental-trace on `pedigree = { security = {…}, metadata =
{ name = … } }`:
pedigree-line: depth = 1, in_pedigree=true
security {: depth = 2
security }: depth = 1, line has `}` but depth > 0 → stay in pedigree
metadata {: depth = 2
name = …: captured at depth 2 inside pedigree → has_pedigree_name
metadata }: depth = 1
pedigree }: depth = 0 + `}` → in_pedigree=false
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 7b8244b commit cfa7f92
3 files changed
Lines changed: 92 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
60 | 73 | | |
61 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
62 | 83 | | |
63 | 84 | | |
64 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
33 | 52 | | |
34 | 53 | | |
35 | 54 | | |
| |||
51 | 70 | | |
52 | 71 | | |
53 | 72 | | |
| 73 | + | |
54 | 74 | | |
55 | 75 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
30 | 54 | | |
31 | 55 | | |
32 | 56 | | |
| |||
144 | 168 | | |
145 | 169 | | |
146 | 170 | | |
147 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
148 | 181 | | |
149 | 182 | | |
150 | 183 | | |
151 | 184 | | |
152 | | - | |
| 185 | + | |
153 | 186 | | |
154 | 187 | | |
155 | 188 | | |
| |||
250 | 283 | | |
251 | 284 | | |
252 | 285 | | |
253 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
254 | 302 | | |
255 | 303 | | |
256 | 304 | | |
| |||
0 commit comments