Skip to content

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

Description

@rosspeili

Feature Description

Add a framework test that scans every registry-layout skill under skills/ and asserts:

  1. manifest.yaml name matches the path-derived registry ID (category/skill_name from skills/<category>/<skill_name>/).
  2. manifest.name values are globally unique across all bundled registry skills (no two manifests share the same name string).

Today we rely on folder layout and warn-only SkillwareIdentityWarning at load time (SkillLoader._validate_manifest_identity). CI does not fail if a contributor merges a mismatched or duplicate manifest.name unless that specific skill is loaded in a test with warnings promoted to errors.

Follow-up remnant from closing #12 (short-ID loader API superseded; registry integrity test still useful).

Rationale

  • CONTRIBUTING requires manifest.name = full registry ID (category/skill_name); the loader warns but does not enforce in CI.
  • Agent loops and tool adapters use manifest["name"]; drift from folder path causes subtle dispatch bugs.
  • Uniqueness prevents ambiguous registry IDs if two folders ever claim the same name (layout alone does not catch duplicate manifest strings in different paths).
  • Cheap guard (~20 skills today); runs in existing pytest tests/ CI job — no new workflow needed.

Affected paths (optional)

tests/test_loader.py (or new tests/test_registry_identity.py), skillware/core/loader.py (optional: expose _expected_registry_id helper for reuse, test-only import OK if kept private)

Implementation Idea

Add tests/test_registry_identity.py (or extend tests/test_loader.py):

  • Discover skills the same way as tests/test_skill_issuer.py (skills/**/manifest.yaml).
  • For each registry-layout dir (skills/<category>/<skill_name>/), compute expected ID and compare to manifest["name"] (strip, require non-empty).
  • Collect all manifest names; assert len(names) == len(set(names)); report duplicates with both paths.
  • Do not change loader behavior in v1 (keep warn-only on load); test fails on bundled registry violations.
  • Optional: one parametrized test loading each bundled skill with warnings.simplefilter("error", SkillwareIdentityWarning) — heavier; static YAML scan is enough for CI.

Acceptance criteria

  • New test passes on current main
  • pytest tests/ green in CI
  • No CHANGELOG required unless we later promote mismatch to loader error (out of scope)
  • One-line note in CONTRIBUTING.md or docs/TESTING.md pointing to the guard (optional)

Out of scope

Related: #12 (closed), tests/test_loader.py identity tests, tests/test_discovery.py shadow conflicts

Metadata

Metadata

Assignees

No one assigned

    Labels

    core frameworkChanges to loader, env, base classes, or model adapters.enhancementNew feature or request.good first issueGood for newcomers.testingpytest, doc-drift guards, or CI test coverage.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions