Skip to content

tests(skill-validator): cover collection utilities, predicates, and main CLI - #237

Merged
potiuk merged 2 commits into
apache:mainfrom
justinmclean:skill-validator-test-coverage
May 20, 2026
Merged

potiuk merged 2 commits into
apache:mainfrom
justinmclean:skill-validator-test-coverage

Conversation

@justinmclean

Copy link
Copy Markdown
Member

37 new tests across 7 classes filling the remaining coverage gaps in test_validator.py.

Changes

tests/test_validator.py — new test cases covering:

  • is_placeholder_url — angle-bracket tokens, ellipsis, real URLs, empty
  • line_has_inline_allow_marker — known markers, plain lines, empty
  • is_path_allowlisted — README/AGENTS, projects/_template, .github/; skill files and arbitrary docs are not allowlisted
  • collect_files_to_check — md files returned, missing dir → [], non-md excluded, recurses into subdirs
  • collect_skill_dirs — immediate child dirs returned, missing dir → {}, files excluded, paths are absolute
  • collect_doc_files — docs/ and projects/_template/ both scanned, missing dirs → {}, non-md excluded, paths are absolute
  • main — returns 0 on valid skills, 1 on hard violations with message, --skip-categories filters violations, --strict promotes soft to hard

…ain CLI

37 new tests across 7 classes:

- is_placeholder_url: angle-bracket tokens, ellipsis, real URLs, empty
- line_has_inline_allow_marker: known markers, plain lines, empty
- is_path_allowlisted: README/AGENTS, projects/_template, .github/,
  skill files and arbitrary docs are not allowlisted
- collect_files_to_check: md files returned, missing dir → [], non-md
  excluded, recurses into subdirs
- collect_skill_dirs: immediate child dirs returned, missing dir → {},
  files excluded, paths are absolute
- collect_doc_files: docs/ and projects/_template/ both scanned, missing
  dirs → {}, non-md excluded, paths are absolute
- main: returns 0 on valid skills, 1 on hard violations with message,
  --skip-categories filters violations, --strict promotes soft to hard

https://claude.ai/code/session_01WEx58ofmTyCe2YhCppV3qN
@justinmclean justinmclean self-assigned this May 20, 2026

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice. more coverage :)

@potiuk
potiuk merged commit 319e5c6 into apache:main May 20, 2026
13 checks passed
vincbeck pushed a commit to vincbeck/airflow-steward that referenced this pull request May 26, 2026
…search (apache#149)

Adds two pre-classification steps to security-issue-triage:

Step 2.5 — Apply the Security Model verbatim. The classifier must quote
the relevant 2-3 sentences of the project's Security Model and explain
how the tracker maps to (or escapes) that wording. A trust-boundary
cheat-sheet codifies the common attacker/target combinations into
default dispositions, so the classifier cannot skip the boundary
analysis silently.

Step 2.6 — Closed-tracker precedent search. Extends the existing
fuzzy-dup search (Step 2a in security-issue-import) to look for closed
'invalid' / 'not CVE worthy' / 'duplicate' trackers — and CVE-allocated
positive precedents — for the same fuzzy keys. A STRONG rejection
precedent lowers proposal confidence and often swings the disposition
from VALID to NOT-CVE-WORTHY.

Motivation: a 2026-05-14 triage sweep against airflow-s/airflow-s got
8 of 9 trackers' first-pass classification wrong — proposed VALID for
cases that had direct NOT-CVE-WORTHY precedents (e.g. airflow-s#258
for the __classname__→import_string pattern, airflow-s#215/apache#237 for
cross-DAG-read via Execution API). The misclassifications were only
caught after the human triager pushed back twice asking the assistant
to read the Security Model deeply and check past similar issues. This
PR codifies both as mandatory pre-classification steps.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@potiuk potiuk added the substrate:framework-dev Tool substrate: build / validate / eval the framework itself label Sep 25, 2026
@potiuk potiuk added the family:tools tools/* label Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

family:tools tools/* substrate:framework-dev Tool substrate: build / validate / eval the framework itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants