Skip to content

feat(tier1): accept a list of values for metadata.domain - #279

Merged
rng1995 merged 4 commits into
mainfrom
naren/port-metadata-multi-domain
Nov 3, 2026
Merged

rng1995 merged 4 commits into
mainfrom
naren/port-metadata-multi-domain

Conversation

@rng1995

@rng1995 rng1995 commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Tier 1 schema validation now accepts several categories under metadata.domain in SKILL.md, for example domain: [backend, ai-ml]. A single string still works.

  • Model (models/skill.py). SkillMetadata.domain is now list[str] (default []) with a normalize_domain before-validator:
    • A string becomes a one-item list. A missing, null, empty, or whitespace-only value becomes [].
    • Entries are trimmed and deduplicated in their original order.
    • New bounds DOMAIN_MAX_ITEMS = 16 (checked on the raw list, before deduplication) and DOMAIN_MAX_LENGTH = 128.
    • Non-string entries, blank entries, over-long entries, too many entries, and non-list values (such as a mapping) are rejected. They surface as the usual HIGH frontmatter_field finding on metadata.domain.
  • Unchanged. The separate domain fields on plugin manifests, rules, and workflows stay scalar.
  • Docs and changelog. docs/tier1-validation.mdx documents metadata.domain in the schema check list. CHANGELOG entry under Unreleased / Added.

Why

metadata.domain was typed as a single string. A skill that listed more than one domain got a HIGH Field 'metadata.domain': Input should be a valid string finding and failed Tier 1. Because the frontmatter then did not parse, the validator also returned early and skipped the remaining schema checks for that skill: folder structure, naming conventions, line count, body content, name-matches-directory, and author. So one list-valued field blocked the run and hid any other schema problems in the same skill.

The sibling categorization fields (tags, languages, frameworks) already accept lists, so authors reasonably expect domain to do the same.

No downstream code reads metadata.domain as a string. SkillManifest.get_full_text() dumps the frontmatter, and there domain now serializes as [] instead of null; that method has no callers in the package.

Kept from public

  • Lenient ensure_list for tags, languages, frameworks. Left as it is; only domain gets the stricter, bounded validator.
  • Existing frontmatter error reporting. No new finding type: invalid domains use the existing frontmatter_field finding and format_validation_location, so the field reads metadata.domain like every other nested key.
  • Public test fixtures. The updated complete-metadata fixture keeps the example.com author and existing wording.

Tests

  • tests/validators/test_schema.py:
    • test_valid_metadata_structure now uses a two-item domain list and asserts the parsed value.
    • test_metadata_domain_normalization: scalar, list, strip and stable dedupe, missing, null, empty list, blank and whitespace-only scalars.
    • test_metadata_domain_rejects_invalid_values: non-string entry, blank entry, 17 raw entries, 129-character value, mapping.
    • test_invalid_metadata_domain_reports_field_finding: end to end through SchemaValidator, one HIGH frontmatter_field finding with field == "metadata.domain".
  • All 15 new or changed tests fail on unmodified main and pass with this change.
  • pytest tests/models tests/validators: 2587 passed, 1 skipped.
  • pytest tests/cli tests/golden tests/reporting tests/test_catalog_discovery.py tests/test_catalog_results.py tests/test_checks_routing.py tests/test_cli.py tests/test_commands.py tests/test_oss_boundary.py tests/test_oss_source_hygiene.py tests/test_oss_packaging.py tests/test_ci_change_classifier.py tests/test_benchmark_rollout_docs.py tests/test_plugin_inventory.py tests/test_plugin_discovery.py tests/test_plugin_format_profiles.py: 1970 passed.
  • pytest tests/test_quality_config.py tests/test_quality_policy_gate.py tests/test_publication_evidence.py tests/test_publication_identity.py tests/test_publication_text.py tests/test_plugin_manifest_opt_in.py tests/test_ci_workflows.py: 195 passed, 2 skipped.
  • ruff check and ruff format --check on the changed Python files: clean.
  • scripts/check_oss_boundary.py --root . --allowlist config/oss_boundary_allowlist.json: passed.

🤖 Generated with Claude Code

A SKILL.md that listed several categories under metadata.domain, such as
`domain: [backend, ai-ml]`, failed Tier 1 schema validation with a HIGH
"Input should be a valid string" finding. Because the frontmatter did not
parse, the remaining schema checks (folder structure, naming, name match,
author) were skipped for that skill as well.

SkillMetadata.domain is now a list. A single string is still accepted and
becomes a one-item list; a missing, null, or blank value becomes an empty
list. Entries are trimmed and deduplicated in their original order. Lists
longer than 16 entries and non-string, blank, or over-128-character entries
are reported as metadata.domain schema findings. Plugin, rules, and
workflow domain fields are unchanged.

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

Reviewed with Claude Code. No defects found. The before-validator normalizes None, blank scalars, scalars and lists consistently, validation errors still surface as a single HIGH metadata.domain frontmatter finding (covered by test_invalid_metadata_domain_reports_field_finding), and the CHANGELOG entry and docs bullet match the code. Nothing else in src reads SkillMetadata.domain, so the str|None to list[str] change has no other consumers. ruff and the schema and model tests pass locally.

Conflicted files: CHANGELOG.md

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

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The validator is correct for the cases I traced: scalar, list, null, blank, mapping, non-string and blank entries, and the 16-item check before dedupe. Errors still come out as one frontmatter_field finding on metadata.domain, and nothing else in the package reads SkillMetadata.domain. One compatibility note about single strings below.

Comment thread CHANGELOG.md Resolved
rng1995 and others added 2 commits November 2, 2026 19:57
Conflicted files: CHANGELOG.md.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…a.domain string

metadata.domain had no length limit before; a single string now goes
through the same list validation, so one longer than 128 characters
fails Tier 1 with a HIGH finding. Say so in the CHANGELOG entry and the
Tier 1 docs, and pin it end to end in
test_invalid_metadata_domain_reports_field_finding.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@rng1995
rng1995 merged commit 9e34dd4 into main Nov 3, 2026
21 checks passed
@rng1995
rng1995 deleted the naren/port-metadata-multi-domain branch November 3, 2026 20:05
rng1995 added a commit that referenced this pull request Nov 6, 2026
* docs(changelog): move entries released in 0.7.0-0.7.2 out of Unreleased

0.7.0 (#314) and 0.7.1 (#327) never cut their sections on main, and 0.7.2
(#335) added its section below the whole Unreleased block, so Unreleased
still listed work that had already shipped.

Place each Unreleased entry under the release that shipped the PR that
added it:

- 0.7.0: the published section from the 0.7.0 tag, verbatim. It already
  holds the six entries that main had filed under 0.6.0, so 0.6.0 again
  matches the v0.6.0 tag, including the original run_config.json entry.
- 0.7.1: #264 #271 #274 #281 #284 #289 #293 #299 #316 #317 #318 #323
  #324 #326 #327, plus the #320 wording of the Windows Git-root entry,
  since #320 changed that 0.7.0 fix in 0.7.1.
- 0.7.2: #263 #265 #269 #270 #276 #279 #287 #290 #296 #309 #328 #330
  merged with the existing #335 entries.

Only post-v0.7.2 entries stay under Unreleased, with one heading per
subsection. Entry text is unchanged, apart from the published tag wording
in 0.7.0 and 0.6.0.

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

* chore(release): prepare v0.8.0

Set the package, fallback, lock, citation and developer-guide versions to
0.8.0 and move every entry merged since v0.7.2 under
'## 0.8.0 - 2026-11-05', leaving Unreleased empty.

The refusal-fallback documentation test now reads the release section
that names CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK, requires it to be 0.8.0,
and requires exactly one entry there to name the switch.

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

* chore(release): pin the verified 0.8.0 Tier 1 image and add its CI bundle

Pin onboarding to the Tier 1 image published by the reviewed main revision
55d2d04 in "Build and publish Tier 1 image" run 42158955180:
ghcr.io/nvidia/skillevaluator-tier1@sha256:9d5483243918937be4f2178f74cf7c622a531dee41e3176906994d52fa14950a
(config sha256:d17d6f5105ec5f1bf0cbe4dff0d693aae4ecf01e9c1c6a6ddb7830518acace33).
The workflow and publisher refs both move to 55d2d04.

ci/bundles/0.8.0 mirrors the 0.7.2 bundle. The templates, README and
release.json are the run's github-actions-onboarding artifact and match
ci/render_templates.py output for these pins byte for byte. The scanner
inventory and verification receipt come from the build's runtime-stage
version step, the five-case smoke receipt, the onboarding job's anonymous
pull, and the public manifest, whose config digest equals the smoke-tested
image ID. The ZIP uses the 0.7.2 layout (sorted members, inner checksums,
1980 timestamps, 0644, deflate level 9) and rebuilds to identical bytes.

Point the current-bundle links at 0.8.0 and list 0.7.2 as historical.

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

---------

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

2 participants