Skip to content

[0.38] MAIN-RED FIX (#4007 codex bundle): agents without a description still install - #4613

Merged
Daniel Meppiel (danielmeppiel) merged 6 commits into
mainfrom
danielmeppiel-main-red-4007-codex
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 6 commits into
mainfrom
danielmeppiel-main-red-4007-codex

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

Description

Fixes forward the main-red from #4007 (merged as 4135495b): tests/integration/test_install_local_bundle_e2e.py::TestInstallLocalBundleIssue1207::test_target_agnostic_bundle_installs_per_consumer_target[codex-expected_paths4] failed with "missing .codex/agents/reviewer.toml for target=codex" (run 44901141694).

Root cause. #4007 renders bundle Codex agents with strict=True: a blank description raised CodexAgentFieldError, so the agent was skipped with only a warning and install exited 0. Plugin agents do not have to declare a description (the e2e fixture agents/reviewer.md is # Reviewer\nReviews code.), so a target-agnostic bundle quietly lost its agents for Codex.

Fix. In strict (bundle) rendering, a missing or blank description now comes from the agent's leading Markdown heading, or else from its name. Codex then loads the agent, and the TOML APM records is still the rendered file. A blank name or body, which Codex also rejects, is still skipped with a warning that names the field. The source-package path (non-strict) is unchanged.

Scope. This PR fixes only the #4007 Codex red. Lifecycle Smoke Shard 4 (test_m_source.py::test_source_spine_covers_every_form_and_op, the stale #4572 known cell after #4597) is inherited from main and owned by #4619; this PR lands after #4619.

Issue and approved scope

Issue: Refs #3714 (main-red fix-forward for its PR #4007; no new scope)

Human scope-approval comment: #3714 (comment)

Does this PR complete the issue, or what remains? It restores #4007's contract: a target-agnostic bundle installs its agents for Codex. Nothing else remains.

Type of change

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

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Local evidence, run on the branch merged with main 7fb04a14:

  • pytest tests/integration/test_install_local_bundle_e2e.py tests/unit/install/test_install_local_bundle.py tests/spec_conformance/test_local_bundle_agent_reqs.py tests/integration/test_local_bundle_codex_agents_lifecycle.py: 167 passed, including the previously red [codex-expected_paths4].
  • New unit cases: test_codex_bundle_agent_without_a_description_gets_a_loadable_one (leading heading, no heading, blank description) and test_codex_bundle_agent_with_a_field_codex_rejects_is_skipped (blank body, blank name).
  • Lint chain all clean: ruff 0.15.12 check/format, pylint R0801, lint-auth-signals, complexity ratchet, taxonomy --changed, architecture boundaries and the assertion-quality ratchet.

Changelog

Spec conformance (OpenAPM v0.1)

  • Spec edit
  • Manifest edit
  • Test edit
  • CONFORMANCE.{md,json} regenerated
  • N/A -- this PR does not change OpenAPM-observable behaviour. The req-tg-006/015 tests are unchanged and pass.

Lands right after #4606.

…#4007)

#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]>
#4597 fixed the stale .apm-pin after a git -> registry switch but kept the
strict known cell, so test_source_spine_covers_every_form_and_op failed on
main: the bug no longer reproduces. The X|install|pkg-registry|UPDATE=on cell
now earns its oracle receipt like any other.

Co-authored-by: Copilot App <[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 blank YAML description loads as None and bypasses the fallback, causing a valid bundle agent to be skipped; the handling and regression coverage need to include this case.

1 open issue
What changed in this PR

This PR addresses the Codex bundle-install regression from #4007 by deriving descriptions for agents that omit them, using the existing agent renderer.

Changes:

  • Adds heading-or-name description fallback during strict bundle rendering, leaving source-package rendering unchanged.
  • Adds regression cases for missing descriptions and invalid names or bodies.
  • Updates the install reference and existing changelog entry.
File Description
tests/​unit/​install/​test_install_local_bundle.py Tests description fallback and rejection of blank required fields.
src/​apm_cli/​integration/​agent_integrator.py Derives missing descriptions during strict Codex rendering.
docs/​src/​content/​docs/​reference/​cli/​install.md Documents description fallback and skip behavior.
CHANGELOG.md Amends the Codex bundle-install entry.

Review effort: Balanced

…nts (#3714)

Review of #4613: 'description:' loads as None and bypassed the derived
description, so a valid bundle agent was still skipped.

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 2de15af into main Nov 21, 2026
88 of 90 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-main-red-4007-codex branch November 21, 2026 16:08
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.

2 participants