Skip to content

fix(vetted-ops): resolve standalone so the plugin copy runs - #1357

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/vetted-ops-standalone-plugin
Sep 23, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/vetted-ops-standalone-plugin

Conversation

@potiuk

@potiuk potiuk commented Sep 23, 2026

Copy link
Copy Markdown
Member

Summary

  • The magpie-vetted-ops plugin cannot run from where it is installed. Every documented invocation — the README's sandbox.excludedCommands / allow entries, isolated-setup-install, and the skills' uv run --project <framework>/tools/vetted-ops vetted-op-read … recipes — fails on a marketplace install with magpie-dev was not found in the package registry … vetted-ops:dev's requirements are unsatisfiable.
  • Cause: the plugin symlinks tools/vetted-ops, whose pyproject.toml declares [dependency-groups] dev = ["magpie-dev"]. magpie-dev only resolves through the workspace root's [tool.uv.sources], which the plugin does not ship, and uv resolves every group before running anything (--no-dev does not help).
  • Fix: drop the dev group from tools/vetted-ops (with a comment saying why), and add a regression test that the project declares nothing workspace-only. The toolchain still reaches its tests: CI's uv sync --all-packages --group dev and the workspace checks both use the root dev group, which names magpie-dev. tools/dev/README.md records the exception to the "every member names magpie-dev" convention.

Type of change

  • Python package (tools/*/ with pyproject.toml)
  • Documentation (docs/, README.md, CONTRIBUTING.md)

Test plan

  • Reproduced on the installed plugin (0.2.0.dev202609222337): uv run --project ~/.claude/plugins/cache/apache-magpie/magpie-vetted-ops/<ver>/tools/vetted-ops vetted-op-read … → unsatisfiable magpie-dev; same with --no-dev.
  • Standalone copy of the fixed tools/vetted-ops (outside the workspace, as the plugin ships it): uv run --project <copy> vetted-op-read --caller x list-ops resolves and runs.
  • CI shape: uv sync --all-packages --group dev then uv run --directory tools/vetted-ops pytest → 146 passed (incl. the new test).
  • New test_project_resolves_outside_the_workspace fails against the unfixed pyproject.toml and passes with the fix.
  • uv lock refreshed (drops the vetted-ops dev-group entries).
  • prek run --files on the changed files passes. One earlier run reported pytest failed for: agent-isolation; it did not reproduce on re-run, and that suite passes on its own (256 passed) — looks unrelated and flaky.

Linked issues

Refs #1310 (added the uv run --project exclusion this invocation is meant to hit).

Notes for reviewers (optional)

Alternative considered: keep the dev group and switch every documented invocation to uvx --from <plugin>/tools/vetted-ops vetted-op-read … (a wheel build ignores dependency groups — verified working). Rejected as the larger change: ~20 call sites across skills, docs, .claude/settings.json and sandbox-lint/expected.json, and a second excludedCommands shape to keep in sync. Adopters who already added a uvx --from exclusion as a workaround can drop it after upgrading.

🤖 Generated with Claude Code

The magpie-vetted-ops plugin ships tools/vetted-ops without the workspace
root, and its [dependency-groups] dev = ["magpie-dev"] only resolves through
the root's [tool.uv.sources]. uv resolves every group before running, so
every documented `uv run --project <plugin>/tools/vetted-ops …` invocation
failed on a marketplace install. Drop the group; the toolchain still reaches
the tests through the root dev group. Adds a regression test.

Generated-by: Claude Opus 5
@potiuk potiuk added family:tools tools/* capability:fix Implement code change to resolve an issue labels Sep 23, 2026
@potiuk
potiuk merged commit 20123f0 into apache:main Sep 23, 2026
47 checks passed
potiuk added a commit that referenced this pull request Sep 24, 2026
Reconciles the spec-loop specs with the functionality that shipped
between 5c75abd and bcd8b7f:

- agent-isolation-sandbox: the hardware-key touch policy (sig cached +
  aut off with OpenPGP signing, aut cached with gpg.format=ssh) (#1367);
  touch-watcher owner is the harness (#1365); macOS overlay closes on
  deactivation (#1325); whole-user git hooks allowRead and dispatcher
  flavour (#1364, #1322, #1358); agent-guard finds the git subcommand
  past global flags (#1330); agent-guard plugin counts as a complete
  install (#1323); per-tool cooldown_days, bubblewrap 0.13.0 (#1360).
- sandbox-diagnostics: ten catalogue entries (prek/uv not found, git
  hooks silently skipped) (#1359, #1364); doctor probes as scripts, with
  probes 7 and 8 (#1336, #1362, #1364); verify's 12 checks and
  conditional-checks.md (#1334).
- vetted-command-surface: HTTP read backend with the OSV and CVE.org
  operations (#1326); the vetted-op-read recipe spelling (#1339); the
  plugin copy resolves standalone (#1357).
- cve-tooling: tools/osv (contract:security-cross-ref) and the cve-org
  check through vetted-ops (#1297, #1326).
- security-issue-lifecycle: step 2b proposes going ahead on a quiet
  reporter (#1340); the post-advisory security-pages update (#1355).
- meta-and-quality-tooling: name: must match the skill directory
  (#1361); skill-evals fixture containment and grader retry (#1315,
  #1341); optimize-skill budgets, eval gate, rewrite and extract-code
  passes (#1331, #1332, #1335, #1338); diff-scoped prek CI (#1317).
- marketplace-distribution: substrate plugins (#1368, #1357).
- adversarial-review (new): the tool and substrate plugin as shipped
  (#1368), with its known gaps.

Generated-by: Claude Opus 5
@potiuk potiuk added substrate:framework-dev Tool substrate: build / validate / eval the framework itself substrate:sandbox Tool substrate: agent isolation, egress control, settings audit labels Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:fix Implement code change to resolve an issue family:tools tools/* substrate:framework-dev Tool substrate: build / validate / eval the framework itself substrate:sandbox Tool substrate: agent isolation, egress control, settings audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant