Skip to content

ci(lifecycle): provision pinned Codex in one job; the Codex cell skips elsewhere - #4406

Merged
Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel-t1-codex-guard-main-red
Nov 20, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 1 commit into
mainfrom
danielmeppiel-t1-codex-guard-main-red

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

Red-main fix for #4378's CI-fail mode (freeze-exempt, named by DM v2). PR CI runners have no qualified Codex, and the Codex native plugin cell (test_world[p-native-codex-user]) FAILED under CI, so main went red.

  • tests/lifecycle/world/test_world.py: the cell fails only under APM_REQUIRE_CODEX. Every other job, including PR shards with CI=true, skips it with the named reason ("needs the Codex CLI (codex) >= 0.163.0 on PATH; ...").
  • .github/workflows/lifecycle-journeys.yml: the nightly/RC-dispatch Lifecycle Full Suite (Linux) job installs @openai/[email protected] (pinned to MINIMUM_CODEX_VERSION, npm cache) and sets APM_REQUIRE_CODEX=1, so the cell genuinely runs there and fails loudly if Codex is missing.
  • tests/quality/test_ci_topology.py: test_exactly_one_job_provisions_and_requires_codex asserts that exactly one job (lifecycle-journeys.yml/lifecycle-full) sets APM_REQUIRE_CODEX, and that it installs Codex at the production floor before running tests/lifecycle. Coverage cannot silently vanish.

Issue and approved scope

Issue: Refs #4154

Human scope-approval comment: red-main fix named by DM v2 and routed by the Stream T lead; the steward's condition spelled out the provision-in-one-job shape.

Does this PR complete the issue, or what remains? Restores main. #4154's cell now runs for real only in the nightly or RC-dispatch full suite.

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-set diff: renamed test_missing_codex_fails_the_cell_under_ci -> test_missing_codex_fails_the_cell_only_when_required (same oracle: fail under the require flag, skip otherwise; it now also proves CI=true alone skips). Added test_exactly_one_job_provisions_and_requires_codex. No deletions.

  • CI=true pytest tests/lifecycle/world/test_world.py -k codex (no Codex on PATH) -> 9 passed, 1 skipped ("needs the Codex CLI (codex) >= 0.163.0 on PATH; none found")
  • pytest tests/quality/test_ci_topology.py::test_exactly_one_job_provisions_and_requires_codex -> 1 passed
  • ruff check / ruff format --check (0.15.12) on changed files -> 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.

…where

PR shards have no Codex, so failing under CI turned main red after #4378.
The Codex native plugin cell now fails only under APM_REQUIRE_CODEX, which
only the nightly Lifecycle Full Suite (Linux) sets, after installing
@openai/[email protected] (cached). Every other job skips with the named
reason. A topology test pins exactly one requiring job.

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.

🟢 Approval recommended

No active review issues block approval of the changes limiting mandatory Codex coverage to the dedicated full-lifecycle job.

No open issues 🎉

What changed in this PR

This PR addresses the CI failure introduced by #4378 by requiring Codex only in the dedicated full lifecycle job, preserving coverage for the native plugin scenario associated with #4154.

Changes:

  • Skip the Codex lifecycle cell when a qualified CLI is unavailable, unless APM_REQUIRE_CODEX is set.
  • Install pinned Codex 0.163.0 with npm caching in the nightly/RC-dispatch full-suite job.
  • Add a topology guard ensuring exactly one job requires Codex and installs it before running lifecycle tests.
File Description
tests/​quality/​test_ci_topology.py Verifies the sole Codex-required job, version pin, and installation order.
tests/​lifecycle/​world/​test_world.py Limits missing-Codex failures to explicit opt-in and updates regression coverage.
.github/​workflows/​lifecycle-journeys.yml Caches npm downloads, installs pinned Codex, and requires it for the full suite.

Review effort: Balanced

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit e6c9752 into main Nov 20, 2026
24 of 30 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-t1-codex-guard-main-red branch November 20, 2026 17:01
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
Co-authored-by: Copilot App <[email protected]>

# Conflicts:
#	tests/lifecycle/generator/rules.py
#	tests/quality/lifecycle_obligations.json
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 20, 2026
…4143)

Take #4395's hook-summary dedupe and drop the #4243 cell widening it supersedes; generator anchors follow line drift; obligations regenerated.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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