Skip to content

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

Open
UroojFatima-052 wants to merge 1 commit 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 1 commit 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.

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

1 participant