Skip to content

fix(marketplace): ship every family's framework tools, not just security's - #1937

Merged
potiuk merged 3 commits into
mainfrom
framework-tools-every-family
Nov 1, 2026
Merged

potiuk merged 3 commits into
mainfrom
framework-tools-every-family

Conversation

@justinmclean

Copy link
Copy Markdown
Member

Summary

  • 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.
  • Ships those tools in the plugin, plus 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 own plugins/ directory so that schema lands in place.
  • Makes every such family a companion of the plugin in the preflight (setup_preflight COMPANIONS), and says so in install, upgrade, adopt and docs/setup/marketplace.md. magpie-setup is 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.
  • Fixes 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 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 (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

  • Python package (tools/*/ with pyproject.toml)
  • Documentation (docs/, README.md, CONTRIBUTING.md)
  • CI / dev loop (prek, workflows, validators)
  • Other: marketplace plugin contents and the setup pre-flight companion rule

Test plan

  • New tests scan every family: every <framework>/tools/<tool> any skill names is shipped; every family that names one is a companion of the tools plugin. Mutation-checked: dropping magpie-utilities from COMPANIONS fails the test.
  • New packager test: a tool with its own { workspace = true } source ships a path source, keeps unrelated sources, and has one sources table.
  • New preflight test pins the rule: magpie-setup on the floor is below floor without the tools plugin, and each of the four other families is satisfied once it is present.
  • End to end: ran the real materialise hook against a read-only copy of the regenerated plugin with a scratch 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 the typed-decision packaging bug and the missing schema.
  • Preflight eval scenarios re-rendered with 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.
  • Pytest members CI selects for this diff: tools/dev 396 passed, plugins 114, tools/security-management 782, tools/setup-preflight 430 (8 skipped), tools/skill-evals 194.
  • prek run --all-files --skip workspace-pytest, run twice to confirm it converges: every hook passes except skill-token-count (tokenizer download blocked in the authoring sandbox; no SKILL.md touched).
  • Apache RAT 0.18 locally: 0 unapproved. sandbox-lint OK. shellcheck on the materialise hook: 0 findings, as on main.

RFC-AI-0004 compliance

  • Sandbox — the tools still run sandboxed from the writable per-version copy; no new exclusion, no new network reach

Linked issues

Related: #1931 (write lock), which hit the same gap for skill-lock and solved it by shipping that tool in the always-installed magpie-vetted-ops.

Notes for reviewers (optional)

  • Every existing marketplace adopter whose floor lists magpie-setup and who lacks magpie-security-tools will see a below-floor finding naming it after this lands. That is the intended effect: their setup verify --apply-permission-audit and the non-security families' tools do not work without it today.
  • The plugin grows by the shipped tools' src/, pyproject.toml and README.md; tests are not shipped.
  • Generative-AI disclosure: authored with Claude Code under maintainer direction; the commit carries the Generated-by: trailer.

@github-actions github-actions Bot added family:setup setup-* skills family:tools tools/* family:docs Docs, MISSION.md, READMEs family:ci .github workflows, prek, validators capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) substrate:analytics Tool substrate: read-only metrics / dashboards / renderers substrate:framework-dev Tool substrate: build / validate / eval the framework itself substrate:setup Tool substrate: adopter-side setup state resolved at runtime (lock parsing, floors, fingerprints) labels Nov 1, 2026
claude and others added 3 commits November 1, 2026 10:36
…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
@potiuk
potiuk force-pushed the framework-tools-every-family branch from 9150975 to 64c2229 Compare November 1, 2026 09:39
@github-actions github-actions Bot added the family:security security-* skills label Nov 1, 2026

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, added main's skill-lock to the packaging hook's files: regex, and dropped skill-and-tool-validator from 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 omitted magpie-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 only tools/; 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.

@potiuk
potiuk merged commit 77faa55 into main Nov 1, 2026
15 checks passed
@potiuk
potiuk deleted the framework-tools-every-family branch November 1, 2026 10:12
Anurag-S1ngh added a commit to Anurag-S1ngh/magpie that referenced this pull request Nov 27, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:ci .github workflows, prek, validators family:docs Docs, MISSION.md, READMEs family:security security-* skills family:setup setup-* skills family:tools tools/* substrate:analytics Tool substrate: read-only metrics / dashboards / renderers substrate:framework-dev Tool substrate: build / validate / eval the framework itself substrate:setup Tool substrate: adopter-side setup state resolved at runtime (lock parsing, floors, fingerprints)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants