Repository navigation
fix(marketplace): ship every family's framework tools, not just security's - #1937
Conversation
…ity's
On a marketplace install `<framework>/tools/` is materialised from the
magpie-security-tools plugin, and only the security family was paired with
it. Every other family that runs `<framework>/tools/<tool>` called a tool
that was not on the machine: pr-management (pr-management, typed-decision),
release-management (release-config, release-management, release-verify),
contributor-growth (contributor-metrics), utilities, and magpie-setup itself
(permission-audit, the PII redactor). The plugin-contents test only scanned
the security skills, so this went unnoticed.
- Ship those tools in the plugin, plus reproducible-archive, which rc-cut
looks for beside the framework root, and audit-report's default schema,
which it reads framework-relative. The materialise hook now also stages
the plugin's own plugins/ directory so that schema lands in place.
- Make every such family a companion of the plugin in the preflight
(setup_preflight COMPANIONS), and say so in install, upgrade, adopt and
the marketplace page. magpie-setup is one of them and installs by
default, so in practice the plugin goes with every marketplace install.
Its name is kept, since renaming it would break installs; the docs call
the name historical.
- Fix the pyproject packager: a tool that declares its own
`[tool.uv.sources]` (typed-decision: `checker = { workspace = true }`)
shipped that workspace source unchanged and could not be run from the
copy. Workspace sources for shipped dependencies are now replaced with
path sources inside the existing table.
- skill-and-tool-validator stays checkout-only, by design: it validates a
framework-shaped tree an adopter repo does not have, and its one caller
is an optional step.
Tests now scan every family: every `<framework>/tools/<tool>` any skill
names is shipped, and every family that names one brings the plugin. The
preflight eval scenarios that model an install at or above its floor gain
the plugin so each keeps testing what it tested; the one-plugin Antigravity
case now also lists it as outdated, which is accurate.
Generated-by: Claude Code (Opus 5.5)
…gin copies in doctoc main changed tools/contributor-metrics after this branch was cut, so the copy inside magpie-security-tools was stale and check-family-plugins failed. Regenerated with --fix. doctodoctodoctodoctodmagdoctodoctodoctodoctodmagdoctodoctodoctodoctodmagdoctodoctthat check-family-plugins writes under plugins/magpie-security-tools/plugins/. doctoc added a TOC there, which pushed the SPDX header past the lipushed the SPDX header past the lipushed the SPDX header past the lipushed xclude plugin-copied framework files from doctoc, as their sources already are. Generated-by: Claude Code (Opus 5.5)
…ines Review fixups: - Every family that runs a framework tool now needs magpie-security-tools, but the hand-typed install lines in README.md, the quick start, marketplace-install.md, individual-use.md and the security family README still omitted it, so following them by hand gave exactly the missing-tools failure this change fixes. Each now installs it, with a note that the name is historical. - marketplace-distribution.md still described the plugin as the security skills' tools and its hook as copying only tools/; it now says what shipped. - Drop skill-and-tool-validator from the packaging hook's files: regex; it is checkout-only and never packaged. Generated-by: Claude Opus 5.5
9150975 to
64c2229
Compare
potiuk
left a comment
There was a problem hiding this comment.
Thanks — the bundling is right, and checked mechanically: every vendored file is byte-identical to its source or differs only by the packager's expected rewrites, every <framework>/tools/<tool> a family names is shipped (and nothing else), workspace dependencies resolve to path sources inside the plugin, and the check-family-plugins hook keeps the copies honest. I rebased the branch onto main and pushed one fixup commit, 64c2229 (please pull before pushing again):
- Rebase: kept
main's version strings and your new descriptions, addedmain'sskill-lockto the packaging hook'sfiles:regex, and droppedskill-and-tool-validatorfrom it (checkout-only, never packaged). README.md,docs/quick-start.md,docs/setup/marketplace-install.md,docs/setup/individual-use.md,docs/security/README.md— the hand-typed install lines omittedmagpie-security-tools, which every family that runs a framework tool now needs, so following them by hand gave exactly the missing-tools failure this PR fixes. Each now installs it, with a note that the name is historical.tools/spec-loop/specs/marketplace-distribution.md— still described the plugin as the security skills' tools and the hook as copying onlytools/; it now says what shipped.
One open question for a follow-up: magpie-security-tools stays AVAILABLE in the Codex / Copilot catalogue (.agents/plugins/marketplace.json), so a fresh install there reports it missing until the user adds it by hand. Should it be INSTALLED_BY_DEFAULT like magpie-vetted-ops?
GitHub has not yet computed whether this branch merges cleanly with its base.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. The maintainer
approving this PR has read the findings and signed off. If
something feels off, please reply on the PR and a maintainer
will follow up.More on how Apache Magpie handles maintainer review:
Contributing guide.
The copies under `plugins/*/tools/` are what an adopter installs, but nothing started them. A packaged `pyproject.toml` that uv cannot resolve therefore shipped twice (apache#1357, apache#1937) before anyone noticed. Add `tools/dev/start-packaged-tools.py`, which copies each plugin's `tools/` tree outside the checkout and starts every tool from it with `--all-extras`: a `[project.scripts]` entry with `--help`, or an import for the two libraries that ship no script. A `packaged-tools` job runs it and feeds the existing `tests-ok` gate; the gate test and the quality-tooling spec learn about the third result. Generated-by: OpenCode 2.3.2 (DeepSeek V4.1 Flash 1017)
Summary
<framework>/tools/is materialised from themagpie-security-toolsplugin, and only the security family was paired with it. Every other family that runs<framework>/tools/<tool>called a tool that was not on the machine: pr-management (pr-management,typed-decision), release-management (release-config,release-management,release-verify), contributor-growth (contributor-metrics), utilities, and magpie-setup itself (permission-audit, the PII redactor). The plugin-contents test only scanned the security skills, so this went unnoticed.reproducible-archive(rc-cut looks for it beside the framework root) and audit-report's default schema (read framework-relative). The materialise hook now also stages the plugin's ownplugins/directory so that schema lands in place.setup_preflightCOMPANIONS), and says so in install, upgrade, adopt anddocs/setup/marketplace.md.magpie-setupis one of them and installs by default, so in practice the plugin goes with every marketplace install. The plugin keeps its name (renaming would break installs); the docs call the name historical.[tool.uv.sources](typed-decision:checker = { workspace = true }) shipped that workspace source unchanged and could not run from the copy. Workspace sources for shipped dependencies are now replaced with path sources inside the existing table.skill-and-tool-validatorstays checkout-only, by design: it validates a framework-shaped tree (docs/modes.md, the capability taxonomy,skills/) an adopter repo does not have, and its one caller (skill-reconciler Step 4) is optional and non-blocking. The test records that exemption explicitly.Type of change
tools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)prek, workflows, validators)Test plan
<framework>/tools/<tool>any skill names is shipped; every family that names one is a companion of the tools plugin. Mutation-checked: droppingmagpie-utilitiesfromCOMPANIONSfails the test.{ workspace = true }source ships a path source, keeps unrelated sources, and has one sources table.magpie-setupon the floor is below floor without the tools plugin, and each of the four other families is satisfied once it is present.HOME, then launched every newly shipped tool from the materialised<framework>the way the skills do (uv run --project <framework>/tools/<tool> …). All nine run; audit-report finds its default schema; rc-cut finds reproducible-archive. This is what caught thetyped-decisionpackaging bug and the missing schema.render-preflight-fixtures.py: the seven that model an install at or above its floor gain the plugin and render byte-identical reports; the one-plugin Antigravity case now also lists it as outdated, which is accurate, and its expected answer is unchanged.tools/dev396 passed,plugins114,tools/security-management782,tools/setup-preflight430 (8 skipped),tools/skill-evals194.prek run --all-files --skip workspace-pytest, run twice to confirm it converges: every hook passes exceptskill-token-count(tokenizer download blocked in the authoring sandbox; noSKILL.mdtouched).sandbox-lintOK.shellcheckon the materialise hook: 0 findings, as onmain.RFC-AI-0004 compliance
Linked issues
Related: #1931 (write lock), which hit the same gap for
skill-lockand solved it by shipping that tool in the always-installedmagpie-vetted-ops.Notes for reviewers (optional)
magpie-setupand who lacksmagpie-security-toolswill see a below-floor finding naming it after this lands. That is the intended effect: theirsetup verify --apply-permission-auditand the non-security families' tools do not work without it today.src/,pyproject.tomlandREADME.md; tests are not shipped.Generated-by:trailer.