Skip to content

feat(ci): enforce Compass lifecycle ceiling in CI validation - #158

Open
rhartuv wants to merge 1 commit into
RHEcosystemAppEng:mainfrom
rhartuv:feat/lifecycle-ceiling
Open

feat(ci): enforce Compass lifecycle ceiling in CI validation#158
rhartuv wants to merge 1 commit into
RHEcosystemAppEng:mainfrom
rhartuv:feat/lifecycle-ceiling

Conversation

@rhartuv

@rhartuv rhartuv commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Enforces the Compass lifecycle ceiling rule in CI: a child skill cannot have a more mature spec.lifecycle than its parent plugin (pack).

This PR adds programmatic validation and wires it into the existing Tier 2 structure checks. No new GitHub Actions workflow is introduced — the check runs automatically via make validate-structure in tier-2-check.yaml.

Background

By design, skill lifecycle maturity must not exceed the pack plugin lifecycle:

  • Allowed order: development (0) < beta (1) < production (2)
  • Missing lifecycles default to development
  • deprecated skills and plugins are skipped

This rule was previously documented and enforced manually. Data fixes were already applied to bring manifests into compliance; this PR prevents future regressions.

Prior data fixes (compliance groundwork)

Manifest data was corrected before adding enforcement:

This PR adds the validator only; it does not change lifecycle values in manifests.

Changes

Dependency update

  • Added pytest>=8.0 to the dev dependency group in pyproject.toml
  • Regenerated uv.lock

Validator (scripts/validate_lifecycle_ceiling.py)

  • Discovers packs from root catalog-info.yaml spec.targets (same convention as validate_compass_manifests.py)
  • For each registered pack, compares every skill manifest against <pack>/<pack>-plugin.yaml
  • Enforces skill_rank <= plugin_rank
  • Defaults missing lifecycles to development
  • Skips deprecated skills and plugins

Unit tests (scripts/test_validate_lifecycle_ceiling.py)

  • Passing cases: skill equal to plugin, less mature than plugin, missing lifecycle defaults
  • Fail case: skill more mature than plugin
  • Deprecated skip logic: deprecated skill, deprecated plugin, mixed scenarios
  • validate_all discovery and error handling

Makefile / CI integration

  • Added standalone validate-lifecycle-ceiling target
  • Wired validator + pytest into validate and validate-structure
  • Picked up automatically by existing tier-2-check.yaml (make install && make validate-structure)

Test plan

  • uv run python scripts/validate_lifecycle_ceiling.py — passes on current manifests
  • uv run pytest scripts/test_validate_lifecycle_ceiling.py -v — 18 tests pass
  • make validate-lifecycle-ceiling — passes
  • make validate-structure — passes (CI path)
  • make validate — passes
  • Induced violation (temporarily downgrading a plugin lifecycle) correctly fails with clear errors

@rhartuv
rhartuv requested a review from RedTanny September 9, 2026 15:09
@rhartuv rhartuv self-assigned this Sep 9, 2026
@rhartuv rhartuv added the enhancement New feature or request label Sep 9, 2026
@rhartuv rhartuv added the skills label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant