Repository navigation
feat(install): opt a plugin dependency out of the native route (native: false) - #5001
Daniel Meppiel (danielmeppiel) wants to merge 39 commits into
Conversation
Red-first lifecycle cells for native: false and native_plugins: false: loose deployment, project default and override, route flips both ways, new skills on upgrade, --frozen refusal, transitive defaults, user scope, no native notice for opted-out deps, parse-time refusal, and the single native-route diagnostic naming the opt-out. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The tests can pass despite incorrect behavior because they check the marketplace cache instead of native deployment and omit Copilot loose-skill assertions.
2 open issues
What changed in this PR
Adds red-first lifecycle tests for #4995’s native-plugin opt-out, defining expected behavior for APM’s install pipeline. This push contains tests and a changelog fragment; implementation and documentation are planned to follow.
Changes:
- Adds real-CLI coverage for route selection, defaults and overrides, route flips, frozen installs, transitive dependencies, user scope, validation, and diagnostics.
- Adds a changelog fragment describing the intended
native: falseandnative_plugins: falsebehavior.
| File | Description |
|---|---|
tests/integration/test_native_plugin_opt_out_lifecycle.py |
Defines lifecycle expectations for native-plugin opt-out behavior. |
changelog.d/5001.added.md |
Records the planned loose-deployment feature. |
Review effort: Balanced
…ncy loose (#4995) One owner, native_plugins/route.py::effective_native_route, decides whether a dependency may take the native plugin route: the root manifest's own declaration's native key, else its native_plugins default, else automatic. The Claude Code and Codex native planners ask it before any trust or fingerprint work; audit replay decides by the same manifest. --frozen refuses a dependency the manifest moves off the native route. Non-boolean values are rejected naming the field. Spec: req-mf-030, Section 4.2.6. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
APM Spec Guardian:
|
| Panel | Verdict | Shocked | New B | New R | New N |
|---|---|---|---|---|---|
| Swagger Editor | needs_revision | 7/10 | 1 | 5 | 4 |
| Oci Editor | ship_with_followups | 8/10 | 0 | 4 | 4 |
| Pkgmgr Editor | needs_revision | 7/10 | 1 | 4 | 3 |
| Tag Architect | ship_with_followups | 7/10 | 0 | 9 | 2 |
B = new blocking findings, R = new recommended, N = new nits.
Counts are signal strength, not gates. The maintainer ships.
Convergent themes (flagged by 2+ panels)
- T1 -- No normative rule exists for a manifest/lock route mismatch. A frozen install, restore or audit replay of a locked native_plugin entry for a dependency that the root manifest now opts out lets req-na-002 (derive activation from the lock) conflict with req-mf-030. Back-references between req-na-002, Section 8.5.11 and req-mf-030 are also missing. (supporting: pkg-blk-r1-1, pkg-rec-r1-1, tag-rec-r1-1, oci-rec-r1-2, tag-rec-r1-8, oci-nit-r1-4 (8.5.11 back-reference))
- T2 -- The transition clause ('recorded writing') restates req-na-004 and conflicts with it. req-na-004 derives ownership from the lockfile, with no receipts and no ownership role for native_declared. The clause is a closed list: it misses generated-marketplace entries, the missing-lock and moved-binding rules, and the projection-to-native direction. The route flip is also not stated as one rollback unit. (supporting: tag-rec-r1-2, oci-rec-r1-1, sw-rec-r1-2, pkg-rec-r1-4, oci-rec-r1-3)
- T3 -- The opt-out's reach does not line up with the deployment-boundary requirements. 'MUST instead be projected' has no req-tg-011 opacity carve-out. req-mf-030 binds only 8.5.11 activation, not req-tg-013 registration, which the implementation also gates in the Codex planner. Whether an opted-out projection is a req-na-006 split install is not stated. (supporting: sw-blk-r1-1, oci-rec-r1-4, sw-rec-r1-1, pkg-nit-r1-2 (split install / req-na-006))
- T4 -- Value and scope semantics are underspecified: boolean typing against req-mf-020(a) and YAML 1.1 spellings, validation scope in dependency manifests, no effect outside the root manifest, the root manifest at user scope, and duplicate root declarations with conflicting native values. (supporting: tag-rec-r1-3, oci-nit-r1-1 (boolean spelling), sw-rec-r1-3, pkg-rec-r1-3, tag-rec-r1-7, pkg-nit-r1-3 (user-scope root), tag-nit-r1-1 (user-scope root), oci-nit-r1-2 (user-scope root), sw-nit-r1-2 (user-scope root), pkg-rec-r1-2, sw-nit-r1-3 (duplicate declarations))
- T5 -- Discoverability and table accuracy: the Section 4.2 table has no native_plugins row, the Section 4.3 native row is wrong under native_plugins: false, there is no Appendix A prose-only schema note, and the 4.3.2 link and 'on every target' wording are inconsistent. (supporting: tag-rec-r1-4, sw-rec-r1-4, tag-rec-r1-5, sw-nit-r1-4 (Appendix A note), pkg-nit-r1-1 (4.3 row), sw-nit-r1-1 (4.3.2 link), tag-nit-r1-2 (on every target))
- T6 -- The conformance binding does not cover the frozen refusal or the route transition clause of req-mf-030. Lifecycle cells are untagged and no spec_conformance test exists for them. (supporting: tag-rec-r1-9, sw-rec-r1-5)
Fold now (13 item(s))
- [F1 / T3] Section 4.2.6, req-mf-030 (second sentence) -- In req-mf-030, replace the sentence 'Such a dependency MUST instead be projected as primitives into target directories, as for a plugin the consumer does not activate natively.' with: 'Such a dependency MUST instead be handled as a plugin the consumer does not activate natively: projected as primitives into target directories, except where req-tg-011 makes the dependency opaque at the deployment boundary, in which case that requirement governs. This projection is not a split install under req-na-006.' This clears blocker sw-blk-r1-1.
Success criterion:grep -c 'except where \[req-tg-011\](#req-tg-011) makes the dependency opaque' openapm-v0.1.md == 1; grep 'MUST instead be projected as primitives into target directories, as for' returns 0 hits; the req-mf-030 anchor count stays 1. - [F2 / T3] Section 4.2.6, req-mf-030 (after the first sentence) -- In req-mf-030, immediately after the first sentence (which ends '...a dependency of a root manifest that declares
native_plugins: false.'), insert: 'A consumer that registers dependencies with a target-native plugin host under req-tg-013 MUST NOT register such a dependency there either.' Do not edit the first sentence: the spec_conformance test asserts its prefix 'MUST NOT natively activate, on any target, a dependency that the root'.
Success criterion:grep -c 'under \[req-tg-013\](#req-tg-013) MUST NOT register such a dependency there either' == 1; the req-mf-030 first-sentence prefix is still byte-identical (assert_spec_contains in tests/spec_conformance/test_native_route_reqs.py passes). - [F3 / T1] Section 4.2.6, req-mf-030 (append as final sentences) -- Append to the end of req-mf-030 (after the transition sentence as revised by F6): 'Under a frozen install (req-lk-006), when the lockfile records a
native_pluginentry for a dependency that the current root manifest keeps off native activation under this requirement, the consumer MUST fail before any lockfile, target configuration, or deployment write, with a diagnostic naming the dependency. A restore or an audit replay MUST NOT natively activate such a dependency from its lockednative_pluginentry. Informative: the reverse move, a dependency locked as projected that the root manifest no longer opts out, is not a mismatch under this requirement; the replayed lockfile keeps it projected per req-na-002 until a non-frozen install records the native route.' This clears blocker pkg-blk-r1-1 in the native-to-loose direction, which is the conflict the blocker names, and makes the existing --frozen refusal normative.
Success criterion:grep -c 'Under a frozen install (\[req-lk-006\](#req-lk-006)), when the lockfile records anative_pluginentry' == 1; grep -c 'MUST NOT natively activate such a dependency from its locked' == 1; the new sentences contain no new req-* anchor. - [F4 / T1] Section 8.5.11, req-na-002 (first sentence) -- In req-na-002, change 'MUST derive the set of activated plugins at a scope only from the lockfile it writes or replays for that scope.' to 'MUST derive the set of activated plugins at a scope only from the lockfile it writes or replays for that scope, excluding any dependency that req-mf-030 keeps off native activation.' This also satisfies the 8.5.11 back-reference asked for in tag-rec-r1-8 and oci-nit-r1-4.
Success criterion:grep -c 'excluding any dependency that \[req-mf-030\](#req-mf-030) keeps off native activation' == 1, inside the req-na-002 paragraph. - [F5 / T1] Section 5.2, per-entry table,
native_pluginrow -- In thenative_pluginrow, immediately before the closing '(Amendments 0.1.65, 0.1.66 and 0.1.74.)', insert: 'A dependency that req-mf-030 keeps off native activation gets nonative_pluginentry, and a frozen install refuses a lockfile that records one for it.' Then change the closing parenthetical to '(Amendments 0.1.65, 0.1.66, 0.1.74 and 0.1.77.)'.
Success criterion:Thenative_pluginrow contains '[req-mf-030](#req-mf-030) keeps off native activation gets nonative_pluginentry' and '(Amendments 0.1.65, 0.1.66, 0.1.74 and 0.1.77.)'; the table still renders as one row (no stray pipe). - [F6 / T2] Section 4.2.6, req-mf-030 (transition sentence) -- In req-mf-030, replace 'When a dependency moves between native activation and projection, the consumer MUST remove only the activation entries and deployed plugin root it recorded writing for that dependency, and MUST NOT modify activation entries it did not write.' with: 'When a dependency moves between native activation and projection, the consumer MUST reconcile the activation entries, deployed plugin root and generated marketplace entries for that dependency per req-na-004 from the previous and the next lockfile, including that requirement's missing-lockfile and moved-binding rules, and MUST NOT modify an activation entry that requirement does not attribute to the consumer; on the move to native activation, files it projected for the dependency are reconciled as for any other change to that entry's
deployed_files(Section 5.2).'
Success criterion:grep -c 'recorded writing' openapm-v0.1.md == 0 (Appendix D excluded once F12 lands); grep -c 'per \[req-na-004\](#req-na-004) from the previous and the next lockfile' == 1. - [F7 / T4] Section 4.2.6, req-mf-030 (value-validation sentence) -- In req-mf-030, replace 'The consumer MUST reject a
nativeornative_pluginsvalue that is not a boolean, with a diagnostic naming the field.' with: 'The consumer MUST reject anativeornative_pluginsvalue that is not a boolean, with a diagnostic naming the field, in any manifest it parses, including a dependency's manifest, where these keys otherwise have no effect. A boolean here is the plain scalartrueorfalse, or a scalar tagged!!bool(req-mf-020); the treatment of the YAML 1.1 spellingsyes,no,onandoffis not defined in v0.1, and authors usetrueorfalse.'
Success criterion:grep -c 'in any manifest it parses, including a dependency' == 1; grep -c 'the treatment of the YAML 1.1 spellings' == 1; no new req-* anchor. - [F8 / T4] Section 4.2.6 lead paragraph -- In the Section 4.2.6 lead paragraph, change 'the project default for the
nativedependency field (Section 4.3)' to 'the project default for thenativedependency field (Section 4.3.2)'. After the paragraph's last sentence, append: 'The root manifest is the manifest of the installation scope: the project manifest, or at user scope the user-scope manifest the consumer discloses under req-tg-014.native_pluginsandnativekeys in any other manifest have no effect on activation.'
Success criterion:Section 4.2.6 contains '[Section 4.3.2](#432-object-form)' and 'the user-scope manifest the consumer discloses under [req-tg-014](#req-tg-014)'; the anchor #432-object-form resolves. - [F9 / T5] Section 4.3.2, object-form field table,
nativerow -- Replace thenativerow description with: 'Boolean, honored only on a root-manifest declaration.falsekeeps this dependency off native plugin activation on every target;trueleaves activation to the consumer even undernative_plugins: false; absent follows the root manifest default (Section 4.2.6). See req-mf-030.'
Success criterion:Thenativerow contains 'absent follows the root manifest default' and '[Section 4.2.6](#426-native_plugins)'; the phrase 'trueor absent leaves activation to the consumer' no longer appears in the 4.3.2 table. - [F10 / T5] Section 4.2, top-level field table -- Insert a row after the
marketplacesrow: '|native_plugins| no | boolean; root-manifest default for the dependencynativefield, see Section 4.2.6 and req-mf-030 |'.
Success criterion:The Section 4.2 table has exactly one row whose first cell is 'native_plugins'; the table column count is unchanged (four pipes per row). - [F11 / T5] Section 4.2.6 (informative note after req-mf-030) -- After the req-mf-030 paragraph, add: '> Editorial note. The v0.1 manifest schema in Appendix A does not type
nativeornative_plugins; their boolean constraint is stated in prose only (req-mf-030) until a later schema resource types them. Schema bytes are unchanged by amendment 0.1.77.'
Success criterion:grep -c 'does not typenativeornative_plugins' == 1; the Appendix A anchor resolves; no schema file under docs/src/content/docs/specs/schemas/ changes. - [F12 / standalone] Appendix D, 0.1.77 row and the following summary paragraph -- Rewrite the 0.1.77 row to describe the folded text: req-mf-030 now also forbids req-tg-013 registration of an opted-out dependency (F2); defers to req-tg-011 where that requirement makes the dependency opaque, and states that the projection is not a req-na-006 split install (F1); requires a frozen install to fail before writes on a locked native_plugin entry for an opted-out dependency, and forbids restore or audit-replay activation (F3); reconciles a route move per req-na-004 (F6, replacing the 'recorded writing' wording); and scopes value validation to any parsed manifest with plain true/false booleans (F7). State that req-na-002 is revised in place (F4) and that Sections 4.2, 4.2.6, 4.3.2, 5.2 and 8.5.11 are updated. Extend the Section 9.2 sentence: '..., a consumer that natively activates or registers such a dependency, that activates it from a locked entry under a frozen install, restore or audit replay, or that rewrites activation entries req-na-004 does not attribute to it, no longer conforms.' In the summary paragraph, add 'and the 0.1.77 proposal revises req-na-002 in place' to the in-place revisions list. Keep 'Adds one MUST' and the count 152 -> 153 (148 MUST, 5 SHOULD).
Success criterion:The 0.1.77 row names req-tg-013, req-tg-011, req-lk-006 and req-na-002; the summary paragraph contains 'the 0.1.77 proposal revises [req-na-002](#req-na-002) in place'; totals in Section 1.3, Appendix C and Appendix D all read 153 (148 MUST, 5 SHOULD). - [F13 / T6] Conformance binding: tests/spec_conformance/test_native_route_reqs.py, lifecycle cells, CONFORMANCE.json/.md -- Add @pytest.mark.req('req-mf-030') spec_conformance tests that (a) assert frozen_route_change_reasons names a dependency that is locked with native_plugin and that the manifest opts out, and returns no reason for the reverse direction, and (b) assert_spec_contains the new F1, F2, F3 and F6 anchor phrases. Tag the lifecycle cells the panel cited (frozen refusal and route transition, cells 3, 5 and 9 in tests/integration/test_native_plugin_opt_out_lifecycle.py) with req-mf-030. Regenerate CONFORMANCE.json and CONFORMANCE.md.
Success criterion:pytest -m component tests/spec_conformance/test_native_route_reqs.py passes; CONFORMANCE.json lists more req-mf-030 bindings than before the fold; the conformance regeneration check is clean (no diff after regen).
Defer to v0.1.1 (8 items)
- [F14 / T4] Section 4.2.6, req-mf-030 (duplicate root declarations) -- Specify an order-independent result when one dependency identity is declared more than once in the root manifest with conflicting
nativevalues: eitherfalsewins (aligned with req-rs-018 clause 3), or the manifest is rejected at parse time naming both declarations. The implementation is currently first-wins, so this needs a code change and a regression test alongside the text. - [F15 / T2] Section 4.2.6 req-mf-030 / Section 8.5.11 req-na-004 (rollback unit) -- Extend the rollback unit for a route move so that settings, generated marketplace, deployed plugin root, projected primitive files and the lockfile write for that dependency commit together, so that both routes are never committed together and a dependency is never left with neither. First gather implementation evidence (a fault-injection lifecycle test) that the projection and lock writes are inside the transaction.
- [F16 / T1] Section 4.2.6, req-mf-030 (audit drift) and Section 5.5 -- Once a lifecycle test proves the behavior, add: 'An audit reports a locked
native_pluginentry for a dependency that req-mf-030 keeps off native activation as drift.' This is held back from F3 because the panel cited no audit-side evidence. - [F17 / T1] Section 4.2.6, req-mf-030 (reverse-direction frozen check) -- Decide whether a frozen install must also refuse the loose-to-native move. The lock has no positive marker for 'projected by opt-out', so this would mean re-deriving the route from the manifest, req-na-001 qualification and req-na-005 approval. If adopted, replace F3's informative reverse-direction sentence with a normative clause and implement the check.
- [F18 / standalone] Section 4.2.6 (forward-compatibility note) -- Add an informative forward-compatibility note: a pre-0.1.77 consumer preserves and ignores top-level
native_plugins(req-mf-006) and so may activate natively;trueis equivalent to absent; a future widening of the value domain is rejected by v0.1.77 consumers (fail-closed). Before writing this, verify how a pre-0.1.77 consumer treats an unknownnativekey on a dependency object entry. The implementation has reject_unknown_* field guards, so older consumers may reject the key rather than ignore it, and the note must say which. - [F19 / T6] Section 4.2.6 (possible req-mf-031 split) -- If testability still lags after F13, split the route-transition and frozen clauses of req-mf-030 into a new req-mf-031, with count bump, Appendix C row, Section 11.3.2 enumeration and requirements-manifest updates.
- [F20 / standalone] Section 8.5.11, req-na-002 / req-na-004 (retiring an edited plugin root) -- Require the req-na-002 drift diagnostic before a route move retires a deployed plugin root whose recomputed digest differs from the locked fingerprint, so that user edits are surfaced rather than removed silently.
- [F21 / T5] Appendix A manifest schema (next schema publication) -- Type
native_plugins(top-level) andnative(dependency object form) as boolean in the next manifest schema resource, with a new schema publication identity, and then drop the F11 editorial note.
Defer to v0.2
- [F22 / T4] req-mf-020 (YAML safe subset) and req-mf-030 booleans -- Within the complete YAML safe-subset profile, define boolean resolution as the YAML 1.2 core schema (
true/false, or!!bool) and reject the YAML 1.1 spellingsyes,no,onandofffor every boolean field, includingnativeandnative_plugins. This is deferred because the current loader resolves YAML 1.1 booleans, so a v0.1 MUST-reject would make the implementation nonconforming.
Reserved slot:req-mf-020: 'The complete safe-subset profile is reserved for v0.2'
Rejected findings
- pkg-blk-r1-1 (bidirectional MUST-fail clause only) -- The conflict the blocker names, an opted-out dependency activated from a locked entry, is the native-to-loose direction, and F3 clears it. Making the frozen failure bidirectional would make
native: trueor an absent key, which only leave activation to the consumer, a hard frozen-failure trigger with no lock marker to compare against. That question is tracked as F17, not folded into the blocker fix. - tag-rec-r1-3 / oci-nit-r1-1 (normative rejection of YAML 1.1 boolean spellings in v0.1) -- The implementation loader resolves YAML 1.1 booleans, so a v0.1 MUST-reject would make the reference implementation nonconforming. F7 defines the plain true/false and !!bool forms and leaves the 1.1 spellings undefined. The strict rule moves to the reserved v0.2 safe-subset profile (F22).
- tag-rec-r1-7 (reserving a producer-side route hint) -- The artifact has no reserved-slot section for a producer-side route hint, and a new reservation is a scope decision outside an editorial patch. The other half of the finding, no effect outside the root manifest, is folded in F7 and F8.
- tag-rec-r1-8 / oci-nit-r1-4 (separate back-reference in the 8.5.11 introduction) -- Subsumed by F4, which places the req-mf-030 reference in req-na-002 itself, the normative point where activation is derived. A second reference in the introduction would be redundant.
- pkg-rec-r1-4 / oci-rec-r1-3 / sw-rec-r1-2 (one rollback unit including projection and lock write, as a fold-now) -- Not rejected on the merits; moved to F15. Folding it now would add an atomicity obligation that the panel has not shown the implementation meets. F6 folds the req-na-004 deferral part of these findings.
Linter notes (1 check(s) failed)
- [11] The PR also changes 12
.pyfiles: the implementation ships with the spec amendment, as intended for this feature PR. Python lint runs in CI, not here.
Linter handoff: (1) Within req-mf-030, keep this sentence order after the folds: original first sentence (unchanged) -> F2 sentence -> F1 replacement -> the unchanged 'A
nativekey binds only the declaration that carries it' sentence -> F7 replacement -> F6 replacement -> F3 appended sentences. Confirm that tests/spec_conformance/test_native_route_reqs.py assert_spec_contains strings ('MUST NOT natively activate, on any target, a dependency that the root' and 'Anativekey binds only the declaration that carries') still match byte for byte. (2) Re-grep the req-* anchor count: it must stay 153, with 148 MUST and 5 SHOULD in Section 1.3, Appendix C and Appendix D. No fold adds an anchor; F4 is an in-place revision of req-na-002, which must appear in the Appendix D 0.1.77 row and in the summary paragraph's in-place list. (3) Verify that every new link anchor resolves: #432-object-form, #426-native_plugins, #req-tg-011, #req-tg-013, #req-tg-014, #req-lk-006, #req-na-006, #req-mf-020, #appendix-a-normative-json-schemas-inline, #52-per-entry-fields. (4) grep 'recorded writing' outside Appendix D history text: expect 0 hits after F6 and F12. (5) Implementation cross-check before merge: confirm that a schema-bearing Agent Plugins v1 dependency with native: false takes the req-tg-011 skip path (one diagnostic, no legacy integrator) and is not projected; if it is projected, F1 exposes a code defect to fix in this PR. (6) Regenerate CONFORMANCE.json and CONFORMANCE.md after F13 and confirm the new req-mf-030 bindings. (7) Run an ASCII-only byte check on the edited spec. Confirm that no fold introduces the tokens CNCF, Linux Foundation, Sandbox, Incubation, W3C Process or IETF RFC stream; none were proposed this round. (8) Nit ids such as pkg-nit-r1-1 were assigned by the synthesizer, in the order each panel listed its nits, because the panels did not number them.
Full per-panel findings
Swagger Editor -- shocked_meter 7/10, confidence high
Summary: Well-indexed amendment (counts, anchor slot, class listings all agree). One blocker: req-mf-030 mandates projection without the req-tg-011 opacity carve-out, contradicting req-tg-011 for schema-bearing Agent Plugins v1 dependencies. Recommended: cover req-tg-013 registration so 'every target' holds, defer the transition clause to req-na-004 plus a rollback unit, define boolean against req-mf-020(a), add a native_plugins row to the 4.2 table, req-mark tests for the ownership clause.
New blocking findings (1)
- [sw-blk-r1-1] req-mf-030 vs req-tg-011 -- 'MUST instead be projected as primitives' has no req-tg-011 opacity carve-out, so an opted-out schema-bearing Agent Plugins v1 dependency faces two incompatible MUSTs.
New recommended findings (5)
- [sw-rec-r1-1] req-mf-030 scope; 4.3.2 native row -- native: false does not bind req-tg-013 registration although the row promises 'every target'.
- [sw-rec-r1-2] req-mf-030 transition clause vs req-na-004 -- Restates req-na-004 in different words, misses missing-lock/moved-binding rules, the projection-to-native direction and a rollback unit.
- [sw-rec-r1-3] req-mf-030 vs req-mf-020(a) -- 'boolean' undefined against untyped plain scalars; validation scope in dependency manifests unstated.
- [sw-rec-r1-4] Section 4.2 field table -- No native_plugins row.
- [sw-rec-r1-5] req-mf-030 conformance binding -- Ownership clause has no req-marked test.
New nit findings (4)
- Link Section 4.3.2 from 4.2.6.
- Define root manifest at user scope.
- Duplicate root declarations with conflicting native values.
- Appendix A schema does not type the new keys.
Oci Editor -- shocked_meter 8/10, confidence high
Summary: Small, well-bounded amendment: the opt-out only narrows trust, binds to the root manifest, counts consistent. Sharp edge: 'recorded writing' conflicts with req-na-004's lockfile-derived ownership. Unspecified: frozen replay on a lock/manifest route mismatch, one rollback unit for a route flip, and whether native: false suppresses req-tg-013 registration.
New recommended findings (4)
- [oci-rec-r1-1] req-mf-030 vs req-na-004 -- 'recorded writing' implies a write log the spec forbids; omits marketplace regeneration, cross-target false keys and moved-binding cases.
- [oci-rec-r1-2] req-mf-030 vs req-na-002/req-lk-006 -- Frozen replay of a locked native_plugin entry for an opted-out dependency is unspecified.
- [oci-rec-r1-3] req-mf-030 route move; req-tg-013 exactly-once -- Route flip must be one rollback unit; never both or neither route committed.
- [oci-rec-r1-4] req-mf-030 scope -- Opt-out reach narrower than wording (req-tg-013 registration not covered).
New nit findings (4)
- Define boolean spellings (YAML 1.1 yes/no/on/off).
- User-scope root manifest.
- Drift diagnostic before retiring an edited plugin root.
- Back-reference from 8.5.11.
Pkgmgr Editor -- shocked_meter 7/10, confidence high
Summary: Opt-out semantics are clean, but there is no normative rule for a manifest/lock route mismatch: req-na-002 lock-only derivation conflicts with req-mf-030 on frozen, restore and audit replay, and the implemented --frozen refusal has no normative hook. Also: order-independence for conflicting root declarations, validation scope in dependency manifests, an atomic route flip.
New blocking findings (1)
- [pkg-blk-r1-1] req-mf-030 vs req-na-002 / req-lk-006 / 5.2 native_plugin row -- No normative rule when manifest and lockfile disagree on a dependency's route; frozen/restore/audit replay readings diverge.
New recommended findings (4)
- [pkg-rec-r1-1] req-mf-030 frozen, loose-to-native -- Frozen check should be bidirectional; absence of native_plugin is not an opt-out marker.
- [pkg-rec-r1-2] req-mf-030 multiple root declarations -- Implementation is first-wins and order-dependent; make false-wins or reject.
- [pkg-rec-r1-3] req-mf-030 validation scope -- Unstated whether dependency manifests are validated or ignored.
- [pkg-rec-r1-4] req-mf-030 vs req-na-004 rollback unit -- Route flip is not atomic in the spec.
New nit findings (3)
- 4.3 native row wrong under native_plugins: false.
- State that opted-out projection is not a req-na-006 split install.
- Root manifest of the installation scope.
Tag Architect -- shocked_meter 7/10, confidence medium
Summary: Well layered, harness-neutral, fully indexed in Appendix C and the machine-readable manifest. Follow-ups: frozen behavior on a route change, a transition clause that restates req-na-004 and is ambiguous for the move back to native, the boolean type vs req-mf-020(a) and the untyped schema; forward-compatibility notes, the missing 4.2 table row and conformance binding of the transition clause.
New recommended findings (9)
- [tag-rec-r1-1] req-mf-030 frozen -- Frozen mismatch unspecified.
- [tag-rec-r1-2] req-mf-030 transition vs req-na-004 -- Closed list misses the projection-to-native direction.
- [tag-rec-r1-3] 4.2.6 vs req-mf-020(a) -- Boolean definition and YAML 1.1 divergence.
- [tag-rec-r1-4] 4.2 field table -- Missing native_plugins row.
- [tag-rec-r1-5] Appendix A -- Schema does not type the new keys.
- [tag-rec-r1-6] 4.2.6 forward compatibility -- Pre-0.1.77 consumers ignore native_plugins; domain widening posture.
- [tag-rec-r1-7] req-mf-030 layering -- native_plugins outside the root has no effect; no producer-side hint.
- [tag-rec-r1-8] 8.5.11 / req-na-002 -- No back-reference to req-mf-030.
- [tag-rec-r1-9] Conformance binding -- Transition clause and frozen refusal untested under req-mf-030.
New nit findings (2)
- Root manifest at user scope = req-tg-014 manifest.
- Use 'on every target' consistently.
This panel is advisory. It does not block merge. Re-apply the spec-review label after addressing feedback to re-run.
…ip, false wins Spec req-mf-030 folds F1-F12: req-tg-011 opacity carve-out, no req-tg-013 registration, frozen refusal and replay rules, req-na-004 reconciliation, boolean scope, user-scope root manifest, table rows and the editorial schema note; req-na-002 revised in place. Code: an opted-out Agent Plugin takes the req-tg-011 skip path with one diagnostic; conflicting root declarations resolve to false in any order; the frozen refusal renders its tip from the remediation catalog. Docs for the manifest schema, the plugins guide and apm-usage. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
APM Spec Guardian:
|
| Panel | Verdict | Shocked | New B | New R | New N |
|---|---|---|---|---|---|
| Swagger Editor | ship_with_followups | 8/10 | 0 | 3 | 3 |
| Oci Editor | ship_with_followups | 8/10 | 0 | 2 | 3 |
| Pkgmgr Editor | ship_with_followups | 8/10 | 0 | 3 | 3 |
| Tag Architect | ship_with_followups | 8/10 | 0 | 2 | 2 |
B = new blocking findings, R = new recommended, N = new nits.
Counts are signal strength, not gates. The maintainer ships.
Convergent themes (flagged by 2+ panels)
- T1 -- YAML 1.1 spellings: the "not defined" wording contradicts the non-boolean MUST-reject. Make it deterministic: reject them. (pkg-rec-r2-1, oci-rec-r2-2, sw-rec-r2-1, tag nit)
- T2 -- duplicate root declarations: state the rule the code ships (any
native: falsewins; an explicittrueoverrides thenative_plugins: falsedefault; independent of order and block). (pkg-rec-r2-2, tag-rec-r2-1, sw nit) - T3 -- restore and audit: a restore that keeps the lockfile fails like a frozen install; an audit reports drift without writing. (oci-rec-r2-1, tag nit, sw nit, pkg nit)
- T4 -- req-tg-013 scope: widen the subject and retire a registration that predates the opt-out. (tag-rec-r2-2, sw-rec-r2-2) Deferred.
Fold now (4 item(s))
- [F1 / T1] req-mf-030, boolean sentence. Replace it with: "A boolean here is exactly the plain scalar
trueorfalse, or a scalar tagged!!bool(req-mf-020); any other plain scalar, includingTrueandFALSEand the YAML 1.1 spellingsyes,no,onandoffin any letter case, is not a boolean and is rejected as above." Code: add a raw-scalar spelling check fornative_pluginsand fornativeondependencies.apm/devDependencies.apmentries, in root and dependency manifests. Add tests that rejectno,OffandTrueand accept!!bool false. - [F2 / T2] req-mf-030, after the "never a parent's
nativekey" sentence. Insert: "When the root manifest declares the same dependency more than once, acrossdependenciesanddevDependencies, a declaration settingnative: falsekeeps it off native activation; otherwise a declaration settingnative: trueleaves activation to the consumer even undernative_plugins: false; otherwise thenative_pluginsdefault applies, whatever the order or block of the declarations." No code change; this matches_declared_native. Add a cell for both declaration orders. - [F3 / T3] req-mf-030, frozen and replay sentences. The frozen clause covers "a frozen install (req-lk-006), or a restore that does not rewrite the lockfile" and fails "before any lockfile, target configuration, deployment, or cache mutation, with a diagnostic naming the dependency and stating that its native plugin route changed". An audit replay "MUST NOT natively activate such a dependency from its locked
native_pluginentry; it reports the mismatch as drift without writing." Expected code impact is none; confirm that_route_manifestreturning None on an invalid manifest does not silently replay the native route. - [F4] Changelog row 0.1.77. Mirror F1 to F3 in the row text and keep "Statement count: 152 -> 153 (148 MUST, 5 SHOULD)".
Defer to v0.1.1 (6 items)
- [F5] Make a cross-route move (retire native, project loose, write the lock) one rollback unit. (pkg-rec-r2-3; oci round 1)
- [F6 / T4] Widen the req-mf-030 subject to consumers that register under req-tg-013, extend the frozen and replay rules to those registrations, and retire a registration that predates the opt-out. This is its own amendment.
- [F7] State explicitly whether the rejection sentence binds every consumer or only native-activating ones. The reference implementation rejects unconditionally. (sw-rec-r2-3)
- [F8] Before retiring a deployed plugin root that was edited, run the drift check and keep the root. (oci, carried over from round 1)
- [F9] Informative notes: the silent reverse direction, deliberate fail-closed rejection in dependency manifests, and "neither route is deployed" in the frozen diagnostic.
- [F10] Name the schema resource that will type
nativeandnative_plugins.
Defer to v0.2
- [F11 / T1] req-mf-020, Appendix A. Define boolean spellings once for all manifest fields in the safe-subset profile, and type the two keys in the next manifest schema resource.
Reserved slot:req-mf-020 ('The complete safe-subset profile is reserved for v0.2')
Rejected findings
- sw-rec-r2-1 (variant that legalizes YAML 1.1 spellings): this conflicts with YAML 1.2 and req-mf-020(a); three panels prefer rejecting them. Its premise, that the reference parser accepts
no, is correct and is why F1 needs code. - oci-rec-r2-2 (premise only): the recommendation is adopted as F1. The premise that ruamel YAML 1.2 already rejects these spellings is wrong for the read path, so F1 is not code-neutral.
Linter handoff: after the folds, re-count statements (expect 153) and reconcile them with the requirements manifest and CONFORMANCE. Verify that F1's code and tests go through
load_manifest. Confirm thatenforce_frozenruns before any cache mutation. Align the user docs (manifest-schema.md, install-plugins.md, apm-guide dependencies.md) with F1. Run the ASCII and forbidden-token scans.
Round-1 linter: 10 of 11 checks pass. Check 11 notes that the PR also changes .py files, which is expected for this feature PR.
This panel is advisory. It does not block merge. Re-apply the spec-review label after addressing feedback to re-run.
There was a problem hiding this comment.
🟡 Changes recommended
An unconditionally enabled integration test fails on successful native installs, while unresolved validation and routing defects can accept invalid values, lose opt-outs, or change locked routes.
11 open issues
Remove or implement unsupported native-install assertions · New Reconcile opted-out plugins in carried rows · New Preserve locked route during audit replay · New Pass root manifest to replay capability · New Reject explicit null for native_plugins · New Accept native in parent-Git dependencies · New Reject explicit null for native · New Preserve native when writing subset manifests · New Gate frozen Codex route changes before writes · New Verify native deployment state, not the Claude marketplace cache Check loose skill projection in Copilot’s shared skills directory
Review effort: Balanced
The single native-route diagnostic now points at the per-dependency opt-out. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Only plain true/false (or an explicit !!bool) is a boolean for native and native_plugins: YAML 1.1 spellings such as no, Off and True are refused on load, naming the field, in root and dependency manifests. Spec text for duplicate declarations, the frozen and restore refusal, and audit drift. The frozen route refusal moves to frozen_retirement, keeping service.py in its budget. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…play A present null for native or native_plugins is refused like any non-boolean; git: parent entries accept native; registry and insecure-git serialization keep it; audit replay publishes the root manifest to the Agent Plugin admission; lifecycle oracles check Copilot's loose skills and the user-scope native root. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved validation, serialization, and audit replay defects can silently enable native routing, discard explicit opt-outs, or report false drift for locked loose installations.
12 open issues
Remove or implement unsupported native-install assertions Pass root manifest into replay native-registration scope · New Serialize native flag for registry dependencies · New Gate frozen Codex route changes before writes Preserve native when writing subset manifests Reject explicit null for native Accept native in parent-Git dependencies Pass root manifest to replay capability Preserve locked route during audit replay Reconcile opted-out plugins in carried rows Verify native deployment state, not the Claude marketplace cache Check loose skill projection in Copilot’s shared skills directory
1 resolved since last review
Review effort: Balanced
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
APM Spec Guardian: round-2 folds F1-F4 are applied at 5075025 (F1 raw-scalar boolean check in code with load-path tests; F2 multi-declaration rule; F3 frozen/restore/audit wording; F4 changelog row). No round 3 needed per the round-2 synthesis; deferred items F5-F11 stay as follow-ups. Advisory only. |
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because unpublished findings identify inconsistent manifest validation across loading paths and incomplete enforcement of the shared routing boundary.
12 resolved since last review
Remove or implement unsupported native-install assertions Serialize native flag for registry dependencies Gate frozen Codex route changes before writes Preserve native when writing subset manifests Reject explicit null for native Accept native in parent-Git dependencies Reject explicit null for native_plugins Pass root manifest to replay capability Preserve locked route during audit replay Reconcile opted-out plugins in carried rows Verify native deployment state, not the Claude marketplace cache Check loose skill projection in Copilot’s shared skills directory
Review effort: Balanced
A native or native_plugins value brought in by a << merge key is checked like a written one. Audit replay propagates a manifest that fails to parse instead of replaying without its route choices. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Re-merges the notice branch at a12eae1. native_route_notice names native: false at both scopes, superseding the project-only skills hint; J05 goldens regenerated. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Non-CI audits can crash before emitting reports on native-route drift, and positional version updates can silently discard an existing native-deployment opt-out.
2 open issues
1 resolved since last review
Review effort: Balanced
On 2026-11-23 the job took 252 s at p50, 296 s at p90 and 299 s at most across 30 green runs, against a 300 s timeout, and about 9 runs were cancelled at the cap (microsoft#4975, microsoft#4964, microsoft#5001, microsoft#4982). The cap moves to 10 minutes as headroom only: the scaling assertion, selection and the job's non-required status are unchanged. The ratchet topology pin follows. Co-authored-by: Copilot App <[email protected]>
A route the replay cannot decide (an invalid native value, or a locked native plugin apm.yml now keeps loose) raised out of non-CI apm audit, so JSON and SARIF output was never written, and out of export patch as a generic error. replay_route_manifest raises NativeRouteError for both; _check_drift turns it into a failed drift result and export patch reports it as a replay failure. Co-authored-by: Copilot App <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed to evaluate an unpublished error-handling risk where malformed YAML can abort non-CI audits before JSON/SARIF output is emitted.
No open issues 🎉
2 resolved since last review
Review effort: Balanced
…the policy block Restore 'except (AgentPluginDeploymentBoundaryError, CodexNativeError) as exc:' byte for byte and catch NativeRouteError with PolicyViolationError, whose failed drift CheckResult it shares, keeping _check_drift within the return limit. Co-authored-by: Copilot App <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Conflicts: drift.py (main's replay_targets/converged_targets kept; #5001's route_manifest line now reads converged_targets), the spec revision table (0.1.78 and main's 0.1.79 rows both kept; the 0.1.78 reservation line dropped) and the regenerated CONFORMANCE files. drift.py's LOC budget moves 1058 -> 1070: main reached 1055 lines, and #5001's accepted replay code adds 15. Co-authored-by: Copilot App <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Revert the drift.py budget bump. Restore main's inline root/dependency PackageInfo framing (the deployment_package_root writes stay in drift.py, the frame owner), import the route builder on one aliased line, and keep the route_from_lock comment inline. drift.py is 1057 lines; no behaviour change. Co-authored-by: Copilot App <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
| if not effective_native_route(getattr(package_info, "dependency_ref", None), manifest): | ||
| return None |
| path = scope_manifest_path(config.project_root, user_scope=config.user_scope) | ||
| try: | ||
| manifest = load_route_manifest(path) | ||
| except ValueError as exc: | ||
| raise NativeRouteError(str(exc)) from exc |
|
Closing as superseded. The real-harness runs showed the first-session loading problem behind #4995 comes from Claude Code not fully loading a relatively declared project marketplace until it is registered in its user-level known marketplaces. #5184 fixes that without a per-dependency opt-out, so this change is no longer needed. |



Description
Lets a plugin dependency stay on the loose route.
native: falsenever takes the native plugin route on any harness. Every primitive APM projects deploys loose, as before 0.37.native: trueor no key keeps today's automatic route. No other values are accepted.native_plugins: falsesends every dependency without its ownnative:key loose; a per-dependencynative:overrides it. Absent means automatic.~/.apm/apm.yml.Implementation:
native_plugins/route.py::effective_native_route(dep, manifest). The root manifest's own declaration of the dependency decides through itsnative:key; otherwise the manifest'snative_plugins:default applies; absent both, the route is automatic. A key binds only its own declaration, so transitive dependencies follow the project default.plan_native_claude_plugin(Claude Code and GitHub Copilot settings) andplan_native_codex_pluginask the owner before any trust or fingerprint work. AFalseanswer projects the package loose. Agent Plugins ($schemaplugin.json) are unchanged: they have no loose route..agents/pluginscopy and theextraKnownMarketplaces/enabledPluginsentries APM recorded, keeps user-authored entries, deploys loose and updates the lock. Going back native removes loose files by their receipts.apm audit --ci) decides each route by the same owner, from the root manifest, so a flipped plugin audits clean.--frozenrefuses a dependency the manifest moves off its locked native route, with--frozen: apm.yml changes a dependency's native plugin route.and remediation entryfrozen-native-route-changed.nativeis accepted on git, path and registry object forms, andnative_pluginsat the top level. Only booleans are accepted; any other value is refused naming the field ('native' field must be true or false,'native_plugins' must be true or false).nativerow in the Section 4.3 field table, new Section 4.2.6native_plugins, [req-mf-030] (consumer MUST), Appendix C, revision 0.1.77 (proposed), counts 152 -> 153; requirements manifest and CONFORMANCE regenerated; schema bytes unchanged.nativerow, the install-plugins guide ("Keep a plugin loose" and the worktree gap row), apm-usagedependencies.md.native: falseopt-out once install: say when a dependency installs as a native plugin that some hosts do not load #4998 exists (cell 10).Cells (
tests/integration/test_native_plugin_opt_out_lifecycle.py, real CLI, local Claude-format plugin with skills and a command):native: falsedeploys every primitive loose, with no.agents/pluginscopy and no marketplace orenabledPluginsentry.native_plugins: falsesends a keyless dependency loose, whilenative: truestays native.enabledPluginsentry, andaudit --ciis clean. Flipping back goes native again and removes the loose files.--frozenrefuses a route change; after a normal install,--frozenpasses.native: falsedeploys loose under~/.claude/skills/.native: "no",native_plugins: maybe) are refused at parse time, naming the field.claude -p/claude-code-action, Copilot CLI 1.0.106 and thenative: falseopt-out.Status: cells 1-9 pass; cell 10 waits on #4998. Cell 9 now asserts the named-field messages.
Issue and approved scope
Issue: Fixes #4995
Human scope-approval comment: #4995 carries
status/accepted; scope as ruled for this lane by the P2 Install & Harness lead.Completes the issue once the implementation lands on this branch.
Type of change
Testing
Tested locally
All existing tests pass
Added tests for new functionality (if applicable)
APM_BINARY_PATH=$(uv run which apm) APM_E2E_TESTS=1 uv run --extra dev pytest tests/integration/test_native_plugin_opt_out_lifecycle.py -n 4 -q-> red-first: 11 failed, 1 passedChangelog
changelog.d/<pr>.<section>.md, holdingone line: user-visible effect first, 25 words or fewer, ending with
(#PR); breaking changes only under upgrade notes; no Highlights; nonew lines under
## [Unreleased]. Seechangelog.d/README.mdand.github/instructions/changelog.instructions.md.Spec conformance (OpenAPM v0.1)
docs/src/content/docs/specs/openapm-v0.1.mdupdated(new/changed
<a id="req-XXX"></a>anchor + prose + Appendix Crow).
docs/src/content/docs/specs/manifests/openapm-v0.1.requirements.ymlupdated.
@pytest.mark.req("req-XXX")test undertests/spec_conformance/added or extended.CONFORMANCE.{md,json}regenerated viauv run --extra dev python -m tests.spec_conformance.gen_statementand committed.