Skip to content

fix(tier1): make author and metadata.id requirements profile-controlled - #499

Merged
rng1995 merged 10 commits into
mainfrom
naren/author-policy-profile-controlled
Nov 13, 2026
Merged

rng1995 merged 10 commits into
mainfrom
naren/author-policy-profile-controlled

Conversation

@rng1995

@rng1995 rng1995 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #43.

The Agent Skills baseline requires only name and description, but the default profile made a missing metadata.author a HIGH blocking finding and required every present value to match Name <email@host>. That is registry publication policy, not a schema requirement, so this PR separates the two.

Measured against the 451 skills in NVIDIA/skills at d598055, validating each with the schema check:

main this PR (default)
Skills failing the schema check 251 35
… of those, failing on author alone 239 0

The 239 are 64 skills with no author and 175 using team or organization attribution such as NVIDIA Corporation, Jetson Team or NVIDIA cuOpt Team. The remaining 35 failures are unrelated (directory/name mismatches and similar) and are unchanged by this PR.

What changed

Author severity is now classified, not all-or-nothing. Each outcome has its own check name, so a policy can set them independently:

Check default registry
SCHEMA.author_missing LOW (advisory) HIGH
SCHEMA.author_without_email — a person, team or organization name INFO HIGH
SCHEMA.author_format — malformed or unsafe HIGH HIGH

A value is malformed or unsafe when it is a bare email or an email outside Name <email@host>, uses stray angle brackets, contains control or invisible formatting characters, has no letters or digits, or exceeds 256 characters. These still block under every profile, so an attempted-but-broken contact is never silently accepted as a name. A policy with an author_email_regex still needs an email in that domain, so a bare name fails its domain check.

New bundled registry profile (--profile registry) for registries with a documented publication contract: it requires a contact author and a valid metadata.id.

metadata.id now has a defined contract. It is optional and validated whenever present: an exact (unnormalized) 1–64 character lowercase ASCII slug, ^[a-z0-9]+(-[a-z0-9]+)*$. It may differ from name.

  • identity.metadata_id_requirement is ignore (default), recommend or require. It controls absence only; a present ID is always validated. An unrecognized value raises instead of silently falling back, so a typo like requre cannot make a registry believe it requires IDs.
  • Invalid and duplicate IDs are MEDIUM advisories unless the requirement is require.
  • Collection runs report an ID declared by more than one skill. validate on a catalog validates each skill separately, so uniqueness is checked across the catalog and listed in catalog-summary.json under metadata_id_conflicts (serial and --workers N paths both covered); under require each sharing skill fails.
  • Uniqueness is scoped to the skills validated together, never a registry. A single-skill run says so rather than claiming uniqueness.
  • Local catalog identity stays keyed by content_type:relative_path. Nothing migrates in this PR, per the deferral agreed in the issue thread.

Reports and the policy digest now carry metadata_id_requirement.

Compatibility

The policy digest changes for every profile, because it now includes metadata_id_requirement. An overlay that relied on the old HIGH author severities should set SCHEMA.author_missing: high and SCHEMA.author_without_email: high, or switch to --profile registry. This is called out in CHANGELOG.md.

Open question for maintainers

@chrisknvidia's comment on #43 asked @rng1995 to review the policy boundaries before implementation. Two choices here are worth a look:

  1. A name-only author is INFO rather than LOW under default. LOW would make it more visible in reports while staying non-blocking.
  2. registry is a separate bundled profile rather than documentation for a custom overlay.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests — new author classification, metadata.id contract, and catalog-conflict tests in tests/validators/test_schema.py, tests/validators/test_policy.py and tests/golden/test_policy_behavior.py
  • Updated documentation for user-visible changes (docs/tier1-validation.mdx, docs/cli-reference.mdx, docs/environment-variables.mdx, docs/github-actions.mdx, docs/gitlab-ci.mdx)
  • Ran ruff check src tests and ruff format
  • Ran the validator, CLI, golden, reporting, models, command and catalog suites: 7473 passed, 2 skipped, 1 failed. The failure (tests/reporting/test_tier3_completed_agent_docs.py::test_validate_tier3_writes_the_same_report_pair) fails identically on a clean main checkout and is unrelated to this change.
  • End-to-end CLI runs on real public skills under both profiles: a team-author skill (jetson-build-source) passes default with one INFO finding and fails registry; an author-less skill fails registry for author and ID.
  • Did not add credentials, private datasets, or proprietary benchmark content

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

🤖 Generated with Claude Code

The Agent Skills baseline requires only `name` and `description`, but the
default profile made a missing `metadata.author` a HIGH, blocking finding,
and required every present value to match `Name <email@host>`. Of the 451
skills in NVIDIA/skills, 251 failed the schema check on `main` and 239 of
those failed on author alone: 64 have no author and 175 use team or
organization attribution such as `NVIDIA cuOpt Team`. With this change 35
fail, none for author reasons.

Separate the baseline schema requirement from registry publication policy:

- A missing author is now a LOW advisory (`SCHEMA.author_missing`), and a
  person, team or organization name without an email is INFO
  (`SCHEMA.author_without_email`).
- A malformed or unsafe value still fails `SCHEMA.author_format` at HIGH: a
  bare email or an email outside `Name <email@host>`, stray angle brackets,
  control or invisible formatting characters, no letters or digits, or more
  than 256 characters. A policy with an `author_email_regex` still requires
  an email in that domain, so a bare name fails it.
- Add the bundled `registry` profile for registries with a publication
  contract: it requires `Name <email@host>` and a valid `metadata.id`.

Define the optional `metadata.id` contract: an exact 1-64 character
lowercase ASCII slug, validated whenever present. A policy sets
`identity.metadata_id_requirement` to ignore (default), recommend or
require; an unknown value is an error rather than a silent fallback.
Collection and catalog runs report an ID declared by more than one skill,
with `catalog-summary.json` carrying `metadata_id_conflicts`. Uniqueness is
scoped to the skills validated together, never a registry, and a single
skill run says so instead of claiming uniqueness. Local catalog identity
stays keyed by content type and relative path, so nothing migrates yet.

Reports and the policy digest carry `metadata_id_requirement`.

Closes #43

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
…rofile-controlled

# Conflicts:
#	docs/cli-reference.mdx

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed current head eba5e9c8630d across author classification, metadata-ID validation, policy/profile behavior, and serial/parallel catalog checks. The selected schema, policy, golden, and catalog-command suites passed 144 tests before the main-sync merge. The relevant functions are unchanged by that merge, and all four findings below were reproduced again on the current head. Reproductions use disposable local fixtures; the alias graph was capped at a safe depth, with no provider, container, or external service calls.

Comment thread src/skillevaluator/cli.py Resolved
Comment thread src/skillevaluator/cli.py Resolved
Comment thread src/skillevaluator/validators/schema.py Resolved
Comment thread src/skillevaluator/validators/schema.py Resolved
rng1995 and others added 3 commits November 13, 2026 04:53
…ID check

Two review findings on this branch.

`_display_metadata_id` called `repr()` on the raw value before truncating
the preview. `metadata.id` accepts arbitrary YAML before validation rejects
a non-string, and `repr` expands a YAML alias graph eagerly, so truncating
afterwards is too late: a 445-byte manifest with 20 doubling aliases built a
14,680,060-character string to render an 81-character `line_content`, and a
30-level graph would exhaust the validation process. A non-string value is
now described by its type alone and never rendered; the finding message
already names the offending type.

The catalog-wide duplicate-ID pass also ran unconditionally, so a catalog
run that did not select the schema check could still fail on
`SCHEMA.metadata_id_duplicate` — `validate <catalog> --checks version`
exited 1 although every per-skill run passed. It is part of the schema
check, so it now runs only when that check is enabled, in both the serial
and parallel catalog paths.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
…ection

v0.9.0 was tagged while this branch was open, so merging main left the
entry inside the published 0.9.0 notes. That rewrote released notes to
describe behavior the tag does not contain, and would have left the next
release with no mention of the breaking SCHEMA.author_missing severity
change or the new registry profile.

The released sections are now byte-identical to main; the entry is under
Unreleased as its own Changed section.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of author/metadata.id policy, the new registry profile, and the serial and parallel catalog duplicate-ID paths.

6 findings (1 P2, 5 P3). Each was produced by a reviewer, then checked by a separate adversarial pass that re-ran the claim and corrected or discarded what it could not reproduce; unsupported findings were dropped before posting.

1 of these is already addressed on the branch and is marked inline.

These threads are resolved for triage. Resolution records that the finding has been read and routed, not that it is fixed — anything still open is listed in the PR description or carried to follow-up work.

