Skip to content

fix(codex): parked bundles at user scope stay uncounted until approved; local plugin installs stay offline - #4434

Merged
Daniel Meppiel (danielmeppiel) merged 9 commits into
mainfrom
godspeed-4154-codex-park
Nov 21, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 9 commits into
mainfrom
godspeed-4154-codex-park

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

Description

Pins the Codex native-bundle parking contract at user scope, and keeps a local native Codex plugin install at user scope offline.

  • A Codex bundle with unapproved executables installs with exit 0. It prints one [!] notice naming the package and the exact apm approve -g <id> command, and the summary does not count it as installed.
  • While the bundle is parked, apm install -g --frozen and apm audit --ci fail and name the same command.
  • Running the printed command, then apm install -g, registers the bundle with Codex. The lock, the Codex config and the ownership ledger agree.
  • apm deny -g followed by apm install -g retires the bundle.
  • The parked record persists across processes. apm uninstall -g removes it, and approving the removed package then exits 1.
  • The Claude native plugin journey runs at project and user scope with the same steps: parked, hint executed, deployed with lock equal to disk, then denied and retired.
  • A local native Codex plugin install at user scope stays offline: APM starts Codex with a private, temporary configuration for the install and removes it when the connection closes.
  • tests/utils/codex_stand_in.py is a hermetic Codex CLI stand-in, so the deploy step runs without a real Codex install. The Codex journey asserts that the install stays offline.

Issue and approved scope

Issue: Fixes #4432
Fixes #4438 | Refs #4154

Human scope-approval comment: #4432 scope record (last comment on #4432); steward binding conditions for Codex parking at user scope (shared privately with the H lead), completing conditions 1-3 and 5 on top of #4275.

Does this PR complete the issue, or what remains? It completes #4432: the world Codex cell is required and passes offline. #4154 closed with #4275; this PR adds the remaining Codex parking proofs.

Type of change

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

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)
Node id Result
tests/integration/test_approve_parked_native_plugin_lifecycle.py::test_claude_plugin_is_approved_by_the_printed_command[user] green on branch
tests/integration/test_approve_parked_native_plugin_lifecycle.py::test_claude_plugin_is_approved_by_the_printed_command[project] green on branch
tests/integration/test_approve_parked_native_plugin_lifecycle.py::test_codex_bundle_parks_until_the_printed_command_approves_it green on branch
tests/integration/test_approve_parked_native_plugin_lifecycle.py::test_parked_codex_bundle_record_survives_and_uninstall_clears_it green on branch
tests/unit/test_codex_native_admission.py green on branch
tests/lifecycle/world/test_world.py::test_each_package_installs_through_the_real_cli[p-native-codex-user] (required; offline; codex-cli 0.163.0 and 0.170.0) green on branch

Commands run locally (all passed):

  • APM_E2E_TESTS=1 APM_BINARY_PATH=.venv/bin/apm uv run --extra dev pytest tests/integration/test_approve_parked_native_plugin_lifecycle.py tests/integration/test_approval_identity_lifecycle.py tests/unit/commands/test_approve_deny.py <codex admission tests> -n 8 -> 1213 passed
  • ruff check / ruff format --check over src/ tests/ scripts/lint_architecture_boundaries.py scripts/architecture_linter/ scripts/windows_native_symlink_probe_entry.py -> clean
  • scripts/check_complexity_ratchet.py --base-ref origin/main -> clean
  • scripts/lint_architecture_boundaries.py --root . -> clean

Changelog

  • One line in one section under ## [Unreleased] in CHANGELOG.md.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

  • N/A -- this PR does not change OpenAPM-observable behaviour.

… approve and deny, scope parity

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@danielmeppiel Daniel Meppiel (danielmeppiel) added this to the 0.37.0 milestone Nov 20, 2026
Copilot AI balanced review requested due to automatic review settings November 20, 2026 17:25

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

Critical test blockers remain: the Codex stand-in lacks a Windows launcher, the admission fixture omits frozen, and the lifecycle ledger still references obsolete test names.

3 open issues
What changed in this PR

This PR extends the parked native-plugin approval flow from #4275, correcting Codex install counts and rejecting frozen installs until executables are approved.

Changes:

  • Excludes parked Codex bundles from installed-package counts and blocks frozen replay.
  • Expands lifecycle coverage for approval, deployment, denial, persistence, and uninstall.
  • Adds a hermetic Codex CLI stand-in and documents the user-visible behavior.
File Description
tests/​utils/​codex_stand_in.py Adds a local Codex CLI stand-in for lifecycle tests.
tests/​unit/​test_codex_native_admission.py Checks that parked admission returns the parking flag.
tests/​integration/​test_approve_parked_native_plugin_lifecycle.py Expands Claude and Codex approval lifecycle coverage.
src/​apm_cli/​install/​template.py Excludes parked native bundles from install counts.
src/​apm_cli/​codex_plugins/​admission.py Marks parked bundles and rejects unapproved frozen replay.
CHANGELOG.md Records the counting and frozen-install fixes.

Review effort: Balanced

Comment thread src/apm_cli/codex_plugins/admission.py Resolved
Comment thread tests/utils/codex_stand_in.py Resolved
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ffline (#4432)

The Codex app-server APM starts runs from a private, trusted launch directory
whose project configuration turns plugins off for startup, so startup tasks do
not sync the curated marketplace; requests that load a marketplace path still
see plugins. The world Codex cell is required, the stand-in records any sync it
would make, and the Codex journey asserts none happened.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@danielmeppiel Daniel Meppiel (danielmeppiel) changed the title fix(codex): a parked bundle at user scope is not counted as installed and fails --frozen until approved fix(codex): parked bundles at user scope stay uncounted until approved; local plugin installs stay offline Nov 20, 2026
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
…unted until approved; local plugin installs stay offline

Co-authored-by: Copilot App <[email protected]>

# Conflicts:
#	tests/fixtures/lifecycle_bug_ledger.json
#	tests/lifecycle/world/test_world.py
The private launch config is written 0600, every app-server start is
pinned to the one offline launcher by a closed-world guard
(marketplace-integrations-codex-offline-launch, with a MutationCase),
the launcher inherits the caller's environment unchanged, and the
journey asserts no launch directory remains after install.

Co-authored-by: Copilot App <[email protected]>
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit f90dc18 into main Nov 21, 2026
3 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the godspeed-4154-codex-park branch November 21, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants