Repository navigation
[0.38] feat(install): render bundle agents to Codex TOML at install (#3714) - #4007
Merged
Daniel Meppiel (danielmeppiel) merged 16 commits intoNov 21, 2026
Merged
Conversation
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-improved-lamp
branch
from
November 20, 2026 00:21
249e85b to
1bd2740
Compare
Closed
5 of 14 tasks
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-improved-lamp
branch
2 times, most recently
from
November 20, 2026 01:25
a84c8ef to
0eb3e4a
Compare
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 20, 2026
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
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]>
8 of 18 tasks
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
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)
force-pushed
the
danielmeppiel-improved-lamp
branch
2 times, most recently
from
November 21, 2026 08:48
c9dd11e to
67ac70e
Compare
Daniel Meppiel (danielmeppiel)
added a commit
that referenced
this pull request
Nov 21, 2026
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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]>
Daniel Meppiel (danielmeppiel)
marked this pull request as ready for review
November 21, 2026 08:59
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
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]>
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]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
force-pushed
the
danielmeppiel-improved-lamp
branch
from
November 21, 2026 09:07
67ac70e to
8b1de0b
Compare
Contributor
There was a problem hiding this comment.
🟡 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
Co-authored-by: Copilot App <[email protected]>
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]>
7 of 14 tasks
…rnal bundle claims (#3714) Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…wner (#3714) Co-authored-by: Copilot App <[email protected]>
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
Co-authored-by: Copilot App <[email protected]>
This was referenced Nov 21, 2026
Merged
Merged
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


TL;DR
apm install <bundle>now renders packed Markdown agents to Codex TOML in.codex/agents/when the target's agent mapping iscodex_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, andgemini_commandstays 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)
_UNSUPPORTED_PLUGIN_FORMAT_IDScontainedcodex_agent, so every packedagents/*.mdwas skipped with "cannot convert plugin-native files to codex_agent (.toml) yet"..codex/agents/*.toml. Codex cannot read that file, and APM still recorded it as deployed.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)
codex_agentleaves the unsupported set and joins a new rendered set. Only a Markdown source under a rendered mapping is rendered; a non-.mdsource keeps today's skip warning.install/local_bundle_agents.pyand continues. The copy path below it is unchanged.pack.bundle_files, renders once with_render_codex_agent, then (unless--dry-run) deploys through_deploy_rendered_agent(managed_files=None). Withmanaged_files=None, an existing file is protected unless the bytes are identical or--forceis passed.install-deployment-bundle-native-layoutguard 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_targetand 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 raisesTypeErrorinstead 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 existingSkipped <path>: ...wording.-gis absolute, so the helper hands_deploy_rendered_agentthe destination relative to the first containing root (collision_roots=(project_root, deploy_root)). An absolute key madecheck_collisionindex past the destination's parents (IndexError) on a reinstall over an edited~/.codex/agentsfile (peer-review fix).install/services.py: one ~20-line hunk beforenormalized_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)..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 theservices.pyLOC 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"]Trade-offs
_render_codex_agentand_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.managed_files=Nonemeans a reinstall over an edited (or older-version) agent is kept without--force. That matches how the loop treats every other bundle file today.resolve_linkshook is passed, but no resolver is initialized for bundles, so bodies stay as packed. Other bundle files are not rewritten either.services.pybudget +15 lines. The hunk is already a single delegated call. Moving claim bookkeeping into the helper kept McCabe complexity at 50.-glock/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_HOMElock root; it sat under a strict xfail until 0.37 merged and is now a plain assertion.Benefits
.codex/agents/<name>.tomlfiles, where today they get zero agents and one warning per agent.apm audit --civerifies the rendered bytes at project and user scope. A tampered agent reportshash-drift.apm install --frozenafterwards is byte-stable.Validation
CI on
8b1de0bd(rebased on 0.37mainf8c31a5): 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 attest_codex_bundle_agent_project_lifecycleinstead of the retired skip test; that test proves.codex/agentsholds parseable TOML, never Markdown.Local runs
Full
tests/unitrun: 358 failures/errors, all of them also failing on cleanmainin this environment (root user and network:test_unix_install_ownership,test_shepherd_owner_touch_gate,test_public_release_metadata, ...). None are new.Scenario Evidence
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_tomlapm audit --cipasses; identical reinstall andinstall --frozencause no churntest_codex_bundle_agent_project_lifecycle--forceand replaced with it;--dry-runwrites nothingtest_codex_bundle_agent_project_lifecycle;test_codex_bundle_agent_collision_dry_run_and_forcetest_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_manifesttools(req-tg-015, req-tg-006)tests/spec_conformance/test_local_bundle_agent_reqs.pytest_only_codex_agents_are_rendered_across_agent_targets(parameterized over every agent-capable target)apm install -g <bundle>renders to~/.codex/agentsand$CODEX_HOME/agents, hash equal to the rendered bytes; an edited agent is kept without--forceand replaced with ittest_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]$APM_HOMEholds the home-relative claim and rendered hash;apm audit --cifrom$APM_HOMEpassestest_codex_bundle_agent_user_scope_lock_and_auditHow to test
APM_BINARY_PATH=.venv/bin/apm uv run pytest tests/integration/test_local_bundle_codex_agents_lifecycle.py -q→ 5 passedapm packa package containing.apm/agents/rev.agent.md, then runapm install ./build/<pkg> --target codex --no-policyin a fresh project and inspect.codex/agents/rev.toml.Skipped ... Re-run with --force), then re-run with--force.apm audit --ci --no-policypasses.Guard budget changes
tests/unit/install/test_architecture_invariants.pyKNOWN_LARGE_MODULES["services.py"]#3714commentConflict 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-usagepackage-authoring.md).Type of change
Testing
main; see Validation)Changelog
## [Unreleased](### Added).Spec conformance (OpenAPM v0.1)
tests/spec_conformance/test_local_bundle_agent_reqs.pycites the existing req-tg-015 (Codexmodel/model_reasoning_effortkeep 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:
_render_codex_agent(content=...); the source is never read againtest_codex_bundle_agent_renders_the_verified_bytesbundle.local_bundle._normalize_hash, as admission does; invalid values warn and skiptest_codex_bundle_agent_accepts_normalized_manifest_digestsCodexAgentFieldError(blank name, description or body, per the Codex parser); the bundle path rendersstrict=Trueand warns and skips before any write or claimtest_codex_bundle_agent_with_a_field_codex_rejects_is_skippedtake_rendered_writes) joinwritten_files; dry runs and adoptions excludedtest_codex_bundle_agent_collision_dry_run_and_force$CODEX_HOMErecorded aslegacytarget-relativecodex row); drift rebases bundle claims onto external rootstest_codex_bundle_agent_external_codex_home_audits_beside_another_targetOut 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.pytestunit + spec + drift + bypass mutations: 2938 passed (1 unrelated local ADO credential-helper failure intest_auth_credential_report).tests/integration/test_local_bundle_codex_agents_lifecycle.py: 6 passed.