Repository navigation
fix(plugins): keep root skills/ bundles typed skill_bundle; owner-only native plugin copies - #4126
Merged
Daniel Meppiel (danielmeppiel) merged 8 commits intoNov 20, 2026
Conversation
…y native plugin copies Two #3290 regressions found by release validation (run 44697560532): - legacy_plugin_compat.preserve_normalized_marketplace_plugin_type retyped a normalized plugin cache detected as skill_bundle to marketplace_plugin on the cached second pass. Its intent was only to stop the parser's generated apm.yml from masquerading as an authored apm_package; a root skills/ bundle keeps skill_bundle (and --skill subsets), as documented. Fixes tests/integration/test_plugin_e2e.py::TestPluginNetworkE2E:: test_lockfile_records_package_type. - The native plugin copy used shutil.copy2 and kept setuid and group/other bits on a shipped bin/ tool (#1620 item 3). Deployed files are now owner-only; the fingerprint records only the owner-execute bit, which is kept. The bin permission e2e now asserts the native plugin root. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 08:07
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The fingerprint fast path bypasses permission correction for existing native installations, leaving unsafe modes such as 0o4755 unchanged after upgrade or reinstall.
1 open issue
What changed in this PR
This PR repairs two regressions from native Claude plugin support: incorrect classification of root skills/ bundles and overly permissive deployed file modes.
Changes:
- Preserve
skill_bundleclassification during normalized-cache detection. - Restrict newly copied native plugin files to owner-only permissions while preserving owner execute.
- Add classification regression tests, update the deployment test to check the native plugin root, and document the fixes.
| File | Description |
|---|---|
tests/unit/install/test_legacy_plugin_compat.py |
Tests bundle classification with and without a locked type. |
tests/integration/test_plugin_e2e.py |
Checks executable permissions at the native plugin destination. |
src/apm_cli/native_plugins/layout.py |
Removes group/other permissions and special bits from copied files. |
src/apm_cli/install/legacy_plugin_compat.py |
Limits normalized-cache reclassification to apm_package. |
CHANGELOG.md |
Records both fixes under Unreleased. |
Review effort: Balanced
…dex root At user scope a Claude plugin installs intact through Claude settings (#3290), so a native skill and a legacy plugin share member ownership only where the plugin still projects loose (Codex). The frozen remote plugin lifecycle failures from the same release validation are fixed by the skill_bundle precedence fix in this PR. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
The fingerprint fast path returned before any mode change, so a plugin deployed at 0o4755 before the #1620 guard kept its setuid and group/other bits after an upgrade. _owner_only() now enforces the postcondition on the staged copy and on an unchanged deployed root (symlinks not followed); the fingerprint, which records only the owner-execute bit, is unchanged. Regression: an already-deployed 0o4755 tool with a matching fingerprint is 0o700 after redeploy, with changed=False (POSIX only). Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-plugin-skill-bundle-type
branch
November 20, 2026 10:00
This was referenced Nov 20, 2026
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
Fold [Unreleased] into the untagged [0.37.0] - 2026-11-20 block. Contributor, CI and test-only lines are dropped per the cut-release DROP list; exact duplicate lines from parallel merges are removed; the #4126/#4276 plugin-type lines are merged; the #4187 placeholder now names #4271. pyproject.toml is already 0.37.0. Refreshed again on the final release train; its train merge on main is the RC SHA. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
Fold [Unreleased] into the untagged [0.37.0] - 2026-11-20 block on the final release train. Contributor, CI and test-only lines are dropped per the cut-release DROP list; exact duplicates from parallel merges are removed; the #4126/#4276 plugin-type lines are merged; the #4187 placeholder names #4271. pyproject.toml is already 0.37.0. The train merge on main is the RC SHA. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
Fold [Unreleased] into the untagged [0.37.0] block on the final release train. Contributor, CI and test-only lines are dropped per the cut-release DROP list; exact duplicates from parallel merges are removed; the #4126/#4276 plugin-type lines are merged; the #4187 placeholder names #4271. pyproject.toml is already 0.37.0. The train merge on main is the RC SHA. Co-authored-by: Copilot App <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Two regressions from #3290 (native Claude plugins), found by release validation on main
1b96706b7d(run 44697560532, "Integration Tests (network, linux x86_64)", deterministic over 3 retries). Bisect: the network test passes at8160ec3cc8(before #3290) and fails atd8eb528c5f(the #3290 merge).Package type precedence.
install/legacy_plugin_compat.preserve_normalized_marketplace_plugin_typeretyped a normalized plugin cache detected asskill_bundletomarketplace_pluginon the cached second pass. The change it came from (4a34515) intended only to stop the parser-generatedapm.ymlfrom masquerading as an authoredapm_package. A rootskills/bundle keepsskill_bundle, as documented (lockfile--skillsubsets apply only toskill_bundlerows), so onlyapm_packageis retyped now.Native plugin copy modes (Plugin bin/ deploy: trust-posture, producer docs, and hardening follow-ups (from #1591 review panel) #1620 item 3).
native_plugins/layout.deploy_plugincopied withshutil.copy2, so a shipped0o4755bin/tool kept setuid and group/other bits under~/.agents/plugins/<p>/. Deployed files are now owner-only. The native fingerprint records only the owner-execute bit, which is kept, so no lock or approval changes.Same release validation, frozen and shared-skill suites (merge_group only). Bisected to fix(claude): install intact user plugins through Claude settings, owned by the lock #3290:
tests/integration/test_frozen_remote_plugin_lifecycle.py(26 failures) andtest_shared_skill_preservation_lifecycle.py::test_native_skill_and_legacy_plugin_share_only_member_ownership[*-user](2) pass at8160ec3cc8and fail atd8eb528c5f. The frozen failures are the sameskill_bundleprecedence regression and pass with fix 1. The shared-skill user cases are a stale oracle: at user scope the legacy Claude plugin now installs intact (approved fix(claude): install intact user plugins through Claude settings, owned by the lock #3290 design), so the two packages share member ownership only at the Codex root; the user-scope case now asserts that root.Issue and approved scope
Issue: Refs #3191
Human scope-approval comment: the #3191 scope record (native Claude plugins, #3290); this restores behavior #3290 did not intend to change. Release-validation repair requested by the 0.37 delivery manager.
Does this PR complete the issue, or what remains? It fixes two regressions introduced by #3290; #3191 itself is already fixed.
Type of change
Testing
Evidence:
APM_E2E_TESTS=1 APM_RUN_INTEGRATION_TESTS=1 GITHUB_APM_PAT=... pytest tests/integration/test_plugin_e2e.py: 27 passed (was 1 failed on main:test_lockfile_records_package_type).tests/integration/test_frozen_remote_plugin_lifecycle.py tests/integration/test_shared_skill_preservation_lifecycle.py: 54 passed (were 28 failed at the fix(claude): install intact user plugins through Claude settings, owned by the lock #3290 merge).tests/unit/install/test_legacy_plugin_compat.py::test_normalized_plugin_with_root_skills_keeps_skill_bundle_type(2 cases); restoring the old{APM_PACKAGE, SKILL_BUNDLE}set fails both.TestPluginBinDeployPermissionsE2E::test_install_global_deploys_plugin_bin_as_0700now asserts the native plugin root; removing the new chmod fails it.Changelog
## [Unreleased]inCHANGELOG.md.Spec conformance (OpenAPM v0.1)
CONFORMANCE.{md,json}regenerated