Skip to content

fix(tier1): report manifest checks as N/A when validate finds no supported artifact - #410

Merged
rng1995 merged 15 commits into
mainfrom
naren/port-tier1-unknown-artifact-applicability
Nov 12, 2026
Merged

rng1995 merged 15 commits into
mainfrom
naren/port-tier1-unknown-artifact-applicability

Conversation

@rng1995

@rng1995 rng1995 commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

skillevaluator validate <repo> (default --type auto) on a repository with no skill, rules, workflows or plugin fails Tier 1 with three HIGH No skills found errors and exits 1, even when every content scan passes. Auto-detection returns unknown for such a target, and Tier 1 treated unknown like a skill.

  • run_validation with content_type="unknown" now records schema, version and quality as not applicable instead of running them. Each is a skipped result with the reason not applicable: no supported skill, rules, workflows or plugin artifact detected; use --type to force.
  • Every result of such a run carries a tier1_applicability record (applicability: not_applicable, reason_code: unsupported_content_type, detected_content_type: unknown, supported_content_types: [skill, rules, workflows, plugin]). The JSON report writes it as a root tier1_applicability object, in its own block next to rubric_eval, outside the Tier 3 block. The key does not depend on check selection, so --checks pii, --checks security,pii,code-integrity and --skip schema,version,quality write it too, as does a run that --fail-fast stops early.
  • A target folder whose own entries include a manifest that auto-detection looks for (SKILL.md, workflow-rules.mdc, agent_plugin.yaml, agent_plugin.yml or .claude-plugin/plugin.json) in any letter case, or a symlink by one of those names whose target is missing, is a broken artifact, not a folder without one. Its manifest checks still run and fail as on main, with no tier1_applicability. The check compares entry names from os.scandir, so a dangling symlink counts, and a Skill.md counts on case-sensitive filesystems where auto-detection reports it as unknown. A .claude-plugin entry that is not a listable directory also counts. A .claude-plugin folder without a plugin.json, such as a marketplace's, does not.
  • The content scans still run as before: security (unrestricted scope), pii, license, code-integrity, unicode, lint, and dependency when selected. A real finding still fails the run.
  • The not-applicable results carry the publication evidence marker and the full skill lineup, like a --skip result, so such a run never certifies Tier 1 (Publication eligibility: Incomplete).
  • The terminal Tier 1 box does not count the N/A checks as passes: it reads 8/8 passed where counting them would give 11/11 passed, lists them on an n/a row with the reason, and leaves them unmarked in the check ticker. The final panel already counted them as N/A through the shared presentation (Tier 1: 8 of 8 checks passed; 0 failed, 0 incomplete, 0 skipped, 3 N/A).
  • The HTML Tier 1 summary counted an N/A skip twice, once as not applicable and once as skipped (0 of 4 checks ran, 2 not applicable, 2 skipped for two checks). It now takes the skipped count from the shared presentation, as the tier card already does (0 of 2 checks ran, 2 not applicable).
  • The JSON and Markdown reports are unchanged: they list the N/A checks as skipped, with the not applicable skip reason. The docs say so.
  • content_type=None (the Python API default) and an explicit --type skill behave as before: a missing SKILL.md still fails with No skills found. An unknown --checks name still fails.
  • Docs: the content types section of docs/tier1-validation.mdx, the auto-detection note in docs/cli-reference.mdx, and a tier1_applicability entry in the machine-readable contract of docs/reports.mdx. They also state three limits: a repository whose path includes a directory named skills, team-skills, team-rules, workflows or team-workflows is still detected as that type; Tier 2 still runs on the target unless --no-dedup or --tiers 1; and the broken-manifest rule covers only the target's own entries, so a mis-cased manifest below the target, such as tools/foo/Skill.md, is not discovered and must be validated directly. CHANGELOG entry under Unreleased > Fixed.
  • Known gap, left for a follow-up: with only manifest checks selected (--checks schema,quality), the Tier 1 box reads summary 0/0 passed with an n/a row and a ✓ pass footer, while the final panel reads Tier 1: 0 skipped, 2 N/A; no checks executed. main shows the same 0/0 passed and ✓ pass for a Tier 1 where every check is --skipped. Changing the footer means editing validate in cli.py, which many open PRs touch.

Open PRs touching the same files:

Why

CI that runs validate over mixed repositories gets a false Tier 1 failure for every repository that holds no agent artifact, and cannot tell "nothing to validate" from "an artifact failed validation". The three errors all say the same thing (No skills found), from the schema, version and quality checks. On a plain repository with a README.md, a Markdown guide and one Python file, main reports Tier 1: 8 of 11 checks passed; 3 failed and exits 1; this branch reports 8 of 8 checks passed; ... 3 N/A and exits 0. With --checks schema,quality,pii, main exits 1 and this branch exits 0. A README with a Luhn-valid card number still exits 1 on both. A folder whose root SKILL.md is a dangling symlink exits 1 on both (SKILL.md not found in skill directory). So does a folder with a README.md and a dangling .claude-plugin/plugin.json (No skills found, as on main).

Kept from public

  • Public keeps running the content scans on an unknown target, as docs/tier1-validation.mdx documents for the unrestricted security scan. This change does not return early with a single "Artifact Applicability" result, so nothing that runs and passes today is dropped.
  • skill_like is unchanged, so lint still runs on an unknown target and the recorded publication lineup stays the full skill lineup.
  • The catalog discovery in validate is untouched: a repository whose only skills sit under .claude/skills/<name> or .agents/skills/<name> is still validated as a collection of skills, not reported as N/A.
  • Path-name detection in detect_content_type is unchanged; similarity-check <repo>/skills relies on it. The docs now describe its effect on validate instead.
  • Public's broken-artifact failures stay: a mis-cased or dangling SKILL.md, workflow-rules.mdc, agent_plugin.yaml/.yml or .claude-plugin/plugin.json in the target folder still runs the manifest checks on every platform, as on main. The guard only reads public's existing manifest constants; no plugin validation code is added.
  • The command outcome, exit gate, publication assessment and result_execution_status are public's own. The N/A count comes from public's existing "not applicable" skip reason handling, so no new status or optional metadata is added, and the reporters' verdict wording is unchanged.

Tests

  • New tests/test_artifact_applicability.py (31 tests):
    • run_validation on an unknown target: schema, version and quality are not-applicable skips with the tier1_applicability record and their check IDs, while PII, unicode and lint run and pass; the security scan still runs with an unrestricted scope (content_type=None); an unknown --checks name still fails; content_type=None still reports No skills found
    • with content_type="unknown", a Skill.md folder still fails schema and quality; a dangling symlink named SKILL.md, workflow-rules.mdc, agent_plugin.yaml, agent_plugin.yml, .claude-plugin/plugin.json or .claude-plugin (6 cases), and a mis-cased Workflow-Rules.mdc, Agent_Plugin.YAML or .Claude-Plugin/Plugin.JSON (3 cases), still fail schema; none has tier1_applicability. A .claude-plugin folder holding only marketplace.json stays N/A. validate on a folder with a dangling SKILL.md or .claude-plugin/plugin.json exits 1 (2 cases). The symlink tests skip where symlinks are unavailable.
    • every result, and the JSON root, carries tier1_applicability for --checks pii, --checks security,pii,code-integrity and --skip schema,version,quality (3 cases, with the security and code-integrity validators stubbed so no SkillSpector, Bandit or Gitleaks runs), and when fail_fast stops after a failing PII scan; validate --checks pii on a plain repository writes the root key
    • with every executed check passing, the N/A results leave quality, schema and version missing from the publication lineup and the publication status incomplete
    • the terminal box counts 1/1 passed or 1/1 checks passed (never a count out of 4), names the N/A checks only on the n/a row and never marks them in the ticker; the shared presentation counts 1 of 1 checks passed; ... 3 N/A
    • JSON, HTML and Markdown for --checks schema,quality on an unknown target: root tier1_applicability, 0 of 2 checks ran, 2 not applicable with no skipped double count, no failed verdict chip or 0%, and Validators Run | 0 / Passed | 0 with no FAILED; a run without the record has no root key
    • validate on a plain repository exits 0 with the JSON key and N/A results; default tiers with --no-dedup print the N/A Tier 1 line and Publication eligibility: Incomplete (with COLUMNS=120 pinned); a planted card number still exits 1 with a credit_cards finding; --type skill still exits 1 with No skills found; .agents/skills/<x> and .claude/skills/<x> still go to catalog validation
  • Fail-before:
    • With src/ from main (d717f22) and this PR's tests: 14 failed, 17 passed. The 17 pin behavior this PR keeps (content_type=None, no root key without the record, the card still fails, --type skill, catalog discovery, and the 12 broken-artifact tests).
    • With only the tier1/commands.py and json_reporter.py changes on main (d717f22): 2 failed, 29 passed. The terminal count test sees 4/4 passed, and the HTML summary reads 0 of 4 checks ran, 2 not applicable, 2 skipped.
    • With src/ from the first revision of this PR: 18 failed, 13 passed. These are the 12 broken-artifact tests, the marketplace test and the 5 applicability tests for narrowed and fail-fast runs.
    • With src/ from the second revision (SKILL.md-only guard): 9 failed, 22 passed. These are the 9 plugin and workflows manifest cases.
    • The second revision's security,pii,code-integrity case ran the real Bandit and Gitleaks. With SKILLEVALUATOR_RUNTIME_DIR=/ and PATH limited to the venv it failed (assert 'incomplete' == 'passed'; 1 failed, 20 passed). All 31 tests now pass with that runtime dir and PATH=/usr/bin:/bin.
    • The default-tier test failed with COLUMNS=60 before the width was pinned. All 31 tests now pass with COLUMNS=60 and COLUMNS=200.
  • On the branch: tests/test_artifact_applicability.py, tests/test_skip_checks.py, tests/test_commands.py, tests/test_publication_evidence.py, tests/test_publication_identity.py, tests/test_progress_output.py, tests/cli, tests/validators/test_skillspector_scope.py, tests/test_ci_workflows.py, tests/test_oss_packaging.py, tests/test_benchmark_rollout_docs.py, tests/test_accuracy_arithmetic.py, tests/test_ci_change_classifier.py, tests/test_quality_policy_gate.py, tests/embedding/test_catalog.py, tests/validators/test_similarity.py and tests/test_catalog_discovery.py: 1006 passed, 3 skipped.
  • tests/reporting, tests/ci/test_run_tier1.py, tests/ci/test_native_reports.py, tests/ci/test_publish_reports.py, tests/test_artifact_applicability.py, tests/test_cli.py, and the tests that read the edited docs and CHANGELOG (tests/test_harbor_claude_refusal_fallback.py, tests/ci/test_image_build.py, tests/tier3/test_private_loose_source.py): 2582 passed.
  • The branch now includes main at d717f22. That merge conflicted only in CHANGELOG.md, where both Unreleased > Fixed entries are kept.
  • ruff check and ruff format --check are clean on the changed Python files, and scripts/check_oss_boundary.py passed.

🤖 Generated with Claude Code

rng1995 and others added 8 commits November 7, 2026 20:50
…orted artifact

`validate` with `--type auto` on a target with no skill, rules, workflows
or plugin (type `unknown`) ran the skill schema, version and quality checks,
which each failed with "No skills found", so an ordinary repository failed
Tier 1 and exited 1 even when every content scan passed.

For `unknown` content, record schema, version and quality as not-applicable
skips with a `tier1_applicability` record, and keep running the content
scans with their unrestricted scope. The skips carry the publication
evidence marker and the full skill lineup, so such a run never certifies
Tier 1. `content_type=None` and an explicit `--type` behave as before.

The JSON report adds a root `tier1_applicability` object. The terminal
Tier 1 box leaves the N/A checks out of its pass count and lists them on
their own row, and the HTML Tier 1 summary no longer counts an N/A skip
a second time as skipped.

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

The not-applicable branch looked only at the detected content type, so a
folder that `--type auto` reports as unknown because its manifest is
unreadable passed Tier 1 instead of failing it. A dangling SKILL.md symlink
is unknown on every platform, and a mis-cased Skill.md is unknown on
case-sensitive filesystems only, so the exit code depended on the platform.
The schema, version and quality checks are now recorded as not applicable
only when the target holds no entry whose name casefolds to SKILL.md, read
with os.scandir so broken symlinks and other casings count. Otherwise they
run as they did before and fail.

The JSON root tier1_applicability key was written only when one of those
checks had been selected and recorded as not applicable, so a run narrowed
to the content scans (--checks pii) or skipping them (--skip
schema,version,quality) carried no applicability signal. Every result of a
not-applicable run now carries the record, including a run that fail-fast
stops early, so the root key no longer depends on check selection.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The default-tier validate test read the final panel without pinning the
terminal width, so COLUMNS=60 wrapped the Tier 1 line and failed it. It now
sets COLUMNS=120, as the other final-panel tests do.

The Tier 1 summary test matched the literal "1/1 passed". An open change
rewrites that row to "N/M checks passed", which would have failed the test
and made its "4/4 passed" guard pass trivially. The test now accepts both
wordings, rejects any count out of 4, and checks that schema, version and
quality appear only on the n/a row and are never marked passed or failed in
the check ticker.

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

- Only the terminal summary and the HTML report count the not-applicable
  checks as N/A. The JSON and Markdown reports list them as skipped with a
  `not applicable` skip reason. The pages and the CHANGELOG said every
  report counted them as N/A.
- "Exits 0" was a Tier 1 statement only. Tier 2 deduplication still runs on
  the target unless `--no-dedup` or `--tiers 1`, and it can fail the run.
- Path-part detection still applies: a repository whose path includes a
  directory named skills, team-skills, team-rules, workflows or
  team-workflows is detected as that type, not unknown.
- A folder with a mis-cased or dangling SKILL.md still fails as a skill.
- The root tier1_applicability key is written whichever checks run, and it
  is now listed in the machine-readable contract in docs/reports.mdx.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The `security,pii,code-integrity` case ran the real Bandit and Gitleaks
scans. CI installs no Gitleaks, so on Linux and macOS the managed install
would download it during the unit test, and where it cannot be resolved
the run is incomplete and the test fails. Replace the security and
code-integrity validators with a passing stub, shared with the
publication test, so only the PII scan runs for real.

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

The broken-artifact guard only knew a root SKILL.md. A folder with a
dangling `.claude-plugin/plugin.json`, or a dangling or mis-cased
`agent_plugin.yaml`, `agent_plugin.yml` or `workflow-rules.mdc`, was
still detected as unknown and passed with its manifest checks as N/A,
where main failed it.

The guard now compares the target's own entries against every manifest
auto-detection looks for, in any letter case, and counts a dangling or
unreadable `.claude-plugin` entry. A `.claude-plugin` folder without a
`plugin.json`, such as a marketplace's, stays not applicable. The docs
and the CHANGELOG entry name the manifests.

Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The content types section said a folder with a `SKILL.md` entry in any
letter case is a broken skill. A reader could take that to cover a
repository whose only skill sits below the target with a mis-cased
manifest, such as `tools/foo/Skill.md`, which is not discovered and
leaves the target unknown. Say the rule applies to the target folder
itself, and that a mis-cased manifest below it must be validated
directly.

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

Bring the branch up to date with public main (46 commits since e5c100a).

