code-yeongyu/oh-my-openagent / .agents/skills/codex-qa
codex-qa
VerifiedQA the omo Codex Light edition (lazycodex / packages/omo-codex) itself, in strict isolation so ONLY our plugin is exercised, never the user's real ~/.codex. The first-party method drives the real `codex app-server` against an isolated CODEX_HOME plus a LOCAL mock model (no real API call), and proves a plugin hook fired by asserting hook/started + hook/completed notifications. Also: isolated install verification, per-component hook probes, a tmux TUI smoke, and runtime log observation (RUST_LOG / logs SQLite / /debug-config). Ships tested helper scripts each with a --self-test. Use whenever someone changes anything under packages/omo-codex or wants to QA, smoke-test, verify, or debug the Codex plugin, its hooks/components, the installer/config.toml, the app-server flow, or the Codex TUI. Triggers: codex qa, qa codex, codex-qa, test codex plugin, verify codex hook, codex app-server, lazycodex qa, isolated CODEX_HOME, prove codex hook fired, codex tui test.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.6 KB |
| references/app-server.md | markdown | 3.0 KB |
| references/components-hooks.md | markdown | 2.7 KB |
| references/docker-qa.md | markdown | 2.6 KB |
| references/install-verify.md | markdown | 2.6 KB |
| references/isolation.md | markdown | 2.5 KB |
| references/logging-debug.md | markdown | 2.6 KB |
| scripts/app-server-drive.shexecutable | script | 3.1 KB |
| scripts/hook-unit-probe.shexecutable | script | 3.0 KB |
| scripts/install-verify.shexecutable | script | 2.5 KB |
| scripts/lib/app-server-client.mjs | script | 6.3 KB |
| scripts/lib/app-server-client.test.js | script | 1.9 KB |
| scripts/lib/common.shexecutable | script | 7.1 KB |
| scripts/lib/mock-model.mjs | script | 2.1 KB |
| scripts/lsp-e2e.shexecutable | script | 150.9 KB |
| scripts/tui-smoke.shexecutable | script | 2.9 KB |
references/isolation.md
View on GitHub# Isolation — QA ONLY our plugin, never the user's real Codex
The whole point of this skill: exercise the omo plugin in a real Codex without
reading or writing the user's `~/.codex`, and without a real model API call. Two
levers do all the work.
## Lever 1 — an isolated `CODEX_HOME`
`CODEX_HOME` is Codex's master state root: `config.toml`, `auth.json`, sessions,
the state SQLite, plugins, and logs all hang off it (`utils/home-dir/src/lib.rs`).
Point it at a fresh temp dir and Codex reads/writes nothing else.
Gotcha: when `CODEX_HOME` is set it **must already exist** or Codex hard-errors.
`cqa_mk_isolated_home` creates it first.
`cqa_mk_isolated_home` also exports:
- `OMO_CODEX_PROJECT` + `QA_CWD` → a sandbox project dir, so the installer's
project-local cleanup and the TUI's cwd never touch your real tree.
- `CODEX_LOCAL_BIN_DIR=$CODEX_HOME/bin` → component bins land in the sandbox.
(Even without this, a non-default `CODEX_HOME` already routes bins to
`$CODEX_HOME/bin`; with the DEFAULT home they would leak to `~/.local/bin`.)
- `OMO_DISABLE_POSTHOG=1` + `OMO_CODEX_DISABLE_POSTHOG=1` → no install/telemetry
network call.
Proof it stayed clean: `cqa_guard_real_home` shasums `~/.codex/config.toml`
before, `cqa_assert_real_home_unchanged` re-checks after. Every script runs it.
## Lever 2 — a local mock model (no real API)
Codex must reach a model to run a turn. Instead of OpenAI, we run
`scripts/lib/mock-model.mjs` (OpenAI **Responses** SSE) on localhost and point a
custom provider at it via `-c` overrides:
```
-c model="mock-model"
-c model_provider="mock_provider"
-c model_providers.mock_provider.name="codex-qa mock" # REQUIRED: empty name fails config load
-c model_providers.mock_provider.base_url="http://127.0.0.1:<PORT>/v1"
-c model_providers.mock_provider.wire_api="responses"
-c approval_policy="never"
-c sandbox_mode="read-only"
```
A non-OpenAI provider needs no key/auth, so there is no real egress. `-c`
overrides beat any value in `config.toml`, so even a misconfigured isolated home
still lands on the mock.
## The `codex` shell-function trap
The interactive shell here wraps `codex` in a function that injects
`--profile quotio`. That breaks non-runtime subcommands like
`generate-json-schema` and would point a turn at the quotio provider. **Bash
scripts do not inherit that function**, so `codex` inside a `#!/usr/bin/env bash`
script is the real binary on PATH. `cqa_codex_bin` resolves it explicitly; never
rely on the interactive alias. Combined with the isolated `CODEX_HOME`, the real
quotio config is never read.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |