Skip to content

test: add CI guard for manifest.name parity and global uniqueness (#280) - #288

Open
UroojFatima-052 wants to merge 2 commits into
ARPAHLS:mainfrom
UroojFatima-052:test/registry-identity-guard
Open

test: add CI guard for manifest.name parity and global uniqueness (#280)#288
UroojFatima-052 wants to merge 2 commits into
ARPAHLS:mainfrom
UroojFatima-052:test/registry-identity-guard

Conversation

@UroojFatima-052

Copy link
Copy Markdown
Contributor

Closes #280

Adds a static YAML scan under tests/test_registry_identity.py that runs as part of pytest tests/ in CI. Two independent tests, following the discovery pattern from tests/test_skill_issuer.py.

Changes

tests/test_registry_identity.py (new)

  • test_registry_manifest_name_matches_path, for every registry-layout skill (skills/<category>/<skill_name>/), asserts manifest.name equals the path-derived registry ID. Whitespace-only names are treated as missing (strip first). Flat layouts are skipped since _expected_registry_id returns None for them.
  • test_registry_manifest_names_are_globally_unique, groups skill paths by manifest.name using defaultdict(list); asserts no name has more than one path. Duplicate failures report both conflicting paths.
  • Failure messages use paths relative to REPO_ROOT for readability in CI logs.
  • Both tests batch their errors (collect all violations, then assert once) so a single CI run surfaces every bad skill instead of failing on the first one.

docs/TESTING.md

  • Added test_registry_identity.py row to the Status table.
  • Added a one-line description under the Framework test section.

CHANGELOG.md

  • Added entry under [Unreleased] > Added.

Notes

  • No loader behavior changes, kept warn-only per v1 scope.
  • Both tests pass locally on current main (2 passed in 0.47s).
  • black --check and flake8 clean.
  • Did not touch out-of-scope items: load_skill_by_id(), index.json, or promoting SkillwareIdentityWarning to a hard error.

@rosspeili

Copy link
Copy Markdown
Contributor

Thanks for this @UroojFatima-052, the test design and TESTING.md updates look great.

Before merge, please fold in a few repo-standard extras so we can merge once without a follow-up: fix the duplicate ## [Unreleased] header in CHANGELOG (single section with your Added bullet), add test_registry_identity.py to the “Which tests go where?” row in docs/TESTING.md, add a one-liner in CONTRIBUTING under the skill standard (manifest.name must match folder path, now enforced in CI), and also mention the guard in the new-skill checklist in docs/contributing/ai_native_workflow.md next to test_skill_issuer.py / test_registry_docs.py.

That keeps docs, contributor workflow, and changelog aligned with how we land framework tests elsewhere. <3
Once these are in, happy to merge.

@UroojFatima-052

Copy link
Copy Markdown
Contributor Author

Done, folded in all four items. Ready for another look, thanks!

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.

[Feat]: CI guard — registry manifest.name parity and global uniqueness

2 participants