Repository navigation
fix(audit): verify skill subset of local plugins without apm.yml - #4494
Merged
Daniel Meppiel (danielmeppiel) merged 4 commits intoNov 21, 2026
Merged
Daniel Meppiel (danielmeppiel) merged 4 commits into
Daniel Meppiel (danielmeppiel) merged 4 commits into
Conversation
apm audit --ci reported skill-subset-consistency as unverified for a local Claude plugin without apm.yml installed with --skill. The reachability walk now reads the manifest install normalized into the package's apm_modules copy, the same one install resolves from. A tampered selection still fails. 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 19:45
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new integration test lacks required taxonomy markers, and manifestless local plugins resolve relative children against the installed copy instead of the original source, leaving valid selections unverified.
2 open issues
What changed in this PR
This PR addresses #4321 by making audit’s dependency reachability walk read the normalized manifest for local Claude plugins without apm.yml, allowing their installed skill selections to be verified.
Changes:
- Uses the installed manifest for manifestless local plugins while preserving existing handling of other local sources.
- Adds lifecycle coverage for warm and cold audits and tampered lockfile selections.
- Records the regression and documents the user-visible fix.
| File | Description |
|---|---|
tests/integration/test_local_plugin_skill_subset_audit_lifecycle.py |
Adds installed-CLI coverage for plugin skill-selection audits. |
tests/fixtures/lifecycle_bug_ledger.json |
Links issue #4321 to its regression test. |
src/apm_cli/deps/reachability.py |
Selects the normalized installed manifest for local plugins. |
CHANGELOG.md |
Documents the local-plugin audit fix. |
Review effort: Balanced
Comment on lines
+21
to
+24
| pytestmark = [ | ||
| pytest.mark.integration, | ||
| pytest.mark.requires_apm_binary, | ||
| ] |
| (parent_repo_url, None if ref.replacement is not None else ref.local_path), | ||
| ) | ||
| manifest_dir = real_dir | ||
| manifest_dir = _local_manifest_dir(ref, real_dir, apm_modules_dir) |
… the copy Per review: reading the normalized manifest from the apm_modules copy trusted an unverified copy. The reachability walk now stages the local plugin source and normalizes it through validate_apm_package, as install does, so the copy is never read and the source is never written. A tampered copy changes neither audit --ci nor install --frozen. Classify the lifecycle test (e2e; P-INV-I3, P-OWN-dependency-selection-merge). Co-authored-by: Copilot App <[email protected]>
apm-spec-waiver: bug fix aligning audit's expected skill selection with install's existing local plugin normalization; no new or changed normative requirement. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…ithout apm.yml Co-authored-by: Copilot App <[email protected]> # Conflicts: # tests/fixtures/lifecycle_bug_ledger.json
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
…4464/#4490/#4494/#4498 Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-fix-audit-local-skill-subset-4321
branch
November 21, 2026 05:24
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
apm audit --cireportedskill-subset-consistencyas "selection unverified -- the manifests that declare it could not all be read" for a local Claude plugin (.claude-plugin/plugin.json+skills/, noapm.yml) installed withapm install ./pkg --skill beta.Install normalizes such a plugin (copy, then
validate_apm_package, which synthesizesapm.yml) and resolves its dependencies from that manifest. The reachability walk (deps/reachability.py, the expected-selection owner for audit) read the source directory, found noapm.yml, and marked the node unverifiable. The walk now stages a temporary copy of the local plugin source and normalizes it through the samevalidate_apm_packageowner (_normalized_local_plugin). Theapm_modulescopy is never read (S-13: no trust in an unverified copy), and the source is never written. Other local sources are read in place as before and still fail closed when unreadable.Issue and approved scope
Issue: Fixes #4321
Human scope-approval comment: #4321 (comment)
Does this PR complete the issue, or what remains? Completes it. Remote dependency subset rules are out of scope and untouched.
Type of change
Testing
New
tests/integration/test_local_plugin_skill_subset_audit_lifecycle.py(installed CLI):install ./pkg --skill beta, thenaudit --cipasses warm and cold. Tampering theapm_modulescopy's manifest (injecting an unreadable edge) changes neitheraudit --cinorinstall --frozen(both pass; P-INV-I3). A tampered lockskill_subsetstill fails withdeclared skills ['beta'] != lockfile skill_subset ['alpha'].APM_BINARY_PATH=.venv/bin/apm pytest tests/integration/test_local_plugin_skill_subset_audit_lifecycle.py: passed with the fix, and failed on main with the issue's "selection unverified" message (fails-before).pytest tests/quality/test_lifecycle_bug_ledger.py+tests/quality/test_test_taxonomy.py+ unit tests referencing the reachability owner: 592 passed.ruff check/ruff format --check(0.15.12) on touched files: clean.scripts/lint-architecture-boundaries.sh: clean.Changelog
## [Unreleased]inCHANGELOG.md:user-visible effect first, 25 words or fewer, ending with
(#PR);breaking changes only under upgrade notes; no Highlights; see
.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
CONFORMANCE.{md,json}regeneratedapm-spec-waiver: bug fix aligning audit's expected skill selection with install's existing local plugin normalization; no new or changed normative requirement.