Comment thread CHANGELOG.md Resolved
Comment thread docs/tier1-validation.mdx Resolved
Comment thread src/skillevaluator/cli.py Resolved
Comment thread src/skillevaluator/validators/schema.py Resolved
Comment thread src/skillevaluator/validators/schema.py Resolved
Comment thread src/skillevaluator/validators/schema.py Resolved
@rng1995
rng1995 merged commit be88fa8 into main Nov 13, 2026
27 checks passed
@rng1995
rng1995 deleted the naren/author-policy-profile-controlled branch November 13, 2026 18:11
rng1995 added a commit that referenced this pull request Nov 13, 2026
…513)

* fix(tier1): finish the author and metadata.id review round from #499

#499 was squash-merged while this round of review fixes was still in
flight, so these arrive separately from the code they correct. Two of them
are live defects in main.

The author character guard matched all of Unicode category C, which also
covers ZWNJ (U+200C) and ZWJ (U+200D). Persian, Arabic and Devanagari
names need those joiners to render, so a legitimate name failed
SCHEMA.author_format at HIGH under both bundled profiles, as did a soft
hyphen and any code point unassigned in the running interpreter's Unicode
data -- which made the verdict depend on the interpreter's version rather
than on the value, and made the message untrue of what it rejected. The
guard now takes Cc/Cs/Co plus an explicit set of bidirectional marks,
embeddings, overrides, isolates and the byte-order mark.

The bare-email pattern required a dotted domain, so root@buildhost and
jane@example took the plain-attribution path and were reported as "Author
has no email address" -- plainly false of a value that is nothing but an
address, and the opposite verdict from [email protected] for the same
shape. The discriminator is now a word character on each side of the @,
which keeps a social handle such as Jane Doe (@JDoe), a bare @JDoe and
Platform Team @ Example clean, and also catches a non-ASCII local part
that the old pattern's successor would have missed.

Collection validation already preserved a passing skill's advisories, but
carried the findings unchanged, so nothing said which member produced one.
merge_advisories_with_prefix names the skill in the finding's location and
in metadata.collection_skill, and never touches passed, so an advisory
stays advisory. The per-skill roll-up no longer claims every check passed
next to a list of that skill's advisories.

A catalog-summary.json entry already carried the member verdict and the
severity bump from a duplicate metadata.id, but a catalog validates each
skill on its own, so nothing in that skill's output said what caused
either. The entry now lists them under catalog_findings.

Adds the two tests the review asked for with no behaviour change: a
well-formed author outside an author_email_regex domain (the shape_ok=True
half of that branch, which nothing covered), and the catalog failure dedup
guard asserting "2/2 skills failed validation" rather than "3/2" when a
skill carries both its own failure and a shared ID.

docs/tier1-validation.mdx described neither the narrowed guard nor the
report_verdict / report_scope shape #499 shipped; both are now documented.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(tier3): keep the behavior gate for an expectation's unchecked prose half

Review follow-up on #511. _expected_behaviors_verified settled an expectation
whenever every checkable token it named was observed, so one that also asked
for something only the final answer could show was settled by the artifact
alone: "writes `report.py` and explains why each column was dropped" lifted
the gate although the second half was never checked. That inverts the defect
#511 set out to fix -- instead of discarding a score the evidence supports, it
kept one the evidence does not.

Every clause of an expectation must now name a checkable artifact of its own.
Clauses are split on the ordinary joiners (and, then, also, plus, as well as,
while, before, after, a semicolon, or a sentence break), never on a bare dot,
so an artifact path keeps its extension. A clause naming nothing checkable
keeps the gate, exactly as a wholly prose expectation already did.

The split is deliberately generous: an unrecognized clause shape reads as
prose and keeps the gate, which withholds a score. Lifting the gate wrongly
keeps a score the evidence does not support, so the two errors are not
symmetric and the ambiguous case belongs on the withholding side.

Tests cover the pure-artifact, pure-prose, unobserved-artifact and mixed
forms across each joiner, plus the end-to-end path through
behavior_evidence_gap. Removing the clause check fails five of them.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Signed-off-by: Narendran Raghavan <[email protected]>
Co-authored-by: Claude Opus 5 <[email protected]>
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.

policy: make metadata.author and metadata.id requirements profile-controlled

1 participant