Skip to content

test(lifecycle): skip the p-native-codex user cell without Codex CLI >= 0.163.0 - #4378

Merged
Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
danielmeppiel-t1-codex-cell-guard
Nov 20, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
danielmeppiel-t1-codex-cell-guard

Conversation

@danielmeppiel

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

Copy link
Copy Markdown
Collaborator

Refs #4154

At user scope, the p-native-codex world cell's post-approval install runs the real Codex CLI. Once #4275 (#4154) lands and flips that cell to required, it cannot pass on a runner without Codex CLI >= 0.163.0. This adds a skip guard now, so the flip cannot turn CI red. The skip reason names the binary: needs the Codex CLI (codex) >= 0.163.0 on PATH; none found, or the version that was found.

The strict xfail on #4154 is unchanged. The p-parent and p-parent2 user cells (#4153) stay, because #4138 closed without merging.

Validation

  • pytest tests/lifecycle/world/test_world.py::test_each_package_installs_through_the_real_cli with codex absent from PATH: 15 passed, 1 skipped (the codex user cell, with the reason above), 2 xfailed (install -g drops a transitive relative-path dependency without a diagnostic #4153). This was a single run with the host's codex 0.170.0 left off PATH, so only the skip branch was exercised.
  • ruff check and format: clean.

Steward pre-approval (A-C)

Steward condition

The skip never applies when CI or APM_REQUIRE_CODEX is set. On CI, a runner without Codex CLI >= 0.163.0 fails the cell loudly instead of silently losing coverage. The skip reason names the version found, or says that none was found. Locally, without codex: skipped. With CI=true: not skipped.

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

The Codex guard probes a different executable from the install environment and accepts versions or failed probes that production qualification rejects, causing required test cells to fail rather than skip.

2 open issues
What changed in this PR

This PR adds a prerequisite guard for the user-scope p-native-codex lifecycle cell, preparing it to become required when #4154 is fixed.

Changes:

  • Probes Codex availability and version, adding a descriptive skip reason when the prerequisite is unmet.
  • Centralizes cell marks while preserving the existing strict expected failures for #4154 and #4153.
File Description
tests/​lifecycle/​world/​test_world.py Adds the Codex prerequisite probe and applies skip and expected-failure marks to lifecycle cells.

Review effort: Balanced

Comment thread tests/lifecycle/world/test_world.py Resolved
Comment thread tests/lifecycle/world/test_world.py Resolved
…>= 0.163.0

The cell's post-approval install runs the real Codex CLI; once #4154 flips it to
required it cannot pass without one, so it is skipped with a reason that names
the missing or too-old binary. The strict xfail on #4154 is unchanged.

Co-authored-by: Copilot App <[email protected]>
… codex ahead of the world trap

- Probe with production qualification (is_qualified_codex_version: prereleases of
  the floor refused) and the probe's exit status; a failed probe counts as absent.
- The qualified codex goes ahead of the world's exit-91 trap for this cell only;
  other cells keep the trap.
- Without one the cell is skipped locally and FAILS under CI or APM_REQUIRE_CODEX.
- Unit cases: floor, later, floor prerelease, older, failed probe; CI fail vs local skip.

Co-authored-by: Copilot App <[email protected]>
@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 2edb7d8 into main Nov 20, 2026
29 of 32 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-t1-codex-cell-guard branch November 20, 2026 15:58
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