Skip to content

Document Codex GPT-DM fair-test lane - #692

Merged
100yenadmin merged 2 commits into
mainfrom
codex/worldos-codex-fair-preflight
Jun 6, 2026
Merged

Document Codex GPT-DM fair-test lane#692
100yenadmin merged 2 commits into
mainfrom
codex/worldos-codex-fair-preflight

Conversation

@100yenadmin

@100yenadmin 100yenadmin commented Jun 6, 2026

Copy link
Copy Markdown
Member

Summary

Licensing / CLA

  • I have read CLA.md and submit this contribution under the WorldOS Contributor License Agreement.
  • I have not included confidential information, private customer data, private imported content, or third-party-restricted material.
  • Any third-party material in this PR is clearly identified with source and license.

Evidence

  • Private Lexar evidence root: worldos-codex-fair-test/
  • gpt-5.5: Tolkien 3.1, Angry-DM 3.5, behavioral RED
  • gpt-5.4: Tolkien 2.4, Angry-DM 3.3, behavioral RED
  • Decision: native Codex GPT uses tools, but these scores do not green-light the OpenClaw gateway plugin build (Build the WorldOS OpenClaw gateway-OAuth tool-loop DM plugin #690)

Tests

  • python3 -m pytest qa/test_support_vm_preflight.py -q
  • bash -n scripts/codex_qa_home.sh
  • temp isolated Codex-home smoke
  • actual preflight smoke with CODEX_HOME=/Users/lume/.codex-worldos-qa verified codex_config_ready=true while blocking on the intentionally dirty worktree and missing Playwright in that edit worktree

Refs #691

Summary by CodeRabbit

  • New Features

    • VM readiness checks now validate Codex CLI configuration and include a Codex-config readiness signal and environment snapshot in reports.
    • New script to create isolated Codex CLI "home" directories for test lanes.
  • Documentation

    • Added a Mac-only runbook section describing the Codex GPT fair-test lane and its procedure.
  • Tests

    • Expanded tests covering Codex service-tier parsing and readiness gating.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1337fc96-6898-4b1c-908b-d494c972fd75

📥 Commits

Reviewing files that changed from the base of the PR and between 3ece300 and 693371a.

📒 Files selected for processing (3)
  • WorldOS-RUNBOOK.md
  • qa/support_vm_preflight.py
  • qa/test_support_vm_preflight.py
✅ Files skipped from review due to trivial changes (1)
  • WorldOS-RUNBOOK.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • qa/test_support_vm_preflight.py
  • qa/support_vm_preflight.py

📝 Walkthrough

Walkthrough

Adds Codex CLI config-drift checks (service_tier parsing and blocker for Codex ≥0.128.0), integrates the check into preflight inspect_tools/readiness/reporting (including environment snapshot propagation), and supplies tests, a Mac runbook section, and a script to create an isolated CODEX_HOME for fair-test runs.

Changes

Codex Config Drift Validation

Layer / File(s) Summary
Codex config drift inspection utilities
qa/support_vm_preflight.py
Adds MIN_CODEX_CONFIG_DRIFT_VERSION and ALLOWED_CODEX_SERVICE_TIERS, plus codex_config_path, parse_codex_service_tier, and inspect_codex_config to find the effective config, parse top-level service_tier, and evaluate config-drift blocking for Codex ≥0.128.0.
inspect_tools wiring
qa/support_vm_preflight.py
Extends inspect_tools signature to accept an env snapshot and wires inspect_codex_config(...) into tool inspection results, producing codex["config"] and a blocker condition for required Codex tooling.
Readiness summary and report
qa/support_vm_preflight.py
Computes codex_config_ready when provider/player agent is Codex, exposes it in the readiness payload, passes an effective_env into inspect_tools, derives environment from that effective_env, and shows codex_config_ready in the Markdown report.
Tests, runbook, and CODEX_HOME script
qa/test_support_vm_preflight.py, WorldOS-RUNBOOK.md, scripts/codex_qa_home.sh
Adds tests for service_tier parsing and Codex ≥0.128.0 gating (including commented defaults and first-table stop), asserts readiness["codex_config_ready"] == True in summary tests, documents the Mac Codex GPT-DM fair-test lane, and adds codex_qa_home.sh to create an isolated Codex home with a minimal config.toml and optional auth.json symlink.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • electricsheephq/WorldOS#516: Related changes to provider/player Codex persona and readiness plumbing that this PR extends with config-drift checks.
  • electricsheephq/WorldOS#522: Related readiness/report structure changes; this PR adds codex_config_ready and effective environment snapshot to that reporting.
  • electricsheephq/WorldOS#508: Prior support-VM preflight gating work that this PR builds upon with Codex config parsing and gating.

Poem

🐰 I sniffed the config, hopped through the trees,
Found service_tier hiding in toml leaves,
Built a cozy CODEX_HOME to softly nest,
Ran fair-tests on Mac — I did my best! 🥕✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 23.53% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective of the PR: documenting the Codex GPT-DM fair-test lane, which is the primary focus across the added documentation, scripts, and tests.
Description check ✅ Passed The PR description includes all required sections from the template: Summary (with detailed change description), Licensing/CLA checklist (all items marked complete), and Validation (comprehensive test coverage documented). The description is complete and well-structured.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@qa/support_vm_preflight.py`:
- Around line 176-177: The current fallback uses "env or os.environ" which
treats empty dicts as falsy and wrongly falls back to the host environment;
replace that pattern with an explicit None check so an explicit empty mapping
(e.g., {}) is preserved. Change occurrences that set env (the assignment using
env or os.environ) to use "if env is None: env = os.environ" (or equivalent
None-coalescing logic) and keep the subsequent CODEX_HOME lookup as-is (home =
(env.get("CODEX_HOME") or "").strip()). Update all three spots where env is
currently set via the "env or ..." pattern so tests and environment snapshots
respect an explicit empty env.
- Around line 183-192: The function parse_codex_service_tier currently matches
service_tier anywhere; restrict it to truly top-level by stopping parsing once a
TOML section header is seen. Update parse_codex_service_tier to iterate lines as
before but break out (or ignore subsequent matches) when encountering a line
matching a section header pattern like r'^\s*\[.*\]'; only attempt the
service_tier regex (the existing r"""service_tier\s*=\s*(['"]?)([^'"\s#]+)\1""")
on lines before that point (use the existing stripped variable and return
match.group(2).strip() as before).

In `@qa/test_support_vm_preflight.py`:
- Around line 193-210: The test method
test_codex_cli_0128_allows_fast_or_unset_service_tier currently only writes
service_tier = "flex" and asserts that preflight.build_report returns "flex";
either add a second case that covers the "unset" (remove service_tier from
codex_home/config.toml) or "fast" value and assert the expected report fields
(use FakeRunner with codex_version="codex-cli 0.128.0" and call
preflight.build_report the same way), or rename the test to something like
test_codex_cli_0128_allows_flex_service_tier to match the current assertion;
update assertions on report["tools"]["codex_auth"]["config"]["service_tier"] (or
absence thereof) accordingly.

In `@WorldOS-RUNBOOK.md`:
- Around line 284-289: The recorded result for "`#691`" shows a future-dated
evidence timestamp "2026-06-07"; update the date to the actual evidence date
used for that run (match the real timestamp associated with commit/hash
`93df5d2` and the `#691` run), ensuring the date format matches the rest of
WorldOS-RUNBOOK.md entries and update any related mention of `#691` or `93df5d2`
in the document to keep chronology consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d2ed4ef4-995f-4fad-b48d-9c4ba943cd01

📥 Commits

Reviewing files that changed from the base of the PR and between 93df5d2 and 3ece300.

📒 Files selected for processing (4)
  • WorldOS-RUNBOOK.md
  • qa/support_vm_preflight.py
  • qa/test_support_vm_preflight.py
  • scripts/codex_qa_home.sh

Comment thread qa/support_vm_preflight.py Outdated
Comment thread qa/support_vm_preflight.py
Comment thread qa/test_support_vm_preflight.py Outdated
Comment thread WorldOS-RUNBOOK.md Outdated
@100yenadmin
100yenadmin merged commit 998193d into main Jun 6, 2026
15 checks passed
@100yenadmin
100yenadmin deleted the codex/worldos-codex-fair-preflight branch June 6, 2026 21:56
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