CNTRLPLANE-3677: fix(openshift-developer): use CLAUDE_PLUGIN_ROOT with fallback for check_replied.py path - #588
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (3)
WalkthroughThe openshift-developer plugin version is bumped from 1.1.5 to 1.1.6 in the plugin manifest, marketplace data, and embedded docs. The address-review-pr skill also changes how it invokes check_replied.py for duplicate prevention. Changesopenshift-developer updates
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (2 errors)
✅ Passed checks (8 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/openshift-developer/skills/address-review-pr/SKILL.md`:
- Around line 230-235: The fallback in the address-review-pr skill currently
searches /tmp for check_replied.py and then executes the first match, which can
run an untrusted script. Update the CHECK_REPLIED lookup logic to only use
trusted plugin locations, preferably under CLAUDE_PLUGIN_ROOT or other
user-owned plugin roots, and remove /tmp from the search path before the python3
invocation. Keep the existing validation that the script exists before running
it, but ensure the resolved path cannot come from a world-writable directory.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b626000f-9172-4c92-9760-f0bf98f0bc3e
📒 Files selected for processing (4)
.claude-plugin/marketplace.jsondocs/index.htmlplugins/openshift-developer/.claude-plugin/plugin.jsonplugins/openshift-developer/skills/address-review-pr/SKILL.md
| ```bash | ||
| SKILL_DIR="$(dirname "$(find ~/.claude/plugins -type f -path "*/openshift-developer/skills/address-review-pr/check_replied.py" 2>/dev/null | sort | head -1)")" | ||
| python3 "$SKILL_DIR/check_replied.py" <owner> <repo> <pr_number> <comment_id> --type <type> | ||
| CHECK_REPLIED="${CLAUDE_PLUGIN_ROOT}/skills/address-review-pr/check_replied.py" |
There was a problem hiding this comment.
Hm, Claude fixed this bug some time ago, this shouldn't be needed anymore. Did you try putting the file in scripts/? It is where the agentskills spec asks them to go, it shouldn't be in the skill root.
There was a problem hiding this comment.
Occasional error is
Error: Exit code 2
python3: can't open file '/tmp/hypershift/./check_replied.py': [Errno 2] No such file or directory
Updated according to https://code.claude.com/docs/en/skills#generate-visual-output
Move check_replied.py into the skill's scripts/ subdirectory and
reference it via ${CLAUDE_SKILL_DIR}, which resolves correctly
regardless of install location.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2e08116 to
959784e
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre, stbenjam The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
I was hoping it would work without reference to Claude-specific paths. I think I usually just tell it to run <script name> and it finds it, but if it doesn't work this is fine |
Summary
address-review-prskill failing withNo such file or directoryforcheck_replied.pyin CI and non-standard plugin install locationsCLAUDE_PLUGIN_ROOTenv var as primary path, with fallback search across~/.claude/pluginsand/tmpTest plan
/openshift-developer:address-review-prin a standard Claude Code environment/tmp🤖 Generated with Claude Code
Summary by CodeRabbit