Repository navigation
Fix native Agent Plugin audit replay for Copilot targets - #3257
Daniel Meppiel (danielmeppiel) merged 13 commits into
Conversation
When auditing a project that installs a native Agent Plugin for GitHub Copilot, drift replay previously failed because package reconstruction omitted canonical IR and the replay loop ran without the native registration capability active. In addition, projects omitting apm.yml in the plugin root were flagged by the MCP config consistency check. Reconstruct canonical PackageInfo through the native agent plugin loader during replay, activate native_registration_scope for the target set, and recognize Agent Plugins in _allows_missing_manifest.
There was a problem hiding this comment.
🟡 Changes recommended
The target-exclusion test passes on an unsupported-option error without exercising replay.
1 open finding
What changed in this PR
Fixes native Copilot Agent Plugin audit replay for #3214 by rebuilding canonical package information through the native loader.
Changes:
- Restores native plugin loading and target registration during replay.
- Allows native plugins without
apm.ymlin MCP consistency checks. - Adds lifecycle, read-only, and drift regression tests.
| File | Description |
|---|---|
| tests/integration/test_native_plugin_audit_lifecycle.py | Adds native plugin audit lifecycle coverage. |
| src/apm_cli/integration/mcp_config_view.py | Accepts native plugins without apm.yml. |
| src/apm_cli/install/drift.py | Reconstructs native plugin information and handles target exclusion. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…r3257-convergence-20261019 Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Addresses Copilot inline 4297452221 and panel follow-ups for microsoft#3214. Exercise real target exclusion, preserve native validation failures, verify native registration and read-only lifecycle artifacts, and guard canonical replay routing. Document the remaining native cache integrity limitation rather than treating clean audit as an attestation. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Address the delta panel read-only regression gap with a real registry configuration gate. Bind snapshots to the actual config owner and prove read_only=False changes user state. Preserve prior exact-head evidence across faithful main integration. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Address CI recovery: unify PackageInfo assembly and remove duplicate legacy fallback construction without changing behavior or raising the install engine budget. Move the real replay target-exclusion witness under req-tg-011, whose native boundary it exercises; no waiver or new normative requirement. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Record the existing req-tg-011 replay witness in the generated conformance statements. Runtime behavior and test implementation are unchanged. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
|
Thanks Sai krishna Bodapati (@bodapatisaikrishna). The corrective changes are published on your existing branch at Changes and validation
Remaining scope questionThe installed CLI still reports a clean audit after a native cached skill under The accepted scope requires meaningful managed-content failures and excludes ownership redesign. Daniel Meppiel (@danielmeppiel), that boundary needs clarification before this is treated as complete. The final advisory is The original Copilot thread is now outdated but remains unresolved; its test correction is included in the published changes. No reviewers were requested, and no merge was attempted. Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors. |
|
Makes sense to treat native cache integrity under apm_modules/ as a followup, given that auditing dependency cache contents touches the broader ownership model outside #3214. Happy to help tackle that once this lands. |
Reconcile the packaged command guide with a strict three-way merge while preserving both branches' guidance. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Preserve native whole-unit ownership and compare local canonical scratch copies or existing remote package digests without modifying live state. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Use owned local Git remotes and isolated environments for both manifest forms. Keep the read-only guard test double faithful to the integration result contract. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Preserve the replay module budget by moving the unchanged native verification helper beside admission, with the existing static owner guard and behavioral witnesses updated together. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Preserve the landed flat Claude command-type repair without changing native cache verification. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
Co-authored-by: Copilot App <[email protected]> Copilot-Session: f79e464c-180e-4be3-9056-0773aa679a1a
APM Review Panel:
|
| Persona | B | R | N | Takeaway |
|---|---|---|---|---|
| Python architect | 0 | 0 | 0 | Canonical owner routing and helper relocation remain consistent. |
| Test coverage expert | 0 | 0 | 0 | Installed-CLI integrity and replay contracts cover the repaired behavior. |
| Supply-chain security expert | 0 | 0 | 0 | Containment and integrity checks fail closed without a new execution path. |
| Documentation writer | 0 | 0 | 0 | Audit guidance describes verification, remediation and its limits accurately. |
Counts describe findings, not approval authority.
Current verification
- Exact reviewed head:
945919d9da0cd2a235090ae6c811e11979af7ff4, incorporating maina30aeb39f3c0ff5e3b849529c42c09b5c9cc515f. The contributor's original commit is retained. - The worker's exact-head suite passed 343 tests. A separate independent verification passed 20 selected tests, with no failures, errors or skips. These overlapping selections are not presented as 363 unique tests.
- Four mutation guards produced 18 expected failures at production-identical
76197a4; their restored witnesses pass at the current head. Canonical-owner v2 verification binds 63 executed functional test cases. - Full current lint and architecture checks passed. The parent also reran the literal trusted-main YAML, portable-path and 2100-line guards.
- All six technical workflows now succeed at this head: CI, aggregation, CodeQL, docs, NOTICE, and Spec conformance.
Review provenance: this publishes the genuine existing delta recommendation, not a newly executed panel. Architecture/security review was carried by verified byte/AST identity; the test reviewer inspected the final head while its suite was still running. Completed JUnit results were verified afterward by the convergence worker and independent verifier. CI was pending when the CEO recommendation was issued and is now separately observed successful.
Recommendation
ship_now for this bounded repair. No panel-sourced follow-ups remain. This does not claim native catalog/settings integrity or live Copilot runtime qualification. The original intended issue disposition is unchanged; this advisory itself does not close #3214.
Full per-persona findings
Python architect
No findings.
Test coverage expert
No findings.
Supply-chain security expert
No findings.
Documentation writer
No findings.
This panel is advisory; the maintainer controls publication.
Generated by autopilot-pr-merge-worker. This comment is AI-generated and may contain errors.
331d420
into
microsoft:main

Fixes #3214
Reconstructs canonical package info through the native agent plugin loader during audit replay, activates the registration scope for resolved targets, and allows native plugins to omit apm.yml in MCP config consistency checks.
Added integration tests covering install, reinstall, audit lifecycle, non-mutation, and drift detection.