Skip to content

Drop unreachable responses from the failing Codex plugin mock - #4032

Merged
max-sixty merged 1 commit into
mainfrom
fix/dead-codex-mock-responses
Sep 7, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/dead-codex-mock-responses

Conversation

@worktrunk-bot

@worktrunk-bot worktrunk-bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

setup_mock_codex_with_plugins_failing registers four failing responses, and only one of them can ever fire. Its sole caller is test_plugins_codex_install_command_fails, whose install stops at plugin marketplace add (exit 1) before codex plugin add is reached; codex plugin remove isn't part of the install path at all, and neither is plugin marketplace remove. The uninstall tests that would reach either plugin-op use setup_mock_codex_with_plugin_ops_failing, the helper #4019 added for that split.

This drops the two cross-layer responses and keeps plugin marketplace remove, which is unexercised today but is what the helper is for: the pair reads as "the marketplace layer fails" (this helper) versus "the marketplace succeeds and the plugin ops fail" (setup_mock_codex_with_plugin_ops_failing), and a marketplace-removal failure is exactly the uninstall-side case #4033 is adding tests for. Dropping the two restores the doc comment above them to "marketplace commands fail".

Verified with cargo test --test integration -- test_plugins (26 passed). No snapshot referenced the removed stderr strings — the two that carry plugin add failed / plugin remove failed are driven by setup_mock_codex_with_plugin_ops_failing.

Raised as a review finding on #4019 after it merged, so nothing on that PR could pick it up.

`setup_mock_codex_with_plugins_failing` registers `plugin add` and
`plugin remove` responses that nothing runs. Its only caller is
`test_plugins_codex_install_command_fails`, whose install stops at
`plugin marketplace add` (exit 1) before reaching `plugin add`, and
`plugin remove` is not part of the install path at all. The uninstall
tests that would reach them use `setup_mock_codex_with_plugin_ops_failing`
instead, which is the helper #4019 added for exactly that split.

With the two gone the helper drives only what its name says, so the doc
comment goes back to "marketplace commands fail".
@max-sixty
max-sixty enabled auto-merge (squash) September 7, 2026 04:24
@max-sixty
max-sixty merged commit a0f30d6 into main Sep 7, 2026
37 checks passed
@max-sixty
max-sixty deleted the fix/dead-codex-mock-responses branch September 7, 2026 04:35
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