test: add Codex native hook drill coverage

This commit is contained in:
Drew Ritter
2026-05-12 19:01:32 -07:00
parent 51514f86c8
commit f5c43d6055
3 changed files with 23 additions and 3 deletions

View File

@@ -7,10 +7,11 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
# Codex plugin hooks set Claude-compatible root env vars, so detect Codex
# through its plugin data env before building platform-specific context.
# Codex plugin hooks set both unprefixed PLUGIN_* vars and Claude-compatible
# CLAUDE_* vars. Only the unprefixed data var is Codex-specific enough to
# distinguish Codex from Claude Code.
is_codex_hook=0
if [ -n "${PLUGIN_DATA:-}" ] || [ -n "${CLAUDE_PLUGIN_DATA:-}" ]; then
if [ -n "${PLUGIN_DATA:-}" ]; then
is_codex_hook=1
fi