Skip to content

Stop reporting a failed Codex integration as a healthy host - #700

Merged
MongLong0214 merged 3 commits into
mainfrom
fix-codex-plugin-truth
Aug 16, 2026
Merged

Stop reporting a failed Codex integration as a healthy host#700
MongLong0214 merged 3 commits into
mainfrom
fix-codex-plugin-truth

Conversation

@MongLong0214

Copy link
Copy Markdown
Owner

Reproduced, then fixed. The defect is mine, introduced in #698 while fixing
#697.

detail   "Codex registration added and live-verified; plugin step failed"
healthy  true
ok       true
exit     0

#698 appended the plugin outcome to detail and left healthy alone. ok is
computed from the field, not the sentence — so the installer exited 0 on a
requested integration that did not happen.

What changed

Codex is two requested integrations, and the host is healthy only if both are.
The plugin outcome is a value now, not a sentence, and composing it with the MCP
result is a named function so the composition can be tested directly. Reaching
it through a spawned codex would have meant no test at all.

An unhealthy registration stays unhealthy whatever the plugin did — without that,
a successful plugin step would resurrect a host whose registration is broken.

Verified

Two mutations, two different failures:

healthy: plugin.ok → mcp.healthy   → "reports unhealthy when the plugin step fails"
remove the unhealthy early return  → "never turns an unhealthy registration healthy"

Which half worked stays readable in detail: the registration may be usable
while the plugin is not, and a reader who cannot tell them apart repairs the
wrong one.

66 tests passing across the installer files. Canonical artifact ca608927.

This is the same shape as everything found today — a check that names a failure
and does not enforce it — and I wrote it yesterday.

#698 added the Codex plugin step to the enumeration and appended its outcome to
detail, leaving healthy alone. So a run where the MCP registration succeeded and
the plugin install failed produced:

    detail  "Codex registration added and live-verified; plugin step failed"
    healthy true
    ok      true
    exit    0

The sentence said failed and the field said healthy, and ok is computed from the
field. The installer exited 0 on a requested integration that did not happen.

Codex is two requested integrations and the host is healthy only if both are.
The plugin outcome is now a value rather than a sentence, and composing it with
the MCP result is a named function so the composition itself can be tested --
reaching it through a spawned `codex` would have meant no test at all.

An unhealthy registration stays unhealthy whatever the plugin did. That is not
symmetry for its own sake: without it the plugin succeeding would resurrect a
host whose registration is broken.

Verified by two mutations that fail different assertions -- unbinding healthy
from the plugin outcome, and removing the unhealthy early return.

This is the same defect as the ones found all day, introduced while fixing one
of them: a check that names a failure and does not enforce it.

Limit: a requested integration that failed is not a healthy host
Blast: module
Undo: easy
Certainty: firm
Provenance: authored
Record-Id: r-codexok
@github-actions

github-actions Bot commented Aug 16, 2026

Copy link
Copy Markdown

CommitLore — record lint

Trailers: clean — 3 commits in origin/main..e1c13d045c082506b53b7ca920318670f86c91e9
Active constraints: not read — commitlore: git log --follow accepts exactly one pathspec, so renames are not followed for 8 paths; query one path at a time to follow its rename chain (8 changed paths)

Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR.

The fixture answered four mcp subcommands and exited 1 for everything else.
That was fine while a failed plugin step was swallowed: the installer reported
healthy and exited 0 regardless. Once the failure became real, tests about the
MCP registration path started failing on the plugin step -- a reason they do not
measure.

So the fixture learns what the real CLI already does: plugin marketplace,
plugin list, plugin add. The expectation of exit 0 was not stale and is
unchanged.

The alternative -- relaxing the exit-code assertion -- would have hidden the
thing the parent commit exists to expose.

Limit: a fixture that cannot succeed cannot measure success
Blast: local
Undo: easy
Certainty: firm
Provenance: authored
Record-Id: r-codexfx
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.

1 participant