Plugin skills symlinked from skills/ stopped loading in openhands-sdk 1.49.2 (pr-review runs without code-review and github-pr-review)

Aperta
#840 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #873 di @fardevio — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start with plugins/pr-review/skills/ and scripts/sync_extensions.py; compare the plugin skill entries with their source directories under skills/, then read the existing mirror checks for vendor manifests. The acceptance criteria require replacing all 10 skill symlinks with matching directories and making python scripts/sync_extensions.py --check report mirror drift. Verify plugin loading with the repro and run the named tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

priority:medium ready-for-dev

What happens

Since openhands-sdk 1.49.2, loading plugins/pr-review returns no skills. The SDK logs:

WARNING Denying .../plugins/pr-review/skills/code-review: it resolves outside .../plugins/pr-review
WARNING Denying .../plugins/pr-review/skills/github-pr-review: it resolves outside .../plugins/pr-review

plugins/pr-review/skills/code-review and plugins/pr-review/skills/github-pr-review are symlinks to ../../../skills/.... The path-containment rule from OpenHands/software-agent-sdk#4453 (shipped in 1.49.2 on 2026-09-17) rejects any plugin path that resolves outside the plugin root, so both skills are dropped. The action still triggers /codereview, but the skill content never reaches the agent, including the 🔴/🟠/🟡 priority-label rules in github-pr-review.

The same layout exists in 4 more plugins, 10 symlinks in total: openhands (3), vulnerability-remediation (2), pr-review (2), qa-changes (2), release-notes (1).

Repro

From the root of this repo (main at 2604706):

uv run --no-project --python 3.12 \
  --with "openhands-sdk==1.49.2" python - <<'PY'
from pathlib import Path
from openhands.sdk.plugin import Plugin
pl = Plugin.load(Path("plugins/pr-review"))
print([s.name for s in (pl.skills or [])])
PY
openhands-sdk versions tested Skills loaded
1.36.1, 1.38.0, 1.41.0, 1.43.1, 1.45.0, 1.47.0, 1.48.0, 1.49.0, 1.49.1 code-review, github-pr-review
1.49.2, 1.49.3, 1.49.4, 1.49.5, 1.55.1, 1.58.1 none

We see it in production too: every pr-review run in our CI since 2026-09-17 logs both denials, on action v0.3.0 and on v0.35.0.

Possible fixes

  1. Ship real directories in plugins/*/skills/ instead of symlinks, and have sync_extensions.py --check verify they match skills/. That's the same idea as the real-directory mirrors it already allows for vendor manifests.
  2. Have the plugin loader accept a plugin's skills/ symlinks when they resolve inside the same marketplace repo.
  3. Short term, for the pr-review action only: pin openhands-sdk<1.49.2, or load the two skills from skills/ directly in agent_script.py.

Happy to send a PR for whichever direction you prefer.


OpenHands AI triage

The following comments and acceptance criteria were added by the OpenHands AI agent.

Triage

The 10 plugin skills/ symlinks are verified in the repository tree (openhands 3, vulnerability-remediation 2, pr-review 2, qa-changes 2, release-notes 1), and the denials are the intended SDK path-containment behavior shipped in openhands-sdk 1.49.2 (OpenHands/software-agent-sdk#4453), so loader behavior cannot be changed in this registry. The fix therefore follows fix option 1 from the report: replace the 10 plugins/*/skills/ symlinks with real directories mirroring the hand-authored skills/<name>/ entries, and have scripts/sync_extensions.py --check (the existing CI consistency gate, which already verifies real-directory mirrors for vendor manifests) fail when a mirrored copy drifts from its source skill.

Non-goals: no change to the SDK loader or pinning openhands-sdk in this repository (SDK behavior belongs in OpenHands/software-agent-sdk); no workaround in plugins/pr-review/scripts/agent_script.py; no change to the .claude-plugin/.codex-plugin vendor symlink scheme (tracked separately in #394); no new or renamed skills, so no marketplace or README catalog changes; no SDK documentation added to this repo.

Priority priority:medium: production impact is documented (pr-review CI runs log both denials since 2026-09-17 on action v0.3.0 and v0.35.0, reproduced by version bisect), but reviews still trigger and interim workarounds exist.

Acceptance Criteria
  • With a released openhands-sdk >= 1.49.2, running the issue's repro (Plugin.load(Path("plugins/pr-review")) from the repo root) returns skills named code-review and github-pr-review, and the same check passes for the other five plugins' mirrored skills, with no "it resolves outside" denial warnings in the logs.
  • Loading the same plugins with released openhands-sdk 1.49.1 returns the same skill set, so consumers on versions before the containment change see no new, missing, or duplicate skills.
  • No entry under any plugins/*/skills/ directory is a git symlink; all 10 are real directories committed to the tree.
  • Each mirrored copy's file set and contents are identical to its hand-authored source skills/<name>/ directory.
  • python scripts/sync_extensions.py --check exits 0 on a consistent tree, and exits non-zero naming the mismatched path when either side of a mirror is edited without syncing the other.
  • Generated artifacts need no change beyond the new mirrors: python scripts/sync_extensions.py --check reports no diff for the README catalog section, and no marketplace JSON file changes.
  • Vendor manifest symlinks (.claude-plugin, .codex-plugin), plugin workflows and action definitions, and everything outside the 10 mirrored directories are untouched by the change.
  • A pr-review action run against a real PR completes with no plugin-skill denial warnings in its logs.
  • The repository test suite passes per repository guidance (uv sync --group test && uv run pytest -q), including tests/test_skill_plugin_loading.py, tests/test_sdk_loading.py, and tests/test_sync_extensions.py.
Lingua principale
Python
Stelle
184
Fork
137
Merge medio
1g 19h
PR unite (30g)
46

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenHands/extensions

Tutte le issue di OpenHands/extensions

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.