Skip to content

[0.38] feat(install): render bundle agents to Codex TOML at install (#3714) - #4007

Merged
Daniel Meppiel (danielmeppiel) merged 16 commits into
mainfrom
danielmeppiel-improved-lamp
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 16 commits into
mainfrom
danielmeppiel-improved-lamp

Conversation

@danielmeppiel

@danielmeppiel Daniel Meppiel (danielmeppiel) commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR

apm install <bundle> now renders packed Markdown agents to Codex TOML in .codex/agents/ when the target's agent mapping is codex_agent. Until now they were skipped with a warning (the 0.36 stopgap from #3706). The bundle deploy loop gets one small, self-contained hook. That hook calls the agent integrator's existing Codex renderer and render-then-adopt writer, so the bytes APM compares, previews, writes and records are the same rendered text. Every other target keeps copying bundle files byte-for-byte, and gemini_command stays unsupported.

Fixes #3714

Note

Scope record: #3714 (comment). Rebased on 0.37 main (includes #3989): the user-scope lockfile and audit assertions now run unconditionally against $APM_HOME.

Problem (WHY)

  • A Codex consumer of a bundle got no agents: _UNSUPPORTED_PLUGIN_FORMAT_IDS contained codex_agent, so every packed agents/*.md was skipped with "cannot convert plugin-native files to codex_agent (.toml) yet".
  • Before that stopgap, the loop copied Markdown into .codex/agents/*.toml. Codex cannot read that file, and APM still recorded it as deployed.
  • [!] The source-install path already renders Codex TOML (AgentIntegrator._render_codex_agent → _deploy_rendered_agent). A second bundle-only renderer or writer would split that authority.

Why these matter: the repo's architecture rule says "Every call site routes THROUGH that owner instead of re-deriving the answer locally.", and integrators "add what to deploy, never how to deploy."

Approach (WHAT)

# Fix
1 codex_agent leaves the unsupported set and joins a new rendered set. Only a Markdown source under a rendered mapping is rendered; a non-.md source keeps today's skip warning.
2 The bundle loop hands a rendered-format path to install/local_bundle_agents.py and continues. The copy path below it is unchanged.
3 The helper re-checks the packed bytes against pack.bundle_files, renders once with _render_codex_agent, then (unless --dry-run) deploys through _deploy_rendered_agent(managed_files=None). With managed_files=None, an existing file is protected unless the bytes are identical or --force is passed.
4 The claim is the sha256 of the rendered text. A skip (digest mismatch, render error, symlinked destination, collision) records no claim and writes nothing.
5 The install-deployment-bundle-native-layout guard pins the new sets, the loop hand-off and the integrator route, with three bypass mutations.

Implementation (HOW)

  • install/local_bundle_paths.py: adds _RENDERED_PLUGIN_FORMAT_IDS, bundle_render_format_id() and one _is_unsupported_route() predicate. Both _lower_to_target and the skip warning use that predicate, so routing and warnings cannot drift.
  • install/local_bundle_agents.py (new, 173 lines): deploy_bundle_codex_agent() records the claim. render_and_deploy_codex_agent() verifies, renders and deploys. Its options are all keyword-only and required, so an omitted argument raises TypeError instead of falling back to a default. When the caller passes no collector (the CLI path), renderer and collision diagnostics are relayed through the install logger in the bundle loop's existing Skipped <path>: ... wording.
  • User-scope collision key: the lockfile claim at -g is absolute, so the helper hands _deploy_rendered_agent the destination relative to the first containing root (collision_roots=(project_root, deploy_root)). An absolute key made check_collision index past the destination's parents (IndexError) on a reinstall over an edited ~/.codex/agents file (peer-review fix).
  • install/services.py: one ~20-line hunk before normalized_text. The surrounding loop is not refactored, and no Codex plugin code is touched (seam with the [FEATURE] Codex: retire the app-server registration route; explicit split install #3920 lane).
  • Architecture: .apm/architecture/owners/install-deployment.json (record owner and selectors), scripts/architecture_linter/checks/marketplace_package_and_registration.py (guard), tests/integration/test_architecture_confirmed_bypass_mutations.py (mutations), and the services.py LOC budget raised 1195 → 1210 with a comment.

Diagrams

Legend: the per-file decision this PR adds inside the bundle deploy loop. Every skip branch writes nothing and records no claim.

flowchart LR
    L["integrate_local_bundle loop<br/>per target, per packed file"] --> R{"bundle_render_format_id<br/>codex_agent and .md source?"}
    R -->|"no"| C["copy packed bytes<br/>unchanged path"]
    R -->|"yes"| V{"sha256 matches<br/>pack.bundle_files?"}
    V -->|"no"| S1["skip + named warning<br/>no claim"]
    V -->|"yes"| X["AgentIntegrator._render_codex_agent<br/>render once"]
    X -->|"render error"| S2["skip + named warning<br/>no claim"]
    X --> D{"dry run?"}
    D -->|"yes"| P["claim = rendered hash<br/>no write"]
    D -->|"no"| W["AgentIntegrator._deploy_rendered_agent<br/>adopt / collision / write"]
    W -->|"collision"| S3["skip, keep user file"]
    W -->|"adopted or written"| K["claim = rendered hash"]
Loading

Trade-offs

  • Reuse the integrator's private methods, not a new public API. The scope record names _render_codex_agent and _deploy_rendered_agent. Calling them from one install helper keeps a single renderer and writer; a public wrapper would add surface without adding an owner.
  • Bundle collision semantics, not managed-file semantics. managed_files=None means a reinstall over an edited (or older-version) agent is kept without --force. That matches how the loop treats every other bundle file today.
  • No link resolution in practice. The integrator's resolve_links hook is passed, but no resolver is initialized for bundles, so bodies stay as packed. Other bundle files are not rewritten either.
  • services.py budget +15 lines. The hunk is already a single delegated call. Moving claim bookkeeping into the helper kept McCabe complexity at 50.
  • User-scope lock root comes from fix(0.37): finish owner hardening for bundle MCP, audit copies, failed installs, MCP targets and plugin pins #3989, not this PR. The -g lock/audit test relied on fix(0.37): finish owner hardening for bundle MCP, audit copies, failed installs, MCP targets and plugin pins #3989's $APM_HOME lock root; it sat under a strict xfail until 0.37 merged and is now a plain assertion.

Benefits

  1. Codex users of a bundle get valid .codex/agents/<name>.toml files, where today they get zero agents and one warning per agent.
  2. apm audit --ci verifies the rendered bytes at project and user scope. A tampered agent reports hash-drift.
  3. A reinstall of identical bytes is silent and causes no lockfile churn, and apm install --frozen afterwards is byte-stable.
  4. The other 6 agent-capable targets have regression coverage proving their output is byte-identical to the packed source.

Validation

CI on 8b1de0bd (rebased on 0.37 main f8c31a5): see the checks tab. For the 0.37 quality ratchets, the two new test modules carry module-level behavioral and promise markers (e2e + P-OWN-bundle-native-layout-lowering/P-INV-I1/P-INV-I3; component + req-tg-006/req-tg-015). The #3705 bug-ledger row now points at test_codex_bundle_agent_project_lifecycle instead of the retired skip test; that test proves .codex/agents holds parseable TOML, never Markdown.

Local runs
$ uv run --extra dev ruff check / ruff format --check (src tests scripts/architecture_linter)   -> clean
$ uv run --extra dev python -m pylint --disable=all --enable=R0801 ... src/apm_cli/ ...      -> 10.00/10
$ bash scripts/lint-auth-signals.sh                                                           -> [+] auth-signal lint clean
$ bash scripts/lint-architecture-boundaries.sh                                                -> clean
$ uv run pytest tests/unit/install/test_install_local_bundle.py tests/unit/install/test_architecture_invariants.py tests/spec_conformance/test_local_bundle_agent_reqs.py
98 passed
$ APM_BINARY_PATH=.venv/bin/apm uv run pytest tests/integration/test_local_bundle_codex_agents_lifecycle.py tests/integration/test_local_bundle_compile_only_targets_lifecycle.py tests/integration/test_install_local_bundle_e2e.py
72 passed
$ APM_ALLOW_PROVISIONAL_BASELINES=1 uv run pytest tests/quality/test_quality_baselines.py tests/quality/test_test_taxonomy.py tests/quality/test_lifecycle_bug_ledger.py
45 passed
$ uv run pytest tests/integration/test_architecture_confirmed_bypass_mutations.py tests/integration/test_architecture_owner_rule_mutations.py -n 6
1271 passed

Full tests/unit run: 358 failures/errors, all of them also failing on clean main in this environment (root user and network: test_unix_install_ownership, test_shepherd_owner_touch_gate, test_public_release_metadata, ...). None are new.

Scenario Evidence

# Scenario (user promise) Principle(s) Test(s) proving it Type
1 Installing a bundle for Codex yields parseable TOML agents with name, description and developer_instructions Multi-harness, Portability by manifest tests/integration/test_local_bundle_codex_agents_lifecycle.py::test_codex_bundle_agent_project_lifecycle; tests/unit/install/test_install_local_bundle.py::TestLocalBundlePathRouting::test_packed_markdown_agents_render_to_codex_toml integration, unit
2 The lockfile records the rendered hash and apm audit --ci passes; identical reinstall and install --frozen cause no churn Governed by policy, DevX test_codex_bundle_agent_project_lifecycle integration
3 An edited agent is kept without --force and replaced with it; --dry-run writes nothing DevX, Secure by default test_codex_bundle_agent_project_lifecycle; test_codex_bundle_agent_collision_dry_run_and_force integration, unit
4 An agent that cannot render, or whose bytes do not match the manifest, writes nothing and records no claim Secure by default test_codex_bundle_agent_render_failure_writes_nothing; test_codex_bundle_agent_that_cannot_render_writes_nothing; test_codex_bundle_agent_rejects_bytes_that_do_not_match_the_manifest integration, unit
5a Bundle Codex conversion keeps native model settings and diagnoses dropped tools (req-tg-015, req-tg-006) Multi-harness, Secure by default tests/spec_conformance/test_local_bundle_agent_reqs.py spec conformance
5 Non-Codex agent targets are byte-identical to today Multi-harness test_only_codex_agents_are_rendered_across_agent_targets (parameterized over every agent-capable target) unit
6 apm install -g <bundle> renders to ~/.codex/agents and $CODEX_HOME/agents, hash equal to the rendered bytes; an edited agent is kept without --force and replaced with it Multi-harness, DevX test_codex_bundle_agent_user_scope_lifecycle[default-home,codex-home]; test_user_scope_codex_bundle_agent_keeps_an_edit_without_force[default-home,codex-home] integration, unit
7 User lockfile in $APM_HOME holds the home-relative claim and rendered hash; apm audit --ci from $APM_HOME passes Governed by policy test_codex_bundle_agent_user_scope_lock_and_audit integration

How to test

  • APM_BINARY_PATH=.venv/bin/apm uv run pytest tests/integration/test_local_bundle_codex_agents_lifecycle.py -q → 5 passed
  • By hand: apm pack a package containing .apm/agents/rev.agent.md, then run apm install ./build/<pkg> --target codex --no-policy in a fresh project and inspect .codex/agents/rev.toml.
  • Re-run the install, edit the TOML, re-run (expect Skipped ... Re-run with --force), then re-run with --force.
  • apm audit --ci --no-policy passes.

Guard budget changes

Guard Change Why
tests/unit/install/test_architecture_invariants.py KNOWN_LARGE_MODULES["services.py"] 1195 → 1210 (= current line count), with a #3714 comment The bundle-loop hook is one delegated call (+24 lines incl. imports); the surrounding loop is deliberately not refactored (seam with the #3920 lane). Follows the table's existing per-PR convention (for example #3700).

Conflict dry-run (git merge-tree --write-tree origin/main HEAD): 0 conflicted files. Docs edits are in the last commit, against the post-#3996 layout (consumer/install-packages.md, producer/build-a-plugin.mdx, reference/cli/install.md, apm-usage package-authoring.md).


Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass (environment-only failures also fail on main; see Validation)
  • Added tests for new functionality

Changelog

  • One line in one section under ## [Unreleased] (### Added).
  • N/A

Spec conformance (OpenAPM v0.1)

  • Spec edit: none needed.
  • Manifest edit: none needed.
  • Test edit: tests/spec_conformance/test_local_bundle_agent_reqs.py cites the existing req-tg-015 (Codex model / model_reasoning_effort keep their native top-level TOML placement) and req-tg-006 (a dropped capability restriction gets an actionable diagnostic) for the bundle conversion path.
  • CONFORMANCE.{md,json} regenerated and committed.

No spec change: bundle agents now go through the existing Codex converter, so existing requirements apply.

Co-authored-by: Copilot [email protected]

Review fixes and dependency order (head 0f2040e, on main 0c349e0)

Fixes #3714. Five Copilot review findings are fixed, each with a regression test that fails before the fix:

# Finding Fix Regression test
1 Render TOCTOU The verified packed bytes are rendered through _render_codex_agent(content=...); the source is never read again test_codex_bundle_agent_renders_the_verified_bytes
2 Digest normalization Expected digest goes through bundle.local_bundle._normalize_hash, as admission does; invalid values warn and skip test_codex_bundle_agent_accepts_normalized_manifest_digests
3 Empty Codex fields Shared renderer owns CodexAgentFieldError (blank name, description or body, per the Codex parser); the bundle path renders strict=True and warns and skips before any write or claim test_codex_bundle_agent_with_a_field_codex_rejects_is_skipped
4 Receipts miss rendered agents Real writes (via take_rendered_writes) join written_files; dry runs and adoptions excluded test_codex_bundle_agent_collision_dry_run_and_force
5 External $CODEX_HOME recorded as legacy Absolute claims under a target's static root are attributed to it (canonical target-relative codex row); drift rebases bundle claims onto external roots lifecycle test_codex_bundle_agent_external_codex_home_audits_beside_another_target

Out of scope: enforcing the blank-field rule on source-package Codex installs (changes 30+ existing tests); follow-up.

Dependency order: #4007 lands on current main (includes main-red fix #4590). #4071 is stacked on #4005 and needs #4007, so #4007 lands before #4071.

Validation (local, merged tree): ruff check/format (0.15.12), pylint R0801, lint-auth-signals, complexity ratchet, taxonomy --changed, architecture boundaries: all clean. pytest unit + spec + drift + bypass mutations: 2938 passed (1 unrelated local ADO credential-helper failure in test_auth_credential_report). tests/integration/test_local_bundle_codex_agents_lifecycle.py: 6 passed.

@danielmeppiel
Daniel Meppiel (danielmeppiel) force-pushed the danielmeppiel-improved-lamp branch 2 times, most recently from a84c8ef to 0eb3e4a Compare November 20, 2026 01:25
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
`apm install <bundle>` into a project-scope Claude target routes each
plugin-native instruction through the #3939 owner (routes_to_agents_md with
the live project root, claude_agents_md_blocker): routed instructions are
staged as compile input under apm_modules/<slug>/.apm/instructions/ (the
#1207 staging path), and the rest become .claude/rules/ files rendered by
the Claude rule projection (applyTo -> paths:) through the #4007 per-target
render seam. A hand-authored CLAUDE.md without the import keeps every rule
with the #3939 warning; non-discoverable names keep their rendered rule.
The install-deployment-claude-agents-md-routing guard and owner record
cover the bundle consumer, with a mutation case.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
`apm install <bundle>` into a project-scope Claude target routes each
plugin-native instruction through the #3939 owner (routes_to_agents_md with
the live project root, claude_agents_md_blocker): routed instructions are
staged as compile input under apm_modules/<slug>/.apm/instructions/ (the
#1207 staging path), and the rest become .claude/rules/ files rendered by
the Claude rule projection (applyTo -> paths:) through the #4007 per-target
render seam. A hand-authored CLAUDE.md without the import keeps every rule
with the #3939 warning; non-discoverable names keep their rendered rule.
The install-deployment-claude-agents-md-routing guard and owner record
cover the bundle consumer, with a mutation case.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
`apm install <bundle>` into a project-scope Claude target routes each
plugin-native instruction through the #3939 owner (routes_to_agents_md with
the live project root, claude_agents_md_blocker): routed instructions are
staged as compile input under apm_modules/<slug>/.apm/instructions/ (the
#1207 staging path), and the rest become .claude/rules/ files rendered by
the Claude rule projection (applyTo -> paths:) through the #4007 per-target
render seam. A hand-authored CLAUDE.md without the import keeps every rule
with the #3939 warning; non-discoverable names keep their rendered rule.
The install-deployment-claude-agents-md-routing guard and owner record
cover the bundle consumer, with a mutation case.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
`apm install <bundle>` into a project-scope Claude target routes each
plugin-native instruction through the #3939 owner (routes_to_agents_md with
the live project root, claude_agents_md_blocker): routed instructions are
staged as compile input under apm_modules/<slug>/.apm/instructions/ (the
#1207 staging path), and the rest become .claude/rules/ files rendered by
the Claude rule projection (applyTo -> paths:) through the #4007 per-target
render seam. A hand-authored CLAUDE.md without the import keeps every rule
with the #3939 warning; non-discoverable names keep their rendered rule.
The install-deployment-claude-agents-md-routing guard and owner record
cover the bundle consumer, with a mutation case.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
`apm install <bundle>` into a project-scope Claude target routes each
plugin-native instruction through the #3939 owner (routes_to_agents_md with
the live project root, claude_agents_md_blocker): routed instructions are
staged as compile input under apm_modules/<slug>/.apm/instructions/ (the
#1207 staging path), and the rest become .claude/rules/ files rendered by
the Claude rule projection (applyTo -> paths:) through the #4007 per-target
render seam. A hand-authored CLAUDE.md without the import keeps every rule
with the #3939 warning; non-discoverable names keep their rendered rule.
The install-deployment-claude-agents-md-routing guard and owner record
cover the bundle consumer, with a mutation case.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) force-pushed the danielmeppiel-improved-lamp branch 2 times, most recently from c9dd11e to 67ac70e Compare November 21, 2026 08:48
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 21, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 21, 2026
`apm install <bundle>` into a project-scope Claude target routes each
plugin-native instruction through the #3939 owner (routes_to_agents_md with
the live project root, claude_agents_md_blocker): routed instructions are
staged as compile input under apm_modules/<slug>/.apm/instructions/ (the
the Claude rule projection (applyTo -> paths:) through the #4007 per-target
render seam. A hand-authored CLAUDE.md without the import keeps every rule
with the #3939 warning; non-discoverable names keep their rendered rule.
The install-deployment-claude-agents-md-routing guard and owner record
cover the bundle consumer, with a mutation case.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) marked this pull request as ready for review November 21, 2026 08:59
Copilot AI balanced review requested due to automatic review settings November 21, 2026 08:59
Bundle installs rendered no Codex agents: 0.36 skipped them with a warning
instead of writing Markdown into .codex/agents/*.toml (#3706). The bundle
deploy loop now renders a packed Markdown agent whose target mapping is
codex_agent with AgentIntegrator._render_codex_agent and deploys it through
_deploy_rendered_agent, after checking the packed bytes against
pack.bundle_files. The agent is rendered once before adopt/collision; the
compared, previewed, written and recorded bytes are the same rendered text.
A render failure skips the file with a named warning and records no claim.
Every other target and gemini_command keep today's behavior.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
… route (#3714)

Unit contracts: rendered TOML and claim hash, adopt/collision/--force/--dry-run,
render failure and non-Markdown sources write nothing, manifest-mismatch skip,
and a parameterized regression asserting every non-Codex agent target still
copies the packed bytes.

Installed-CLI lifecycle: project install, audit --ci, identical reinstall,
edited destination with and without --force, --dry-run, render failure, and
argument-free install --frozen without lockfile churn; user scope renders to
~/.codex/agents and $CODEX_HOME/agents. The $APM_HOME lock and audit check is
strict-xfail until #3989 (0.37 stack) moves the -g bundle lock root.

The bundle-native-layout guard now pins the rendered-format set, the loop
hand-off and the AgentIntegrator render/deploy route, with bypass mutations.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Bundle installs never write apm.yml, so the $APM_HOME audit needs one, as a
real -g user has. Verified on HEAD merged with the 0.37 stack: the strict
xfail XPASSes there and audit reports hash-drift on a tampered agent.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…3714)

At user scope the bundle claim is an absolute path. Passing it as the
collision key made BaseIntegrator.check_collision index past the
destination's parents, so reinstalling over an edited ~/.codex/agents
file (or one under CODEX_HOME) crashed with IndexError instead of
keeping the edit. The collision key is now the destination relative to
the first root that contains it (project or home, else the deploy root);
the absolute record stays the lockfile claim.

Tests: a unit and an installed-CLI -g case (default home and CODEX_HOME)
edit the agent, reinstall without --force (kept) and with it (replaced);
both fail without the fix. Everything that works on main now passes
outside the strict xfail, including the rendered hash in $HOME's lock;
only the #3989-dependent $APM_HOME lock and audit stay strict-xfail.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Bundle installs now convert packed agents to Codex TOML through the
source-install converter, so the agent-conversion requirements apply to
the bundle path: req-tg-015 (model / model_reasoning_effort keep their
native top-level TOML placement) and req-tg-006 (a dropped capability
restriction gets an actionable diagnostic). Conformance tests exercise
integrate_local_bundle directly; CONFORMANCE.{json,md} regenerated.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
#3714)

#3989 moved the -g bundle lockfile to $APM_HOME with home-relative claims,
so the strict xfail is removed and the user-scope lifecycle asserts the
rendered hash there.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
)

main grew services.py to 1194 lines; the bundle Codex agent hook adds the
same 24 lines as before.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…er row

The 0.37 taxonomy ratchet needs a behavioral and promise marker on new
modules. The ledger row's retired skip test is replaced by the Codex agent
lifecycle test, which proves .codex/agents holds TOML, not Markdown.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A bundle file can change after hash verification, allowing unverified agent instructions to be deployed, and validation and deployment bookkeeping issues also remain.

5 open issues
What changed in this PR

Implements #3714 by rendering bundled Markdown agents as Codex TOML through APM's existing agent integrator, replacing the skip-only workaround from #3706.

Changes:

  • Adds Codex rendering and rendered-hash claims for project and user-scope bundle installs, leaving existing copy routes unchanged.
  • Adds lifecycle, routing, conformance, and architecture-guard coverage.
  • Documents the bundle-rendering exception and updates release notes and conformance records.
File Description
tests/​unit/​install/​test_install_local_bundle.py Tests rendering, hashes, collisions, failures, user scope, and target compatibility.
tests/​unit/​install/​test_architecture_invariants.py Adjusts the install-services line budget.
tests/​spec_conformance/​test_local_bundle_agent_reqs.py Tests model preservation and dropped-capability diagnostics.
tests/​integration/​test_local_bundle_compile_only_targets_lifecycle.py Removes the obsolete Codex skip test and updates its documentation.
tests/​integration/​test_local_bundle_codex_agents_lifecycle.py Adds project and user-scope rendering, reinstall, force, frozen-install, and audit scenarios.
tests/​integration/​test_install_local_bundle_e2e.py Updates Codex deployment expectations to include TOML agents.
tests/​integration/​test_architecture_confirmed_bypass_mutations.py Adds mutations for rendering-route and writer bypasses.
tests/​fixtures/​lifecycle_bug_ledger.json Links the existing regression record to the new rendering lifecycle test.
src/​apm_cli/​install/​services.py Delegates rendered bundle agents to the new helper.
src/​apm_cli/​install/​local_bundle_paths.py Classifies Markdown Codex agents as rendered rather than unsupported.
src/​apm_cli/​install/​local_bundle_agents.py Adds integrity checking, shared rendering/deployment, hash claims, and diagnostic forwarding.
scripts/​architecture_linter/​checks/​marketplace_package_and_registration.py Guards the rendering handoff and canonical integrator writer.
packages/​apm-guide/​.apm/​skills/​apm-usage/​package-authoring.md Documents Codex rendering as an exception to bundle copying.
docs/​src/​content/​docs/​reference/​cli/​install.md Documents destinations, rendered hashes, and render-failure warnings.
docs/​src/​content/​docs/​producer/​build-a-plugin.mdx Explains Codex conversion when testing packed plugins.
docs/​src/​content/​docs/​consumer/​install-packages.md Explains rendered Codex agents in local bundle installs.
CONFORMANCE.md Updates coverage counts for the agent-conversion requirements.
CONFORMANCE.json Registers the new conformance tests.
CHANGELOG.md Adds the user-visible bundle-rendering feature entry.
.apm/​architecture/​owners/​install-deployment.json Extends the bundle-layout owner record to cover rendering and deployment.

Review effort: Balanced

Comment thread src/apm_cli/install/services.py Resolved
Comment thread src/apm_cli/install/services.py Resolved
Render the verified packed bytes, normalize manifest digests, skip agents
with native fields Codex rejects, record rendered writes as receipts, and
attribute external CODEX_HOME claims to the codex target.

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 4135495 into main Nov 21, 2026
44 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-improved-lamp branch November 21, 2026 11:52
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 21, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 21, 2026
…odex

[0.38] MAIN-RED FIX (#4007 codex bundle): agents without a description still install
Mohammed Alkindi (MohammedAlkindi) pushed a commit to MohammedAlkindi/apm that referenced this pull request Nov 21, 2026
…microsoft#4007)

microsoft#4007 made bundle Codex rendering strict: a blank description skipped the
agent with a warning. Plugin agents need not declare a description, so a
target-agnostic bundle silently lost its agents for Codex (main-red:
test_target_agnostic_bundle_installs_per_consumer_target[codex]). In strict
mode a missing description is now derived from the agent's leading Markdown
heading, else its name, so Codex can load it. A blank name or body is still
skipped with a named warning.

Co-authored-by: Copilot App <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Render agents from bundles per target (Codex TOML) instead of copying verbatim

2 participants