fix: fan out cluster-report RBAC into skill scripts tree - #159
Merged
Merged
Conversation
r2dedios
requested changes
Sep 14, 2026
Comment on lines
+99
to
+117
| def test_missing_shared_script_symlink_flagged(self) -> None: | ||
| pack_dir = self.fixture_root | ||
| group_dir = pack_dir / "scripts" / "demo-group" | ||
| group_dir.mkdir(parents=True) | ||
| (group_dir / "run.py").write_text("# run\n", encoding="utf-8") | ||
| (group_dir / "config.yaml").write_text("key: value\n", encoding="utf-8") | ||
|
|
||
| scripts_dir = pack_dir / "skills" / "demo-skill" / "scripts" | ||
| scripts_dir.mkdir(parents=True) | ||
| os.symlink("../../../scripts/demo-group/run.py", scripts_dir / "run.py") | ||
|
|
||
| errors: list[str] = [] | ||
| compass._check_skill_scripts_layout( | ||
| pack_dir.name, pack_dir / "skills" / "demo-skill", errors | ||
| ) | ||
|
|
||
| self.assertTrue(errors) | ||
| self.assertIn("config.yaml", errors[0]) | ||
|
|
Contributor
There was a problem hiding this comment.
Could be a case where the Markdown files are not being analyzed? I see test_missing_shared_script_symlink_flagged but I don't see a test like: test_forbidden_pack_scripts_path_in_skill_markdown_flagged
Contributor
There was a problem hiding this comment.
Also... Could we add a happy path test were everything is OK, so we confirm that the checks works correctly?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
cluster-reportkeeps shared files under packscripts/cluster-report/and symlinks only the.pyfiles intoskills/cluster-report/scripts/.build-kubeconfig.pyloadscluster-reporter-rbac.yamlas a sibling of itself. After publish/install, only the skill tree is present, so the YAML is missing. Skill docs also tell the agent to run python3 ocp-admin/scripts/..., which is an authoring-repo path, not a skill-local path.Jira
Summary
skills/cluster-report/scripts/cluster-reporter-rbac.yamlsymlink sobuild-kubeconfig.pycan apply RBAC when only the skill tree is installed (publish/install no longer ships packscripts/cluster-report/alone).skills/cluster-report/references/multi-cluster-auth.mdto use skill-local commands (python3 scripts/build-kubeconfig.py,oc apply -f scripts/cluster-reporter-rbac.yaml) instead of authoring-repoocp-admin/scripts/...paths.ocp-admin/README.mdquick start to use plugin-rootpython3 scripts/cluster-report/...for human operators.SKILL_DESIGN_PRINCIPLES.mdand enforce it invalidate_compass_manifests.py(all non-test files in a linkedscripts/<group>/must be symlinked under the skill; no<pack>/scripts/in skill markdown).Test plan
uv run python scripts/validate_compass_manifests.pyuv run python -m unittest scripts.test_validate_compass_layoutocp-admin/skills/cluster-report, confirmpython3 scripts/build-kubeconfig.py setup --helpruns andscripts/cluster-reporter-rbac.yamlresolves via symlink