fix(codex): prevent sound hook timeouts
This commit is contained in:
@@ -21,6 +21,7 @@ GEMINI_SECTION=$(awk '/^cat > "\$BIN_DIR\/ai-gemini"/,/^GEMINIEOF/' "$SCRIPT")
|
||||
OPENCODE_SECTION=$(awk '/^cat > "\$BIN_DIR\/ai-opencode"/,/^OPENCODEEOF/' "$SCRIPT")
|
||||
CURSOR_SECTION=$(awk '/^cat > "\$BIN_DIR\/ai-cursor"/,/^CURSOREOF/' "$SCRIPT")
|
||||
HELPERS_SECTION=$(awk '/^cat > "\$HELPERS_FILE"/,/^HELPEREOF/' "$SCRIPT")
|
||||
CODEX_SOUND_HOOKS_SECTION=$(awk '/^_setup_codex_sound_hooks\(\)/,/^}/' "$SCRIPT")
|
||||
|
||||
# ── ai-gpt: auto-install codex ────────────────────────────────────────────
|
||||
test_gpt_autoinstall() {
|
||||
@@ -146,6 +147,16 @@ test_native_rule_files_generated() {
|
||||
fi
|
||||
}
|
||||
|
||||
test_codex_sound_hooks_detach_stdio() {
|
||||
local detached_count
|
||||
detached_count=$(printf '%s\n' "$CODEX_SOUND_HOOKS_SECTION" | grep -Fc ') </dev/null >/dev/null 2>&1 &' || true)
|
||||
if [ "$detached_count" -eq 2 ]; then
|
||||
ok "codex hooks: background sound players detach standard streams"
|
||||
else
|
||||
fail "codex hooks: background sound players can keep hook pipes open"
|
||||
fi
|
||||
}
|
||||
|
||||
# ── Fix 7: trap quotes $TMP correctly ────────────────────────────────────────
|
||||
test_fix7_trap_tmp() {
|
||||
if grep -q "trap 'rm -rf \"\$TMP\"' EXIT" "$SCRIPT"; then
|
||||
@@ -289,6 +300,7 @@ test_gemini_native_launcher
|
||||
test_cursor_native_launcher
|
||||
test_global_rules_include_quality_guidelines
|
||||
test_native_rule_files_generated
|
||||
test_codex_sound_hooks_detach_stdio
|
||||
test_fix7_trap_tmp
|
||||
test_android_cli_install_url
|
||||
test_android_init_called
|
||||
|
||||
Reference in New Issue
Block a user