Repository navigation
[0.38] feat(codex): retire the app-server route; explicit split install - #4003
Daniel Meppiel (danielmeppiel) wants to merge 67 commits into
Conversation
1cc0257 to
2600d3a
Compare
2600d3a to
ef44261
Compare
d562f31 to
def87ee
Compare
, #3896) At project scope, `apm install` now deploys each approved Claude-format plugin whole to the committed `.agents/plugins/<plugin>/`, generates the catalog under a marketplace name unique to the repo, and declares it with a relative path in `.claude/settings.json` and `.github/copilot/settings.json`, following the plugin's targets. A fresh clone loads it in Claude Code and GitHub Copilot without APM. Agent Plugins move onto the same owner at both scopes, and `apm_modules/.github/plugin/apm-registration.json` registrations are migrated. Ownership comes from the previous and next `apm.lock.yaml`. This is the #3896 fix the 2026-11-19 decision chose: obra/superpowers ships per-harness hook files, so splitting it into primitives tripped the retired filename-routing guard (#3226) and every approved project install exited 1. It now installs intact with its hooks. Supersedes #4010 (rebased onto main after v0.37.0), with these changes: - approve: a Claude plugin is native at both scopes, so `apm approve` pins the whole plugin at project scope too (it pinned only hook files, leaving the approved plugin parked). - uninstall: a surviving native plugin the gates no longer allow loses its lock record, so the native owner retires its root and declarations (I4, as #4446 does for loose files). - 0.37 owners kept: catalog remedies for the new and moved messages (native-settings-invalid, native-plugin-update-held, project-scope loose-hooks switch), kept_note for the kept-version line, restore_lockfile_bytes for the rollback, scope-aware native drift for --frozen; lock row parsing and serialization of native fields moved to native_plugins/record.py (deps/lockfile.py at the 2100-line cap). - spec: provisional amendment renumbered 0.1.68 -> 0.1.73 (pending editor decision); CONFORMANCE regenerated. - tests: new failing-before lifecycle cell for the superpowers shape; 0.37 oracles that pinned project-scope split behavior re-pointed to the native surface (same promises); #4010 tests meet the AQ ceilings. Out of scope: targets that include cursor still refuse (no native route until #3922); Codex stays split (#3920). Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…l-fix-3896-native-project
Codex fails the native activation profile's declarative-enable criterion (A3), so every plugin, including .codex-plugin bundles, is split-installed for it and APM never locates or runs the codex binary. One default-visible diagnostic per install (and --dry-run) names the target, scope, plugins and A3. Registrations made by the removed app-server route are retired once on apm install -g / apm uninstall -g through the Codex config owner, leaving enabled or changed entries to the user. Binds req-na-006 to real behavior; no spec change. apm-spec-waiver: implements existing req-na-006 with its existing marker; no new normative surface Refs #3920 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
- Plugin names may carry interior dots (Agent Plugin names such as acme.review); a leading or trailing dot is still refused (req-na-002). - $schema is inert manifest metadata: it no longer parks a plugin. - At project scope a skills: selection deploys loose, as a root-only plugin.json does; a whole-plugin load cannot honor it. - Lifecycle cells re-pointed to the native surface with the same promise (S15, accepted by the 0.38 PM): Copilot enablement in the committed settings, the generalized native summary, the gate write set and the project-scope I1 digest. Split-route cells (export-patch, legacy classification, plugin-root MCP portability) keep their promise on the split route: cursor, or a root-only plugin.json. - Quickstart: the committed paths get their own git add line; J02 anchors the world-independent audit lines. Co-authored-by: Copilot App <[email protected]>
…l-fix-3896-native-project
The removed route locked a .codex-plugin bundle's raw bytes and never converted it. On upgrade the split install re-materializes the locked commit and converts it, which the supply-chain check rejected as a content hash mismatch, so the plugin was neither registered nor deployed. legacy_plugin_compat now accepts exactly the conversion delta: the tree minus apm.yml and .apm/ must hash to the locked value and converting those bytes again must reproduce the fresh tree. The lifecycle test seeds an old-route apm_modules copy and lock row and asserts skills and MCP deploy after the registration is retired. Refs #3920 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
The retired-route acceptor reused the 0.28 helpers, whose errors said 'Cached Claude Plugin'. They now take the plugin kind, and the Codex path reports 'Cached Codex plugin'. Refs #3920 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…eview folds) - Frozen read goes through InstallService.frozen_disposition; the native_declared stamp is written by the registered commit site. - install-commit-order anchors on the native activation phases; carry.py joins the claude-native-plugin-registration owner; the manifest path goes through core.scope.manifest_file. - Uninstall never rebuilds a survivor loose for a harness that loads it natively, and never restages a native plugin from its source (HIGH-2; hooks ran twice). Regression cell with approve --all. - Generator citations and obligations regenerated after main moved. Co-authored-by: Copilot App <[email protected]>
…t changed #4446's definition-change retirement still re-judges a changed local native plugin; an unchanged one is never re-copied or rebuilt loose. The #3499 MCP-shape cell keeps the split route with a root plugin.json. Docs: a skills: selection deploys loose at project scope. Co-authored-by: Copilot App <[email protected]>
…l-fix-3896-native-project # Conflicts: # docs/src/content/docs/specs/openapm-v0.1.md # tests/quality/lifecycle_obligations.json
Co-authored-by: Copilot App <[email protected]>
…l-fix-3896-native-project # Conflicts: # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json
Co-authored-by: Copilot App <[email protected]>
…plugin_root Unfinished rebase work for #4003, not yet fully gated. - deployable_source_plan.py back to main: the Claude native route still passes native_plugin_root=. - A -g .codex-plugin bundle with claude selected: Codex split-installs it, Claude parks it (unit test). - Parked-native lifecycle: Codex cells now assert split install, MCP gated until the printed approve command, and a codex spy never runs. - Lifecycle world: p-native-codex runs at both scopes against the codex trap; Codex CLI provisioning removed from lifecycle-full CI and topology. - Retired-route lifecycle seeds v1 (legacy) and v4 (framed) lock rows. - Promise P-OWN-codex-native-plugin-lifecycle -> P-OWN-codex-split-install. Co-authored-by: copilot-swe-agent[bot] <[email protected]>
- Uninstall retires a surviving native plugin install would now park (revoked or changed pin, missing MCP grant, org MCP policy block): gate_retirements gains native_packages, judged by the whole-plugin trust admission and the shared MCP policy check. - A per-target skill pairing (req-rs-018) that restricts a native harness counts as a selection: loose at project scope, parked with -g. - Legacy Copilot registration retires for plugins this run evaluated and refused, so a withheld plugin stops loading live apm_modules bytes. - Project scope writes .agents/plugins/.gitattributes (* -text): a core.autocrlf checkout keeps the pinned bytes. Each has a failing-before test. Co-authored-by: Copilot App <[email protected]>
…fold delta review - locked_native_retired also applies the org bin_deploy rule install parks a bin/ plugin with (Analyst MEDIUM), with a unit cell. - The skill-pairing cell asserts the deployed skills (AQ003). - Generator citations refreshed for the moved lines. Co-authored-by: Copilot App <[email protected]>
The loose-hooks switch remedy picks its scope in the remediation owner (claude_native_switch_loose_hooks), so services.py adds no lines over main. Generator citations and CONFORMANCE regenerated. Co-authored-by: Copilot App <[email protected]>
…l-fix-3896-native-project # Conflicts: # tests/quality/lifecycle_obligations.json
A survivor rebuilt from the normalized apm_modules copy lost its marketplace_plugin type, so its own deployment plan never routed it native: a parked Claude plugin was rebuilt loose for copilot while install deploys nothing (I1, M-SOURCE spine). native_harnesses takes the lock's recorded type, as audit replay does (Analyst HIGH-D). Co-authored-by: Copilot App <[email protected]>
A test that patches LockFile could be the first to import it, leaving its LockFile bound to the mock (Windows shard 2 session-finish check). Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
left a comment
There was a problem hiding this comment.
Delta review: 76b4794 -> 57ad78a (standing 0.38 reviewer)
Verdict: NOT CLEAN, for one mechanical reason. Both folds from review 6007239540 are correct, but Lint is red on the CI merge commit. The fix is to merge #4559's current head. No code change is needed.
Previous items
| ID | Status | Evidence |
|---|---|---|
| HIGH-3 unclassified remediation id | Resolved | codex-legacy-retirement-retry is in COMPONENT_ONLY of tests/unit/core/test_remediation_w3_plugins_runtime_catalog.py, with a reason (the split-install unit cells drive the unreadable-journal path). |
| HIGH-4 stale generator cites | Resolved | U-BIN (exec_gate.py 715/716/719), the _MCP_VIEW parked lines (1199/1211), E3 (services.py 814/1017) and the uninstall accepts/user-scope cites (uninstall/cli.py 850/852/858) were all re-anchored. I re-ran the citation check mechanically: all 82 Ev(...) anchors in tests/lifecycle/generator/rules.py hold at 57ad78a under the test's 8-line EVIDENCE_WINDOW. |
Merges
- The
lifecycle-journeys.ymlresolution is correct. Dropping the pinned Codex CLI install step andAPM_REQUIRE_CODEXmatches "APM never runs codex", main'sAPM_LIFECYCLE_RECEIPTS_DIRis kept, and nothing at 57ad78a still readsAPM_REQUIRE_CODEX. - The #4559 merge (8606dbe) and the main merge (f8b2b1c) are clean.
Blocking
-
HIGH-5: Lint red.
src/apm_cli/commands/uninstall/engine.pyis 2101 lines (max 2100) on the CI merge commit (57ad78a + main 488a4b1; it is 2099 at 57ad78a alone). This branch carries #4559 at 8606dbe. #4559 has since moved to b0e817d (refactor(uninstall): keep engine.py under the 2100-line guard, plus 76e3ea0stamp planned native_declared before the one lock commit (#4329)and a main merge). I simulated57ad78a2 + b0e817d0:
Note
The rest of CI at 57ad78a was still pending when this was posted (14 pass, 20 pending; Lint is the only failure). Since #4003 lands after #4559, re-merge #4559's head each time it moves; it is the source of this round's red.
Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
left a comment
There was a problem hiding this comment.
Delta review: 57ad78a -> affda5b (standing 0.38 reviewer)
Verdict: CLEAN for #4003's own content. CI is red, but every red check comes from #4559 at b0e817d, and #4003 introduces none of it. #4003 goes green once #4559 is fixed and re-merged here.
- affda5b is exactly the tree I simulated for review 6008356586 (
git diffagainst the57ad78a2 + b0e817d0merge tree is empty): main 488a4b1 plus #4559 b0e817d, with no other edits.engine.pyis 2098 lines, no file exceeds 2100, and all 82 generator cites hold. - HIGH-5 (engine.py 2101 lines) is resolved.
Red checks, all inherited from #4559 b0e817d
Lint (lint_architecture_boundaries), Architecture Scaling, and Owner Surface Slice (2/3) (test_owner_rules_report_nothing_before_mutation) all report the same violation:
src/apm_cli/commands/uninstall/engine.py:1:1: install-deployment-package-target-authorization [legacy AC15b] selector result does not drive survivor rebuild
#4559's own CI run at b0e817d (44952165831) fails Lint and Architecture Scaling identically.
Cause: b0e817d (refactor(uninstall): keep engine.py under the 2100-line guard) turned this loop in _sync_integrations_after_uninstall (engine.py:1501):
authorized_targets = []
for target in target_selection.targets:
if target.name not in native:
authorized_targets.append(target)into authorized_targets = [t for t in target_selection.targets if t.name not in native]. AC15b's _consumer_routes_through_selector (scripts/architecture_linter/checks/install_package_target_authorization.py) requires an ast.For loop over target_selection.targets in the function's own scope, and a comprehension does not count. Fix in #4559: restore the loop, and find the 3 lines elsewhere, for example the multi-line docstring or a comment. Then re-merge #4559 into #4003.
… native imports instead Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
left a comment
There was a problem hiding this comment.
Delta review: affda5b -> 67cb61f (standing 0.38 reviewer)
Verdict: CLEAN. CI at 67cb61f is fully green (42 pass).
- 67cb61f is a single merge of #4559 d7525ed (the restored AC15b loop). Its tree is identical to
affda5b8 + d7525ed7(git diffagainst thegit merge-treeresult is empty), so it carries no other edits. - The inherited AC15b failure on
uninstall/engine.pyis resolved. Lint, Architecture Scaling and Owner Surface are green. - All prior #4003 findings (HIGH-1..5, MEDIUM-2) remain resolved.
- Note:
uninstall/engine.pyis exactly 2100 lines, at the limit. Any later edit on either PR must save lines first.
#4003 lands after #4559. If #4559 moves again before landing, re-merge it here.
…6-native-project # Conflicts: # docs/src/content/docs/specs/openapm-v0.1.md # src/apm_cli/install/pipeline.py # tests/lifecycle/generator/rules.py # tests/quality/lifecycle_obligations.json
Co-authored-by: Copilot App <[email protected]>
…all/errors commands/install.py had reached its LOC budget. The auth, frozen, native settings / LSP gate, policy and generic failure renderers of the APM dependency phase move to install/errors.py (render_apm_dependency_failure, log_authentication_error), beside log_frozen_install_error; both install handlers use them. pipeline.py keeps main's comment length so it stays under its 1005 budget. Co-authored-by: Copilot App <[email protected]>
…ed and announced Witness agreed with QL for the new layout: at project scope for claude and copilot, a hand edit inside .agents/plugins/<name>/ is restored to the approved publisher bytes with the [!] Restored line (I7), the lock is unchanged and a user file outside the root survives. Co-authored-by: Copilot App <[email protected]>
- install/pipeline.py: keep #4594's order (services before native work, a rolled-back reconciliation skips it) with #4559's Copilot move; Codex legacy retirement now runs inside that gate, before Claude registration. - openapm-v0.1.md: keep #4559's 0.1.74 row and main's 0.1.75 row (152 statements, 147 MUST). - Lifecycle generator cites re-anchored; obligations and CONFORMANCE regenerated. - commands/install.py back to 2100 lines: the Codex split dry-run report is now emitted at the end of preflight_agent_plugin_dry_run. Co-authored-by: Copilot App <[email protected]>
- install/pipeline.py: #4559's phase comment; #4003 keeps the codex client removal (no CodexNativeError). - With #4559's install.py extraction (2057 lines), the Codex dry-run report returns to commands/install.py; template.py is unchanged from 67cb61f. - Lifecycle generator cites re-anchored; obligations regenerated. Co-authored-by: Copilot App <[email protected]>
…rite gate Main's #4381 overwrite planning skipped plans with codex_native; #4003 retires that route, so a split-installed Codex plugin is planned like any other package. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
left a comment
There was a problem hiding this comment.
Delta review: 67cb61f -> 5fce2c3 (standing 0.38 reviewer)
Verdict: NOT CLEAN, for one test-harness reason. The merges and fold (4) are correct. CI has one real red, Build & Test Shard 1.
Merges and changes: correct
- I simulated
67cb61f1 + #4559 b87969b7(which already includes main 899d17b) withgit merge-tree. Besides the regeneratedrules.pyand obligations files, 5fce2c3 differs from that tree only by fold (4).pipeline.py(1003 lines) is the automatic merge, unchanged:release_deploy_targets(), thenservices, thencodex_pluginsandclaude_pluginsinside the #4594 gated block.CodexNativeErrorstays removed. - Spec rows 0.1.74 (#4559) and 0.1.75 (#1925) are both kept.
template.pyis identical to 67cb61f. - All 82 generator
Evcites hold at 5fce2c3 under the 8-line window. No file undersrc/orscripts/architecture_linter/exceeds 2100 lines (uninstall/engine.pyis exactly 2100). - (4)
install/commit_gate.py:338: droppingplan.codex_nativeis correct. The field no longer exists, and nocodex_nativereference is left insrc/. A split-installed Codex plugin is ordinary loose content, so it should be overwrite-gated. The Claude-native route is still excluded, because_planned_keepsonly plans targets inplan.projection_targets, which leaves out native harnesses.
Blocking
- HIGH-6: Build & Test Shard 1 fails with all tests passing (
15278 passed, then exit 1). The session-finish guard reports:[x] apm_cli module globals left as unittest.mock objects (a patch was captured by a module first imported inside it): apm_cli.install.legacy_plugin_compat.compute_package_hashinstall/legacy_plugin_compat.pyis only imported lazily (source_helpers.py:142,375,sources.py:378,phases/resolve.py:740,phases/codex_plugins.py:48), and it is not intests/conftest.py_LAZY_CONSUMERS. When its first import lands inside apatch("apm_cli.utils.content_hash.compute_package_hash")(test_sources_materialisation.py,test_cached_source_lockfile_only.py), the module binds the mock for the rest of the session. Whether that happens depends on how xdist distributes the tests, which explains why main and #4559 are green. Fix: add"apm_cli.install.legacy_plugin_compat"to_LAZY_CONSUMERS. That is the same fix #4559 used forinstall.integrity(7f256bb).
Other
Its compute_package_hash import was left as a mock at session finish on Build & Test Shard 1; preload it like install.integrity. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
left a comment
There was a problem hiding this comment.
Delta review: 5fce2c3 -> f2b0771 (standing 0.38 reviewer)
Verdict: CLEAN for #4003's content. HIGH-6 is resolved. The only red check is a CI capacity timeout, not a test failure.
- HIGH-6 resolved.
tests/conftest.pyadds"apm_cli.install.legacy_plugin_compat"to_LAZY_CONSUMERS, sorted afterinstall.integrity, and nothing else changed. Build & Test Shards 1-2 are green, so the session-finish mock-leak guard no longer fires. - CI at f2b0771: 39 pass. The only red is Owner Surface Slice (1/3) (plus its aggregate, Owner Surface Check), which was canceled at the job's
timeout-minutes: 15(.github/workflows/owner-surface.yml) at 79% progress with no failing test. Slices 2/3 and 3/3 passed in 11m05s and 9m50s. This is the third timeout of slice 1 on #4003, and #4559's slice 1 already needed 14m06s, so shard 1 sits at the budget whenever the native-plugin owner surface is selected.- Owner of the fix: the CI or ratchet owner, not #4003. Either rebalance
scripts.ci_shardingwith--shard-durationsfor the owner-surface slice, or raise the slice timeout. Until then, rerun the job; a rerun may pass if it lands on a faster runner.
- Owner of the fix: the CI or ratchet owner, not #4003. Either rebalance
- All earlier #4003 findings remain resolved.
…s .gitattributes Review findings on #4559: - apm prune skipped install's gate, so a revoked or denied native plugin stayed declared and a missing root was redeployed from locked bytes. Prune now asks the gate retirement owner (gate_retirements) through native_plugins/uninstall.retire_gated_native_plugins, as uninstall does, on both the nothing-to-prune and prune paths, and stages the lock after the survivor preflight (new commit site _resync_native_plugins). - A failed settings write while removing the last plugin restored the catalog but left APM's .gitattributes deleted, so a checkout could convert the byte-pinned roots. The rollback now restores it. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…ing commit site The commit-site ratchet forbids a new lockfile commit site. A prune that only retires gated native records now takes the regular prune path, whose single write follows the survivor preflight; dry run judges nothing. Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel)
left a comment
There was a problem hiding this comment.
Delta review: f2b0771 -> 48efede (standing 0.38 reviewer)
Verdict: content CLEAN, but #4559 needs re-merging.
- 48efede is a pure merge of #4559 48e3cbc: its tree equals
git merge-tree f2b07711 48e3cbce(empty diff). - That #4559 commit added a second prune lockfile commit site (
prune.py::_resync_native_plugins). The commit-site ratchet rejects it, and #4559's own CI at 48e3cbc failed Owner Surface Slice (3/3). #4559 fixed this at 40bfa9a (persist gate-retired native records through prune's existing commit site), which is green, so re-merge #4559 40bfa9a before relying on this run. - I reviewed #4559's prune and
.gitattributeschanges on #4559 itself; they are CLEAN at 40bfa9a.
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
|
Closing per the 0.38 feature-cut ruling (no draft PRs, rule 16): this feature is not in 0.38.0. The branch is kept; it reopens as a ready PR when resumed. |
…eout The slice was split by integration-suite durations, but each slice shard pays the 40-80s mutation-test module baselines per worker, so install-path slices reached the 15-minute limit on 3 shards (3 timeouts on microsoft#4003, 14m06s on microsoft#4559). The shard count now comes from strategy.job-total, so the job name and the --shard argument follow the matrix. Fixes microsoft#4746 Co-authored-by: Copilot App <[email protected]>
Description
TL;DR
APM no longer spawns
codex app-serverto register.codex-pluginbundles. Codex now gets every plugin as an explicit split install (skills to.agents/skills/, agents/hooks/MCP to.codex/) with one default-visible diagnostic naming the target, scope, plugins and the unmet native capability (OpenAPM criterion A3, declarative enable). Registrations made by the removed route are retired once, through the Codex config owner, leaving user-owned or user-changed entries alone.Fixes #3920
Note
Rebuilt for 0.38 on
main+ #4559 (head b1a7d57), because the train it was based on (#4635) closed. #4003 lands after #4559. It no longer includes #4005, which is unrelated (Claude AGENTS.md).Problem (WHY)
codex_plugins/client.pylocatedcodexonPATH, version-gated it (>= 0.163.0) and droveconfig/batchWrite,marketplace/upgrade,plugin/read,plugin/uninstallover JSON-RPC.[plugins."x@m"] enabled = trueleaves the plugininstalled: false, and a session start does not install it (spec Part C, Codex row: "Split (fails A3; A2 also not met)").Approach (WHAT)
codex_plugins/{client,registrar,snapshot,admission,manifest}.pyand everycodex_nativebranch in install, drift, MCP view, policy, uninstall and approve..codex-plugin/plugin.jsonlike any plugin manifest:MARKETPLACE_PLUGINnormalization, so primitives deploy per target and executables use per-type approval.note_codex_split_install) and emit one aggregated info diagnostic per install;--dry-runreports the same decision ("would split-install").apm install -g/apm uninstall -g: read the old journal, remove onlyconfig.tomlentries that still hold exactly what APM wrote (disabled plugin + recorded source) via the Codex adapter, delete APM's own snapshots and journal. Codex's plugin cache is never touched.marketplace-integrations-codex-split-install: single owners, and a forbid-scan for"app-server"/which("codex")anywhere insrc/.Implementation (HOW)
src/apm_cli/codex_plugins/legacy_registrations.py(new)config.tomledit, removes snapshots inside its own root only, deletes the journal. Unreadable journal/config: nothing changes, journal kept, warning names the file.src/apm_cli/adapters/client/codex.pyretire_plugin_registrations()sits besidemigrate_legacy_managed_servers(): the adapter already ownsconfig.tomlI/O. Keeps entries that are enabled, edited, re-sourced or shared.src/apm_cli/install/phases/codex_plugins.pysrc/apm_cli/install/target_warnings.pynote_codex_split_install(), called fromwarn_unsupported_primitivessoservices.pystays deletion-only.src/apm_cli/models/validation.py,install/{deployment_plan,services,drift,sources,exec_gate,pipeline,context,deployable_source_plan}.py,integration/mcp_config_view.py,commands/{approve,uninstall/cli}.py,policy/ci_checks.pyuninstall/cli.pyswaps theremove_codex_pluginscall 1:1 for the retirement call.src/apm_cli/install/cache_pin.pyis_full_source_pin(moved from the deleted registrar); the warm-cache source-pin behavior from #3388 is kept.Diagrams
Legend: what
apm installdoes for a plugin when Codex is a selected target. The dashed edge is the removed path.flowchart LR A["plugin package<br/>.codex-plugin / .claude-plugin / plugin.json"] --> B["validation.py<br/>MARKETPLACE_PLUGIN normalization"] B --> C["services.py<br/>per-target primitive integrators"] C --> D[".agents/skills/ .codex/agents/<br/>.codex/hooks.json .codex/config.toml"] C --> E["target_warnings.py<br/>note_codex_split_install"] E --> F["phases/codex_plugins.py<br/>one info diagnostic: scope, plugins, A3"] F --> G["legacy_registrations.py<br/>retire journal-owned entries"] G --> H["CodexClientAdapter<br/>retire_plugin_registrations"] A -.->|"removed: codex app-server JSON-RPC"| X["codex binary"]Trade-offs
.codex-plugin. That is what req-na-006 asks of a non-qualifying target; Claude-format plugins installed for Codex now also print the A3 line.plugin/listshows no APM marketplace or plugin.compute_native_bundle_hashkept. It has nosrc/caller now but is a shared fingerprint utility with its own tests; removal is a separate cleanup.Benefits
codex(guarded statically by the new architecture rule, and dynamically by a PATH spy in the lifecycle test).CONFORMANCE.md.56 files changed, 1006 insertions(+), 4001 deletions(-)in the code commit).Draft request to openai/codex (NOT filed; needs maintainer go-ahead)
Install config-enabled local-marketplace plugins at session start
What happens today (Codex CLI 0.170.0). A tool that manages agent configuration from files can declare a local marketplace and enable a plugin in
config.toml:Codex discovers the marketplace, but the plugin stays
installed: false, and starting a session in a trusted project does not install it. A local plugin is installed only bycodex plugin add, a git marketplace upgrade, or the plugin browser.Request. When a trusted session starts, install any plugin that is enabled in
config.tomland listed by a declared local marketplace but not yet installed, the same waycodex plugin addwould. Leave a plugin set toenabled = falseas it is.Why. Package managers and team setups can then declare Codex plugins in the documented settings file alone, without running the
codexbinary or writing Codex's plugin cache. A repository-level.agents/plugins/marketplace.jsonthat the CLI discovers on its own would help in the same way.Reproduce. Use an isolated
CODEX_HOMEwith the two entries above and a trusted project, start a session, then checkplugin/list: the plugin showsinstalled: false.Upgrade note
If an earlier APM version registered a Codex plugin through
codex app-server, run one plainapm install -gbefore anyapm install -g --frozen. That first install converts the cached bundle, retires the old registration, and records the plugin's MCP evidence in~/.apm/apm.lock.yaml. Until then,--frozenfails closed, because the old lockfile has no MCP evidence for the plugin:(
exampleis the plugin's MCP server name. The message was captured from this branch atd562f31with the lifecycle fixture's old-route state.)Rebuild notes (P4 v2, 2026-11-21)
install/drift.py,_normalize_legacy_local_plugin_for_replay): the audit replay looked upplugin.jsonwithout the.codex-pluginlocation, so a split-installed Codex bundle never deployed its skill in the scratch tree, andaudit --cireported it orphaned. Replay now normalizes with the manifest the canonical classifier (detect_package_type) selects. Witness:test_approve_parked_native_plugin_lifecycle.py::test_codex_bundle_mcp_waits_for_the_printed_command_while_skills_split_install(failed before, passes now).consumer/installing-from-marketplaces.md,consumer/install-plugins.md,reference/package-types.md,reference/cli/approve.mdandpack.md, and apm-usagecommands.md,dependencies.mdandpackage-authoring.md.test_codex_native_plugin_lifecycle.pyis pruned.compute_native_bundle_hashis kept (deferred cleanup).Issue and approved scope
Issue: Fixes #3920
Human scope-approval comment: #3920 (comment) (re-checked with
scripts/governance/eligibility.cjs:record-present, review contact Daniel Meppiel (@danielmeppiel)).Completes the issue: no code path spawns codex; the lifecycle test migrates an existing APM registration; the diagnostic is documented in docs and apm-usage; one CHANGELOG line. The openai/codex request is drafted above and not filed.
Type of change
Testing
Validation
At b12ca1d, local (macOS), all through the host guard:
uvx [email protected] checkandformat --check(CI paths), pylint R0801,lint-auth-signals.sh,check_complexity_ratchet.py --base-ref origin/main,tests.quality.taxonomy --changedandcheck_test_assertions.py: all clean.modeland the user'sforeign@external, removes the journal, andplugin/listshows no APM marketplace.Scenario Evidence
codextests/integration/test_codex_split_install_lifecycle.py::test_install_migrates_owned_registration_then_split_installstests/integration/test_codex_split_install_lifecycle.py::test_user_enabled_registration_is_left_in_placetests/unit/install/test_codex_split_install.py::test_changed_registration_is_left_to_the_user--dry-runtests/spec_conformance/test_native_activation_profile_reqs.py::test_unqualified_target_gets_explicit_split_installtests/unit/install/test_codex_split_install.py::test_phase_reports_one_diagnostic_naming_target_scope_plugins_and_a3.codex-pluginbundle deploys its skills and MCP servers like any plugintests/unit/test_codex_split_intent.py::test_codex_only_manifest_normalizes_into_loose_primitivestests/unit/integration/test_mcp_config_view.py::test_local_codex_plugin_mcp_uses_synthesized_manifesttests/unit/install/test_codex_split_install.py::test_unreadable_state_changes_nothing_and_keeps_the_journalcodexspawntests/integration/test_architecture_owner_rule_mutations.py::test_codex_split_install_and_retirement_gates_cannot_be_bypassedHow to test
apm install -g <codex-plugin> --target codex(needs Codex >= 0.163 onPATH). Then, on this branch withcodexremoved fromPATH, rerun it. ExpectRetired 1 Codex plugin registration(s)and noapm-keys left in~/.codex/config.toml.~/.agents/skills/<skill>/SKILL.md, anmcp_servers.<name>entry inconfig.toml, and the[i] Codex: split-installed ... A3line.--dry-run: expect the "would split-install" line and no file changes.enabled = truebefore upgrading: expect it kept, plus a warning.Changelog
changelog.d/4003.breaking-changes-and-upgrade-notes.md(users must run one plainapm install -gbefore--frozenafter upgrading).Spec conformance (OpenAPM v0.1)
@pytest.mark.req("req-na-006")waiver replaced by a behavioral test.CONFORMANCE.{md,json}regenerated and committed (req-na-006 is now active).apm-spec-waiver: implements existing req-na-006 with its existing marker; no new normative surface
Co-authored-by: Copilot [email protected]