Repository navigation
fix(plugins): a cached pass classifies a plugin as its fresh fetch does (#4270) - #4276
Conversation
…es (#4270) A parser-normalized plugin cache with root skills/ or SKILL.md is detected as skill_bundle or hybrid on the cached pass; with a plugin manifest present its fresh type is marketplace_plugin. Return the fresh type at the type-precedence owner so Claude native admission routes it after approve, and bin/ deploys inside the plugin root. A skills/ bundle without a manifest is unchanged. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…n its fresh fetch (#4270) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ock oracles (#4270) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Integration tests still expect skill_bundle for the manifest-bearing fixture now classified as marketplace_plugin, causing plugin setup failures before frozen restoration can be tested.
1 open issue
What changed in this PR
This PR addresses #4270 by making cached plugin classification match fresh fetches, restoring native Claude plugin deployment after approval and --trust-bin.
Changes:
- Restores
marketplace_pluginclassification for parser-normalized caches detected as APM packages, skill bundles, or hybrids. - Adds classification-parity tests and a lifecycle regression test for native deployment of plugins containing
skills/andbin/. - Documents the user-visible fix in the changelog.
| File | Description |
|---|---|
tests/unit/install/test_legacy_plugin_compat.py |
Tests fresh/cached classification parity across manifest locations, package shapes, and locked types. |
tests/integration/test_claude_native_hook_lifecycle.py |
Verifies approved plugin deployment, executable permissions, Claude registration, and lock metadata. |
src/apm_cli/install/legacy_plugin_compat.py |
Expands classification restoration at the existing compatibility owner. |
CHANGELOG.md |
Records the restored native plugin deployment behavior. |
Review effort: Balanced
…ys and audits (#4270) Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]>
|
Landing on prior green (Daniel rule) under the PM-approved shard-1 timeout exception: at 8e49996 every check was green except Integration Tests Shard 1, which hit the 50-min step cap at 31% with 0 failures; shards 2-4 were clean. Rerun 44733826312 confirms; the H lane fixes forward if it shows a real failure. Interdiff since 8e49996: main merge plus a mechanical CHANGELOG resolution only. |
…4142 resolves - Taxonomy baseline: drop the temporary allowances for the modules #4142 marks (spec behavior modules, journey index, registry archive, git lock content hash, policy outcome routing, credential rendering) and the deleted integration machines; test_m_gate.py now carries e2e and promise marks. - Exact-duplicate baseline: drop the credential_rendering pair (now one parametrized test). - #4270 landed (#4276): the Claude plugin bin/ user-scope world cells are required again. - #4178 cell keys on the same approve warning printed twice, not on any warning. Co-authored-by: Copilot App <[email protected]>
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]>
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]>
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]>

Description
TL;DR — A cached install pass classified a parser-normalized Claude plugin with root
skills/asskill_bundle(orhybrid), while its fresh fetch classifies itmarketplace_plugin. Afterapm approve,apm install -g --trust-binreads the cache, so the plugin skipped Claude native admission: only its skill landed under~/.claude/skills,bin/was not deployed, and no warning was printed. Classification is now identical on a fresh fetch and a cached pass, at the single type-precedence owner.Problem (WHY)
install/legacy_plugin_compat.preserve_normalized_marketplace_plugin_typerestoredmarketplace_pluginonly when the cached pass detectedapm_package. The parser writesapm.ymland.apm/into the cache, so a plugin with rootskills/is detected asskill_bundle(rootSKILL.md:hybrid) and kept that type.claude_plugins/admission.plan_native_claude_pluginroutes onlymarketplace_plugin, so the plugin projected loose (Claude plugin with bin/ is no longer deployed whole at user scope after approve + --trust-bin (silent) #4270). The same drift makestest_claude_native_hook_lifecycle::test_installed_hook_source_reinstall_and_removal[False-*]fail (KeyError: 'enabledPlugins'): only the git/cached path is affected.Approach (WHAT)
The fresh pass is the reference. When the parser's receipt is present and the cached pass detects
apm_package,skill_bundleorhybrid(types the parser's generatedapm.ymlcan produce), a tree with a plugin manifest ismarketplace_plugin, as on its fresh pass. Askills/bundle without a plugin manifest is never normalized, so it keepsskill_bundleand its--skillsubset selection. Claude admission is unchanged.Implementation (HOW)
src/apm_cli/install/legacy_plugin_compat.py_PARSER_SHADOWED_TYPES = {apm_package, skill_bundle, hybrid}; with a plugin manifest those map back tomarketplace_plugin.tests/unit/install/test_legacy_plugin_compat.pydetect_package_type== cached result across manifest location (.claude-plugin/,.github/plugin/, rootplugin.json, none) × rootskills//SKILL.md× locked type. Replaces the #4126 assertion that a manifest-bearing root-skills/cache staysskill_bundle(that diverged from its fresh pass).tests/integration/test_claude_native_hook_lifecycle.py.claude-plugin/, rootskills/andbin/from git;apm approve --all,apm install -g --trust-bin; assertsbin/tool(executable) under~/.agents/plugins/<plugin>/, no loose skill, enabled in Claude settings, lock rowmarketplace_pluginwith its native root.tests/integration/test_frozen_remote_plugin_lifecycle.py,tests/integration/test_plugin_e2e.py.claude-plugin(and.github/plugin/plugin.json) packages to the documented Claude plugin collection type,marketplace_plugin(reference/package-types.md, layout table and "Plugin collection"). These oracles pinned the previous cached-pass type,skill_bundle.tests/integration/test_frozen_remote_plugin_lifecycle.py(upgrade safety)test_frozen_and_audit_accept_a_lock_with_the_previous_plugin_type: a consumer lock seeded withskill_bundlefor a whole plugin replays underapm install --frozen(twice, lock bytes unchanged) and passesapm audit --ci.CHANGELOG.mdFixedline.Trade-offs
skills/is a plugin on every pass, as on its fresh fetch.Validation
Targeted local run (
APM_E2E_TESTS=1 APM_BINARY_PATH=.venv/bin/apm pytest -n 2 tests/integration/test_frozen_remote_plugin_lifecycle.py tests/integration/test_claude_native_hook_lifecycle.py -k "frozen or root_skills_deploys_bin or reinstall_and_removal"): 37 passed.ruff check/ruff format --checkon changed files: clean. Full suites run in CI (full-integration). Classification parity was probed directly againstdetect_package_type/validate_apm_package(all manifest × shape combinations match after the fix).Done-when mapping:
test_plugin_with_root_skills_deploys_bin_natively_after_approve_and_trust(fails before: no~/.agents/plugins/.../bin/tool).test_installed_hook_source_reinstall_and_removal[False-*].skill_bundle/claude_skill) and the existingtests/integration/test_package_shape_lifecycle_contract.py::test_manifestless_skill_bundle_subset_lifecycle(--skillsubset).test_cached_pass_classifies_as_the_fresh_pass.Issue and approved scope
Fixes #4270
Human scope-approval comment: #4270 (comment)
Type of change
Testing
Changelog
## [Unreleased]inCHANGELOG.md.Spec conformance (OpenAPM v0.1)
apm-spec-waiver: restores the fresh-fetch package type on the cached pass; no new behaviour
Co-authored-by: Copilot [email protected]