Skip to content

code-yeongyu/oh-my-openagent / .agents/skills/codex-qa

codex-qa

Verified

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

FileKindSize
SKILL.mdskill md7.6 KB
references/app-server.mdmarkdown3.0 KB
references/components-hooks.mdmarkdown2.7 KB
references/docker-qa.mdmarkdown2.6 KB
references/install-verify.mdmarkdown2.6 KB
references/isolation.mdmarkdown2.5 KB
references/logging-debug.mdmarkdown2.6 KB
scripts/app-server-drive.shexecutablescript3.1 KB
scripts/hook-unit-probe.shexecutablescript3.0 KB
scripts/install-verify.shexecutablescript2.5 KB
scripts/lib/app-server-client.mjsscript6.3 KB
scripts/lib/app-server-client.test.jsscript1.9 KB
scripts/lib/common.shexecutablescript7.1 KB
scripts/lib/mock-model.mjsscript2.1 KB
scripts/lsp-e2e.shexecutablescript150.9 KB
scripts/tui-smoke.shexecutablescript2.9 KB

scripts/tui-smoke.sh

View on GitHub
#!/usr/bin/env bash
# tui-smoke.sh - boot the real codex TUI under tmux in an ISOLATED CODEX_HOME
# (+ local mock model) and capture the rendered pane. SMOKE only: it proves the
# TUI launches, renders, and stays alive - it does NOT assert turn behavior
# (use app-server-drive.sh for that). The captured pane is the artifact.
#
#   --self-test       boot bare TUI, assert it renders + survives, capture pane
#   --plugin          install local omo first, then boot (proves the plugin
#                     loads in the real TUI without crashing it)
#   --seconds <n>     dwell time before capture (default 5)

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
. "$SCRIPT_DIR/lib/common.sh"

cqa_tui_smoke() {
  local plugin="$1" dwell="$2"
  cqa_require codex tmux node || return 1
  cqa_guard_real_home
  cqa_mk_isolated_home
  if [ "$plugin" = "1" ]; then
    cqa_log "installing local omo into $CODEX_HOME ..."
    cqa_install_local_omo || { tail -20 "$CQA_HOME_ROOT/install.log" >&2; return 1; }
  fi
  cqa_start_mock || return 1
  local bin sess cap launch exitf errf; bin="$(cqa_codex_bin)"
  sess="cqa-tui-$$"; CQA_TMUX_SESSIONS+=("$sess")
  cap="$CQA_HOME_ROOT/tui-pane.txt"
  launch="$CQA_HOME_ROOT/tui-launch.sh"
  exitf="$CQA_HOME_ROOT/tui-exit.txt"
  errf="$CQA_HOME_ROOT/tui-stderr.txt"
  cat > "$launch" <<LAUNCH
#!/usr/bin/env bash
export CODEX_HOME="$CODEX_HOME"
cd "$QA_CWD" || exit 97
"$bin" -c model=mock-model -c model_provider=mock_provider \
  -c model_providers.mock_provider.name="codex-qa mock" \
  -c model_providers.mock_provider.base_url=http://127.0.0.1:$MOCK_PORT/v1 \
  -c model_providers.mock_provider.wire_api=responses \
  -c approval_policy=never -c sandbox_mode=read-only 2>"$errf"
echo "\$?" > "$exitf"
sleep 600
LAUNCH
  chmod +x "$launch"
  tmux new-session -d -s "$sess" -x 200 -y 50 "bash '$launch'"
  sleep "$dwell"
  tmux capture-pane -t "$sess" -p -S - > "$cap" 2>/dev/null
  tmux send-keys -t "$sess" C-c 2>/dev/null; sleep 0.3
  tmux kill-session -t "$sess" 2>/dev/null
  cqa_assert_real_home_unchanged || return 1
  if [ -f "$exitf" ]; then
    cqa_log "codex exited during boot (code $(cat "$exitf")); stderr:"; sed -n '1,20p' "$errf" >&2
    return "$(cqa_fail "codex TUI did not stay up")"
  fi
  cqa_log "captured pane -> $cap"; sed -n '1,40p' "$cap" >&2
  if [ ! -s "$cap" ]; then cqa_fail "TUI pane was empty (did not render)"; return 1; fi
  if grep -qiE 'panic|panicked|fatal' "$cap"; then cqa_fail "TUI crashed (panic/fatal in pane)"; return 1; fi
  cqa_pass "codex TUI booted, rendered, and survived ${dwell}s (no early exit)"; return 0
}

MODE=0; DWELL=5
while [ $# -gt 0 ]; do
  case "$1" in
    --self-test) MODE=0; shift ;;
    --plugin) MODE=1; shift ;;
    --seconds) DWELL="$2"; shift 2 ;;
    -h|--help) sed -n '2,12p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'; exit 0 ;;
    *) cqa_log "unknown option: $1"; shift ;;
  esac
done
cqa_tui_smoke "$MODE" "$DWELL"
exit $?
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
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: 197kUpdated Claude CodeCodexVerifiedInstall