Skip to content

feat: add paths-ignore input; default-skip vendored/fixture content#7

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/paths-ignore-input
May 14, 2026
Merged

feat: add paths-ignore input; default-skip vendored/fixture content#7
hyperpolymath merged 1 commit into
mainfrom
feat/paths-ignore-input

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Adopts the provenance-aware suppression pattern established by hyperpolymath/hypatia#243 for this validator. Content-pattern validators must distinguish a target file from a vendored / fixture / training-corpus file that legitimately contains the very pattern being checked.

Motivation

This action was firing 'Missing required identity field' on every .a2ml file in vendored project trees (e.g. verified-container-spec/ consumed by hyperpolymath/stapeln). Those manifests have their own identity declarations in their upstream context — flagging them here is provenance noise.

What's new

New input paths-ignore (newline-separated, substring match), default-on with the canonical RSR vendored / fixture path set:

  • vendor/, vendored/
  • verified-container-spec/
  • .audittraining/
  • integration/fixtures/, test/fixtures/, tests/fixtures/

Pass an empty string to disable and scan everything.

Test plan

  • Consume from hyperpolymath/stapeln; verify the 43 A2ML errors in verified-container-spec/ are now skipped
  • Verify a real top-level .a2ml missing identity still errors
  • Confirm the ::notice::Skipped N file(s) annotation appears in the action log

🤖 Generated with Claude Code

Validators that scan content patterns must distinguish a target file from
a vendored / fixture / training-corpus file that legitimately contains
the very pattern being checked. Same architectural lesson as
hyperpolymath/hypatia#243 — that scanner had 11/11 `secret_detected`
findings turn out to be FPs in `.audittraining/`, `lib/rules/`,
`scripts/fix-scripts/`, and `test/` paths until provenance was added.

This action was firing "Missing required identity field" on every .a2ml
file in `verified-container-spec/` (a vendored project tree) consumed by
stapeln and other sibling repos. The vendored manifests have their own
identity declarations in their upstream context — flagging them here is
noise that no consumer can usefully act on.

New input:

  paths-ignore: |
    vendor/
    vendored/
    verified-container-spec/
    .audittraining/
    integration/fixtures/
    test/fixtures/
    tests/fixtures/

Newline-separated, substring match against each candidate file's path,
default-on so consumers benefit without editing every workflow. Pass an
empty string to disable.

README updated with rationale + usage. validate-a2ml.sh prints a notice
for each skipped file count so the carve-out is auditable in the action log.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
hyperpolymath added a commit to hyperpolymath/stapeln that referenced this pull request May 14, 2026
The 6 A2ML manifests under verified-container-spec/.machine_readable/6a2/
and the 6 K9 templates/examples under .machine_readable/svc/k9/ were
firing identity-field validation errors on every CI run, blocking
#32 (and any other PR) from going green.

Two parallel fixes:

  * A2ML: added `name = "verified-container-spec/<file>"` inside the
    [metadata] section of META, NEUROSYM, PLAYBOOK, AGENTIC (the 4 that
    lacked any top-level identity). STATE and ECOSYSTEM already had
    `project` / `name` respectively; left untouched.

  * K9 templates/examples: hoisted a `name = "k9-template/<level>"` or
    `name = "k9-example/<name>"` field to the top of each pedigree block,
    immediately after `schema_version`. Works around a brace-counting
    edge in hyperpolymath/k9-validate-action's pedigree-block detector:
    when `pedigree = {` opens, the validator doesn't count the opening
    brace from that line, so a subsequent `security = { ... },` closing
    brace prematurely terminates the validator's view of the pedigree
    block — making `metadata.name` invisible. The hoisted top-level
    `pedigree.name` is captured at depth 1 before any nested block,
    so it's seen regardless of the bug. The underlying bug is being
    addressed upstream in k9-validate-action#7.

Both classes of error will also be self-suppressing once stapeln bumps
its action pins to consume the new `paths-ignore` input being added in
hyperpolymath/a2ml-validate-action#7 + hyperpolymath/k9-validate-action#7
(vendored / training-corpus paths default-skipped). The fixes here are
belt-and-suspenders — independent of those upstream merges, so stapeln
#32 can go green today rather than waiting on the dependency chain.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
hyperpolymath added a commit to hyperpolymath/stapeln that referenced this pull request May 14, 2026
The 6 A2ML manifests under verified-container-spec/.machine_readable/6a2/
and the 6 K9 templates/examples under .machine_readable/svc/k9/ were
firing identity-field validation errors on every CI run, blocking
#32 (and any other PR) from going green.

Two parallel fixes:

  * A2ML: added `name = "verified-container-spec/<file>"` inside the
    [metadata] section of META, NEUROSYM, PLAYBOOK, AGENTIC (the 4 that
    lacked any top-level identity). STATE and ECOSYSTEM already had
    `project` / `name` respectively; left untouched.

  * K9 templates/examples: hoisted a `name = "k9-template/<level>"` or
    `name = "k9-example/<name>"` field to the top of each pedigree block,
    immediately after `schema_version`. Works around a brace-counting
    edge in hyperpolymath/k9-validate-action's pedigree-block detector:
    when `pedigree = {` opens, the validator doesn't count the opening
    brace from that line, so a subsequent `security = { ... },` closing
    brace prematurely terminates the validator's view of the pedigree
    block — making `metadata.name` invisible. The hoisted top-level
    `pedigree.name` is captured at depth 1 before any nested block,
    so it's seen regardless of the bug. The underlying bug is being
    addressed upstream in k9-validate-action#7.

Both classes of error will also be self-suppressing once stapeln bumps
its action pins to consume the new `paths-ignore` input being added in
hyperpolymath/a2ml-validate-action#7 + hyperpolymath/k9-validate-action#7
(vendored / training-corpus paths default-skipped). The fixes here are
belt-and-suspenders — independent of those upstream merges, so stapeln
#32 can go green today rather than waiting on the dependency chain.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@hyperpolymath hyperpolymath merged commit 5483b67 into main May 14, 2026
15 of 17 checks passed
@hyperpolymath hyperpolymath deleted the feat/paths-ignore-input branch May 14, 2026 12:22
hyperpolymath added a commit to hyperpolymath/k9-validate-action that referenced this pull request May 14, 2026
* 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>
hyperpolymath added a commit to hyperpolymath/stapeln that referenced this pull request May 14, 2026
…h/hypatia#213) (#32)

* fix(ci): hypatia-scan.yml -- pass GITHUB_TOKEN, use --exit-zero (hyperpolymath/hypatia#213)

The Hypatia Security Scan workflow exits 1 on any findings (>= medium)
because lib/hypatia/cli.ex halts with System.halt(1). Under `set -e`,
that short-circuits the step before jq/artifact-upload/PR-comment run.

Mirrors hyperpolymath/hypatia#228:
* pass GITHUB_TOKEN so the Dependabot rule stops warning
* append --exit-zero so the downstream critical/high gate stays
  the explicit gate
* bump actions/upload-artifact to v4.6.2 (ea165f8d) to match the
  estate-wide pin

See hyperpolymath/hypatia#213 for the diagnosis.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(ci): bump erlef/setup-beam to fc68ffb (ubuntu24 support)

Follow-up commit on PR #32. The Hypatia Neurosymbolic Analysis check has been failing because `erlef/setup-beam@2f0cc07b…` doesn't know how to map `ImageOS=ubuntu24` (only knows ubuntu18/20/22). Without the bootstrap, the `--exit-zero` change in this PR never gets exercised.

Bumping the pin to `fc68ffb90438ef2936bbb3251622353b3dcb2f93` (matches the pin currently in hyperpolymath/hypatia upstream, dated 2026-03-30, adds ubuntu24 → ubuntu-24.04 mapping).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

* fix(manifests): add top-level identity to vendored A2ML + K9 templates

The 6 A2ML manifests under verified-container-spec/.machine_readable/6a2/
and the 6 K9 templates/examples under .machine_readable/svc/k9/ were
firing identity-field validation errors on every CI run, blocking
#32 (and any other PR) from going green.

Two parallel fixes:

  * A2ML: added `name = "verified-container-spec/<file>"` inside the
    [metadata] section of META, NEUROSYM, PLAYBOOK, AGENTIC (the 4 that
    lacked any top-level identity). STATE and ECOSYSTEM already had
    `project` / `name` respectively; left untouched.

  * K9 templates/examples: hoisted a `name = "k9-template/<level>"` or
    `name = "k9-example/<name>"` field to the top of each pedigree block,
    immediately after `schema_version`. Works around a brace-counting
    edge in hyperpolymath/k9-validate-action's pedigree-block detector:
    when `pedigree = {` opens, the validator doesn't count the opening
    brace from that line, so a subsequent `security = { ... },` closing
    brace prematurely terminates the validator's view of the pedigree
    block — making `metadata.name` invisible. The hoisted top-level
    `pedigree.name` is captured at depth 1 before any nested block,
    so it's seen regardless of the bug. The underlying bug is being
    addressed upstream in k9-validate-action#7.

Both classes of error will also be self-suppressing once stapeln bumps
its action pins to consume the new `paths-ignore` input being added in
hyperpolymath/a2ml-validate-action#7 + hyperpolymath/k9-validate-action#7
(vendored / training-corpus paths default-skipped). The fixes here are
belt-and-suspenders — independent of those upstream merges, so stapeln
#32 can go green today rather than waiting on the dependency chain.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant