Repository navigation
Remove implicit Codex model fallback from generated workflows - #66708
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
✅ Ponytail Reviewer completed successfully! Lean already. Ship.
|
|
🔎 PR Code Quality Reviewer is reviewing code quality for this pull request... |
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. No ADR enforcement needed for PR #66708: no 'implementation' label (has_implementation_label=false) and only 30 added lines in business logic directories (threshold 100, requires_adr_by_default_volume=false).
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
There was a problem hiding this comment.
🟢 Approval recommended
The implementation consistently removes terminal Codex fallbacks and includes focused coverage for all affected phases.
0 open findings
What changed in this PR
Removes Codex’s implicit terminal model fallback, addressing #63067 while preserving runtime model selection.
Changes:
- Adds fallback expressions limited to phase and enterprise variables.
- Applies them across agent, detection, evals, and metadata generation.
- Updates tests, golden output, and generated workflows.
| File | Description |
|---|---|
pkg/workflow/compilerenv/manager.go |
Adds the no-terminal-fallback expression helper. |
pkg/workflow/compilerenv/manager_test.go |
Tests the new helper. |
pkg/workflow/codex_engine.go |
Removes Codex’s built-in fallback. |
pkg/workflow/codex_engine_test.go |
Updates phase-specific expectations. |
pkg/workflow/evals_steps.go |
Removes the Codex evals fallback. |
pkg/workflow/compiler_yaml_step_lifecycle.go |
Updates Codex model metadata generation. |
pkg/workflow/model_env_vars_test.go |
Updates generated environment assertions. |
pkg/workflow/engine_fallback_models_test.go |
Covers poison-sentinel behavior across phases. |
pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden |
Refreshes Codex golden output. |
.github/workflows/smoke-codex.lock.yml |
Regenerates the Codex smoke workflow. |
.github/workflows/engine-conformance-codex.lock.yml |
Regenerates the Codex conformance workflow. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
There was a problem hiding this comment.
Request changes
The new Codex helper can surface unresolved ${{ vars... }} strings at runtime when neither model variable is defined, which existing runtime code treats as a hard configuration error.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 61.9 AIC · ⌖ 5.41 AIC · ⊞ 19.3K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd (via pr-triage: bug_fix). This is a tight, well-scoped fix — no actionable issues found.
📋 Analysis
Diagnosing-bugs check
- Root cause (terminal
|| 'gpt-5.4'style fallback inBuildModelOverrideExpression) is addressed directly, not just the symptom, by introducingBuildModelOverrideExpressionWithoutFallbackand routing all Codex call sites through it. constants.CodexDefaultModelis already"", sorequire.Empty(t, constants.CodexDefaultModel)inengine_fallback_models_test.gocorrectly pins the precondition.- Verified no remaining call sites reference the old
BuildModelOverrideExpressionEmptyFallbackname or the removed built-in fallback constant in non-test code.
TDD check
TestCodexHasNoImplicitFallbackModelwas expanded to table-drive all three phases (agent/detection/evals) with aPOISON_PRIMARYsentinel and asserts the exact resulting expression — good regression coverage per/tdd's edge-case guidance.- Golden fixture (
codex.golden) and both affected lock files were regenerated consistently with the new expression format; spot-checkedengine-conformance-codex.lock.ymlandsmoke-codex.lock.yml— both correctly drop the|| ''terminal. - Docs (
docs/src/content/docs/reference/engines.md) already describe the "no implicit recovery model" behavior accurately; no doc update needed.
Positive highlights
- ✅ Clear, descriptive rename (
BuildModelOverrideExpressionWithoutFallback) with a doc comment explaining intent. - ✅ Test coverage spans all three Codex phases, not just the agent phase.
- ✅ Minimal, surgical diff — no unrelated changes.
No blocking issues identified; approving.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 56.9 AIC · ⌖ 14.3 AIC · ⊞ 10.1K
Comment /matt to run again
There was a problem hiding this comment.
Impeccable review (harden) — Remove implicit Codex model fallback
Reviewed via harden mode (bug-fix/behavior-removal change touching generated YAML env expressions).
Findings: No blocking issues on changed lines.
- The rename
BuildModelOverrideExpressionEmptyFallback→BuildModelOverrideExpressionWithoutFallbackand its new behavior (${{ vars.X || vars.Y }}with no terminal''fallback) is applied consistently acrosscodex_engine.go,evals_steps.go, andcompiler_yaml_step_lifecycle.go. - All affected generated lock files, the Codex golden fixture, and unit tests (
TestCodexHasNoImplicitFallbackModel,TestBuildModelOverrideExpression,TestModelEnvVarInjection*,TestExpressionModelUsesEnvVar,TestCodexEngineExecutionPassesModelEnvVarIntoAWFStep) were updated and pass locally. - Dropping the trailing
|| ''is safe: GitHub Actions${{ vars.X || vars.Y }}already evaluates to an empty string when both vars are unset, so behavior at the YAML-expression boundary is unchanged.
Non-blocking note (not part of this diff, no inline comment added): docs/adr/35286-compiler-managed-enterprise-env-controls.md (lines ~17, 67) still references the removed BuildModelOverrideExpressionEmptyFallback name. Worth a quick follow-up doc update so the ADR doesn't drift from the renamed/re-semantic'd helper, but this doesn't block merge.
No other UX/error-state/edge-case gaps identified in the diff.
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 32.9 AIC · ⌖ 13.1 AIC · ⊞ 8.1K
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 6f5f3c7
|
…t-model-for-codex-again Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Addressed in 12d7347: Codex model expressions now use an explicit
Merged latest |
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 12d7347
|
…t-model-for-codex-again Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Merged the latest |
|
🎉 This pull request is included in a new release. Release: |
Codex model fallback expressions included a terminal default, allowing a failed BYOK poison-sentinel primary to fall through to an unsanctioned model.
For example, the generated fallback now ends at the configured variables: