Skip to content

Add Codex support VM persona lane - #516

Merged
100yenadmin merged 2 commits into
mainfrom
codex/worldos-codex-vm-persona-lane
Jun 1, 2026
Merged

Add Codex support VM persona lane#516
100yenadmin merged 2 commits into
mainfrom
codex/worldos-codex-vm-persona-lane

Conversation

@100yenadmin

@100yenadmin 100yenadmin commented Jun 1, 2026

Copy link
Copy Markdown
Member

Summary

  • default the support-VM preflight persona lane to Codex DM plus Codex UI player, with Claude required only when explicitly selected
  • make qa/ui_playtest_app.sh Part B honor WOS_APP_SELECTED_PROVIDER=codex and WOS_APP_PLAYER_AGENT=codex
  • document the selected provider/player lane in Operating Goal, GUI Runbook, and QA tools
  • address CodeRabbit current-head feedback by exposing lane required_tools in markdown and hardening negated Codex auth parsing

Tests

  • bash -n qa/ui_playtest_app.sh scripts/play_codex_dm.sh scripts/play_party.sh
  • python3 -m py_compile qa/support_vm_preflight.py
  • python3 -m pytest qa/test_support_vm_preflight.py qa/test_macos_app_static.py -q
  • git diff --check

Notes

This is not release evidence and does not run the support VM. It closes a preflight/harness mismatch so #466 can intentionally run the non-Claude VM persona lane after operator-approved VM sync/auth setup.

Licensing / CLA

  • I have submitted or will submit the required CLA if applicable.
  • This PR does not add third-party code or assets requiring new license review.
  • This PR does not include private art, secrets, credentials, or evidence bundles.

Summary by CodeRabbit

  • New Features

    • Select provider and player-agent (default: Codex DM + Codex UI player); selections flow through VM preflight, playtest, and app play and appear in run artifacts and reports. Persona commands must include selected provider/player-agent to count toward gating.
  • Documentation

    • Clarified runbook and operating guidance and Codex CLI minimum version (>=0.120.0); explicit provider/player-agent flags and artifact pairing.
  • Tests

    • Expanded coverage for codex/claude lanes, defaults, gating, and version-related readiness checks.

@coderabbitai

coderabbitai Bot commented Jun 1, 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: 1ad84344-f9c9-4443-a305-a8ffdae3609d

📥 Commits

Reviewing files that changed from the base of the PR and between 485da1a and bb087a8.

📒 Files selected for processing (2)
  • qa/support_vm_preflight.py
  • qa/test_support_vm_preflight.py
🚧 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

This PR parameterizes VM readiness and playtest execution by provider and player-agent (codex vs claude), making required tools and repo artifacts conditional, adding CLI flags and env propagation, branching playtest backends/player runs, and updating docs and tests.

Changes

Provider and Player-Agent Parameterization

Layer / File(s) Summary
Documentation and design intent
WorldOS-GUI-RUNBOOK.md, WorldOS-OPERATING-GOAL.md, qa/QA_TOOLS.md
Updated runbooks, operating goals, and QA tools reference to clarify default provider/player lanes (Codex DM + Codex UI player), when Claude is required, and the expanded preflight command templates with explicit --provider and --player-agent parameters.
Preflight schema and conditional requirement constants
qa/support_vm_preflight.py
Introduced BASE_REQUIRED_TOOLS, PERSONA_PROVIDERS, and PLAYER_AGENTS constants; added required_tools_for() function to dynamically compute final VM tool set from provider and player-agent config.
Preflight capability checks
qa/support_vm_preflight.py
Added parse_semver() and supports_codex_mcp_overrides() to detect Codex CLI capability for MCP exec overrides.
Preflight dynamic tool and repo-file inspection
qa/support_vm_preflight.py
Refactored inspect_tools() to accept explicit required_tools parameter and only block on missing tools actually required; updated codex auth probing to depend on whether codex is in required tools; refactored inspect_required_repo_files() to conditionally add provider-specific scripts (codex vs claude).
Preflight CLI and full flow wiring
qa/support_vm_preflight.py
Added --provider and --player-agent CLI options (defaulting to codex/codex); propagated parsed values through PreflightConfig, build_report(), and inspection functions; extended VM persona sweep environment with WORLDOS_APP_SELECTED_PROVIDER and WORLDOS_APP_PLAYER_AGENT; surfaced provider and player-agent in rri_plan and markdown report.
Preflight script test coverage
qa/test_support_vm_preflight.py
Updated test fixture to include codex scripts; asserted CLI defaults set provider/player-agent to codex; verified rri_plan includes provider/player_agent and required-tools computation; extended VM plan assertions for WOS_APP_SELECTED_PROVIDER and WOS_APP_PLAYER_AGENT; replaced single tool-readiness test with lane-specific tests (codex lane does not require claude; blocks when codex missing; explicit claude lane requires claude and stamps rri_plan).
Playtest player-agent and provider-specific configuration
qa/ui_playtest_app.sh
Introduced WOS_APP_PLAYER_AGENT environment variable (validated to claude|codex, defaulting to claude); initialized PLAYER_AGENT and PART_B_PROVIDER from environment with provider/part-B compatibility constraints.
Playtest backend and player-agent execution branches
qa/ui_playtest_app.sh
Split Part B faithful-backend startup into provider-specific branches (claude launches play_party.sh with DM env/budget; codex launches play_codex_dm.sh with codex-specific variables); generated shared player.prompt.md; branched player execution between claude -p (with MCP and budget flags) and codex exec (with sandboxing and explicit MCP server config); updated verdict extraction logic for codex (last-message file) vs claude (JSON output).
Playtest scoring and output metadata integration
qa/ui_playtest_app.sh
Extended run.json generation to thread provider and player-agent into Part B metadata; updated surface string to reflect provider/player pairing; threaded both values through scoring and meta generator.
Playtest harness contract test updates
qa/test_macos_app_static.py
Extended existing playtest backend test to assert WOS_APP_PLAYER_AGENT and PART_B_PROVIDER setup and usage; added new test verifying codex provider/player path includes play_codex_dm.sh, CLAWDND_PROVIDER=codex, codex command usage, and MCP server/palette asset references.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • electricsheephq/WorldOS#508: Prior support-VM preflight artifact-gating work extended here with provider/player-agent parameterization.
  • electricsheephq/WorldOS#374: Related playtest harness changes introducing provider/player-agent threading and codex execution hooks.

Poem

🐰 I hopped through docs and scripts today,

Codex or Claude—choose which should play,
The preflight will ask, the harness will run,
Two lanes, one meadow beneath the sun.
Verdicts arrive, the VM hums hooray!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.33% 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 'Add Codex support VM persona lane' directly and concisely summarizes the main change—introducing Codex as a supported provider/player option for the support VM persona lane.
Description check ✅ Passed The description covers the key changes (Codex defaults, ui_playtest_app.sh updates, documentation), lists validation tests performed, and includes complete CLA/licensing checkboxes; all main template sections are addressed.
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.

@100yenadmin
100yenadmin force-pushed the codex/worldos-codex-vm-persona-lane branch from 63ccb1c to f5d8d68 Compare June 1, 2026 11:05
@100yenadmin
100yenadmin marked this pull request as ready for review June 1, 2026 11:08
@100yenadmin

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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: 1

🤖 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/ui_playtest_app.sh`:
- Around line 648-675: The current use of codex exec with multiple -c flags to
set nested mcp server keys (e.g., mcp_servers.clawdnd-uiplayer.command,
mcp_servers.clawdnd-uiplayer.args, mcp_servers.clawdnd-uiplayer.env_vars, etc.)
may be unsupported; instead either (A) move the clawdnd-uiplayer MCP server
configuration into the persistent config under [mcp_servers.clawdnd-uiplayer] in
config.toml or (B) create the server at runtime with the documented command
(codex mcp add <name> ...) before calling codex exec, then remove the -c
overrides; if you must keep runtime overrides, verify your codex version
supports these -c nested mcp_server keys and add a feature-guard or comment
noting the requirement.
🪄 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: 99281cd0-dc28-47bf-9949-6171788bf6ec

📥 Commits

Reviewing files that changed from the base of the PR and between be55b16 and f5d8d68.

📒 Files selected for processing (7)
  • WorldOS-GUI-RUNBOOK.md
  • WorldOS-OPERATING-GOAL.md
  • qa/QA_TOOLS.md
  • qa/support_vm_preflight.py
  • qa/test_macos_app_static.py
  • qa/test_support_vm_preflight.py
  • qa/ui_playtest_app.sh

Comment thread qa/ui_playtest_app.sh
@100yenadmin
100yenadmin force-pushed the codex/worldos-codex-vm-persona-lane branch from f5d8d68 to 3900a4f Compare June 1, 2026 11:18

@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.

♻️ Duplicate comments (1)
qa/ui_playtest_app.sh (1)

664-682: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard the Codex MCP override path with a feature/version check.

Line 664–682 relies on codex exec -c mcp_servers... behavior that has been brittle across Codex CLI docs/versions; if unsupported in the runtime CLI, Part B codex player fails. Add an explicit preflight check (or hard minimum version gate) before invoking this path, with a clear error/fallback instruction.

For Codex CLI v0.120.0 and newer, is `codex exec -c "mcp_servers.<name>.command/args/env_vars=..."` officially supported for defining MCP servers at invocation time? Please cite the official Codex CLI docs/reference.
Suggested minimal guard
+      if ! codex --version 2>/dev/null | grep -Eq '0\.12[0-9]\.|0\.[2-9][0-9]{2}\.|[1-9]\.'; then
+        printf '[uipt-app] codex lane requires Codex CLI with supported exec -c mcp_servers.* overrides. Please upgrade Codex CLI or use a config.toml/mcp add flow.\n' >&2
+        exit 2
+      fi
       codex exec \
         --ignore-user-config \
🤖 Prompt for 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.

In `@qa/ui_playtest_app.sh` around lines 664 - 682, Add a preflight gate before
the codex exec -c "mcp_servers..." invocation in qa/ui_playtest_app.sh that
detects whether the installed Codex CLI supports per-invocation MCP server
overrides (e.g., by running codex --version and ensuring semver >= 0.120.0 or by
invoking a harmless feature probe such as codex exec --help and looking for the
-c/mcp_servers override strings); if the check fails, emit a clear error and
either exit non‑zero or fall back to invoking codex exec without the mcp_servers
-c overrides (so the lane remains usable), and ensure the check references the
codex exec call and the mcp_servers override keys used in the script so
maintainers can locate the guarded block.
🤖 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.

Duplicate comments:
In `@qa/ui_playtest_app.sh`:
- Around line 664-682: Add a preflight gate before the codex exec -c
"mcp_servers..." invocation in qa/ui_playtest_app.sh that detects whether the
installed Codex CLI supports per-invocation MCP server overrides (e.g., by
running codex --version and ensuring semver >= 0.120.0 or by invoking a harmless
feature probe such as codex exec --help and looking for the -c/mcp_servers
override strings); if the check fails, emit a clear error and either exit
non‑zero or fall back to invoking codex exec without the mcp_servers -c
overrides (so the lane remains usable), and ensure the check references the
codex exec call and the mcp_servers override keys used in the script so
maintainers can locate the guarded block.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 401b2425-5442-4d07-9aaa-ee2a80dc74ad

📥 Commits

Reviewing files that changed from the base of the PR and between f5d8d68 and 3900a4f.

📒 Files selected for processing (7)
  • WorldOS-GUI-RUNBOOK.md
  • WorldOS-OPERATING-GOAL.md
  • qa/QA_TOOLS.md
  • qa/support_vm_preflight.py
  • qa/test_macos_app_static.py
  • qa/test_support_vm_preflight.py
  • qa/ui_playtest_app.sh
✅ Files skipped from review due to trivial changes (2)
  • qa/QA_TOOLS.md
  • WorldOS-OPERATING-GOAL.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • qa/test_macos_app_static.py
  • qa/test_support_vm_preflight.py
  • qa/support_vm_preflight.py

@100yenadmin
100yenadmin force-pushed the codex/worldos-codex-vm-persona-lane branch from 3900a4f to 485da1a Compare June 1, 2026 11:26

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
qa/support_vm_preflight.py (2)

723-733: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Include required_tools in the markdown RRI plan output.

The JSON report includes lane-specific required_tools, but the markdown summary currently omits it, which makes quick operator review less reliable.

📝 Proposed fix
             f"- Provider: `{report['rri_plan']['provider']}`",
             f"- Player agent: `{report['rri_plan']['player_agent']}`",
+            f"- Required tools: `{','.join(report['rri_plan'].get('required_tools', []))}`",
             f"- Support VM scope: `{report['rri_plan']['support_vm_scope']}`",
🤖 Prompt for 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.

In `@qa/support_vm_preflight.py` around lines 723 - 733, The RRI markdown output
omits the lane-specific required_tools from report['rri_plan']; add a new list
entry using report['rri_plan'].get('required_tools', []) (e.g. f"- Required
tools: `{','.join(report['rri_plan'].get('required_tools', []))}`") in the same
block that builds the RRI Plan (near the existing f"- Support VM scope" and f"-
Do not run on support VM" lines) so the rendered markdown includes the
required_tools; ensure you use .get to avoid KeyError when the key is absent.

474-487: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Harden Codex auth-status classification to avoid treating “not signed in” as authenticated
Lines 474-487: positive_auth includes "signed in" while negative_auth omits "not signed in", so an unauthenticated message containing the substring can be classified as codex["auth_status"] = "proven" when result.get("ok") is true. Public docs don’t clearly pin the exact codex auth status output phrases, so cover common negated wording defensively.

🔧 Proposed fix
-        negative_auth = ("not authenticated", "unauthenticated", "not logged in", "signed out", "inactive")
+        negative_auth = (
+            "not authenticated",
+            "unauthenticated",
+            "not logged in",
+            "not signed in",
+            "signed out",
+            "inactive",
+        )
         positive_auth = ("authenticated", "logged in", "signed in")
🤖 Prompt for 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.

In `@qa/support_vm_preflight.py` around lines 474 - 487, The auth classification
is vulnerable because positive_auth contains "signed in" while negative_auth is
missing common negated phrases; update the negative_auth tuple used in the block
(negative_auth, positive_auth, has_auth_marker) to include phrases like "not
signed in" and other common negations (e.g., "not signed in", "not signed") so
has_auth_marker(lower, negative_auth) will catch negated messages before
positive matches; keep the existing order of checks (negative first) and only
modify the negative_auth entries referenced in this code.
🤖 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.

Outside diff comments:
In `@qa/support_vm_preflight.py`:
- Around line 723-733: The RRI markdown output omits the lane-specific
required_tools from report['rri_plan']; add a new list entry using
report['rri_plan'].get('required_tools', []) (e.g. f"- Required tools:
`{','.join(report['rri_plan'].get('required_tools', []))}`") in the same block
that builds the RRI Plan (near the existing f"- Support VM scope" and f"- Do not
run on support VM" lines) so the rendered markdown includes the required_tools;
ensure you use .get to avoid KeyError when the key is absent.
- Around line 474-487: The auth classification is vulnerable because
positive_auth contains "signed in" while negative_auth is missing common negated
phrases; update the negative_auth tuple used in the block (negative_auth,
positive_auth, has_auth_marker) to include phrases like "not signed in" and
other common negations (e.g., "not signed in", "not signed") so
has_auth_marker(lower, negative_auth) will catch negated messages before
positive matches; keep the existing order of checks (negative first) and only
modify the negative_auth entries referenced in this code.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0908508c-26ba-45c5-919e-351e17035a76

📥 Commits

Reviewing files that changed from the base of the PR and between 3900a4f and 485da1a.

📒 Files selected for processing (7)
  • WorldOS-GUI-RUNBOOK.md
  • WorldOS-OPERATING-GOAL.md
  • qa/QA_TOOLS.md
  • qa/support_vm_preflight.py
  • qa/test_macos_app_static.py
  • qa/test_support_vm_preflight.py
  • qa/ui_playtest_app.sh
✅ Files skipped from review due to trivial changes (1)
  • qa/QA_TOOLS.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • qa/test_macos_app_static.py
  • qa/test_support_vm_preflight.py

@100yenadmin
100yenadmin merged commit 6d107d6 into main Jun 1, 2026
14 checks passed
@100yenadmin
100yenadmin deleted the codex/worldos-codex-vm-persona-lane branch June 1, 2026 11:52
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