Conflicts:
- CHANGELOG.md: both sides appended an entry at the end of
  Unreleased > Fixed (main: the tier3 compare Overall lift entry; this
  branch: the validate unknown-target N/A entry). Kept both under the
  single Fixed heading, main's entry first, then this branch's entry.
  Released sections are unchanged.

docs/cli-reference.mdx, docs/reports.mdx, docs/tier1-validation.mdx and
reporting/templates/report.html.j2 merged without conflicts; the tree
differs from main only by this branch's own changes.

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 the full production diff, manifest-detection guards, narrowed/fail-fast run metadata, publication eligibility, and terminal/HTML/JSON consumers. No actionable findings. A conflict-free merge candidate with current main ce52a09 passed all 31 applicability regression tests, full src/tests Ruff lint, and wheel/sdist build. The broader test attempt was interrupted before completion; only the completed focused result is claimed. The original PR head remains unchanged. #424 remains stacked on this PR; no PR was merged.

@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.

The published-docs audit found a broken link introduced here; fixing the site URL.

Comment thread docs/cli-reference.mdx Resolved

@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.

Final follow-up: fixed the newly identified published-docs link to the content-types site route and resolved its inline thread. Pinned Fern5.121 check passes with 0errors and 1existing configuration warning. Current main ce52a09 merged without conflicts; this is the same production candidate previously verified by 31 applicability tests, full src/tests Ruff lint, and wheel/sdist build. The signed-off documentation fix was pushed normally and propagated into #424. No remaining actionable finding; open and unmerged.

@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.

Resolved new-main CHANGELOG conflicts while retaining all applicability and upstream entries; placed the PR entries away from common insertion boundaries. Against main a0b65a9: 31 applicability tests pass, full src/tests Ruff lint passes, and pinned Fern check has 0 errors/1 existing warning. PR was still open and the latest-main merge check was clean before the signed-off normal push.

…lity

No conflicts. The stacked PR #424 already contains this main, so its
base takes it too, which keeps #424's diff to its own changes.

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 the external main merge at e0211ba. Its tree exactly matches the automatic merge of previously reviewed 0861b6f with main 487910e, preserving the applicability fix and published docs link. All 31 applicability contracts pass again on this head (19.24s). Current fetched-base merge checks are clean; no additional source edits or pushes were made.

@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.

Current-head integration review: reconciled the actual CHANGELOG conflict with main b38b71b, preserving all entries and placing the complete applicability entry after its assigned stable anchor. Production/docs changes retain the reviewed behavior and published link fix. Verification on this merge candidate: 31 applicability tests passed; Ruff src/tests passed; Fern check 0 errors (1 existing warning). Final adjustment only relocated CHANGELOG text. Fresh pre-push checks confirmed this open PR head/base and main, and both merge-tree checks were clean. No PR merge performed.

@rng1995
rng1995 enabled auto-merge (squash) November 12, 2026 20:26

@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 external current-head update d821361. Its tree exactly equals Git's clean automatic merge of the reviewed applicability head 6ead500 with main a72a611; there is no manual production resolution to re-review. The applicability regression suite previously passed all 31 tests on 6ead500, and the published documentation route fix remains present. Fresh actual-base merge-tree is clean against current main a72a611. Current-head CI is still running; no final CI-completion claim yet. No PR merge performed by this reviewer.

@rng1995
rng1995 merged commit 0445c4d into main Nov 12, 2026
27 checks passed
@rng1995
rng1995 deleted the naren/port-tier1-unknown-artifact-applicability branch November 12, 2026 21:06
rng1995 added a commit that referenced this pull request Nov 12, 2026
Brings in #410, #412, #413, #419, #421, #425, #430 and #444. Conflicts: CHANGELOG.md (kept both Unreleased Fixed entries) and evaluation/options.py (kept main's tolerate_baseline_timeouts field and this PR's backend field).

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

1 participant