core-agent-ide/codex-rs/app-server/tests/suite
Michael Bolin be5bca6f8d
fix: harden zsh fork tests and keep subcommand approvals deterministic (#12809)
## Why
The prior
`turn_start_shell_zsh_fork_subcommand_decline_marks_parent_declined_v2`
assertion was brittle under Bazel: command approval payloads in the test
could include environment-dependent wrapper/command formatting
differences, which makes exact command-string matching flaky even when
behavior is correct.

(This regression was knowingly introduced in
https://github.com/openai/codex/pull/12800, but it was urgent to land
that PR.)

## What changed
- Hardened
`turn_start_shell_zsh_fork_subcommand_decline_marks_parent_declined_v2`
in
[`turn_start_zsh_fork.rs`](https://github.com/openai/codex/blob/main/codex-rs/app-server/tests/suite/v2/turn_start_zsh_fork.rs):
- Replaced strict `approval_command.starts_with("/bin/rm")` checks with
intent-based subcommand matching.
- Subcommand approvals are now recognized by file-target semantics
(`first.txt` or `second.txt`) plus `rm` intent.
- Parent approval recognition is now more tolerant of command-format
differences while still requiring a definitive parent command context.
- Uses a defensive loop that waits for all target subcommand decisions
and the parent approval request.
- Preserved the existing regression and unit test fixes from earlier
commits in `unix_escalation.rs` and `skill_approval.rs`.

## Verification
- Ran the zsh fork subcommand decline regression under this change:
-
`turn_start_shell_zsh_fork_subcommand_decline_marks_parent_declined_v2`
- Confirmed the test is now robust against approval-command-string
variation instead of hardcoding one expected command shape.
2026-02-25 12:23:30 -08:00
..
v2 fix: harden zsh fork tests and keep subcommand approvals deterministic (#12809) 2026-02-25 12:23:30 -08:00
archive_thread.rs Defer persistence of rollout file (#11028) 2026-02-07 23:05:03 -08:00
auth.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
bash refactor: delete exec-server and move execve wrapper into shell-escalation (#12632) 2026-02-23 20:10:22 -08:00
codex_message_processor_flow.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
config.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
create_thread.rs Add text element metadata to protocol, app server, and core (#9331) 2026-01-15 17:26:41 -08:00
fork_thread.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
fuzzy_file_search.rs [app-server] add fuzzyFileSearch/sessionCompleted (#11773) 2026-02-13 15:08:14 -08:00
interrupt.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
list_resume.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
login.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
mod.rs feat: fork conversation/thread (#8866) 2026-01-08 12:54:20 -08:00
output_schema.rs chore: remove codex-core public protocol/shell re-exports (#12432) 2026-02-20 23:45:35 -08:00
send_message.rs feat(core) Introduce Feature::RequestPermissions (#11871) 2026-02-24 09:48:57 -08:00
set_default_model.rs feat: arcticfox in the wild (#6906) 2025-11-19 16:31:06 +00:00
user_agent.rs fix(app-server): set originator header from initialize (re-revert) (#8988) 2026-01-09 12:09:30 -08:00
user_info.rs chore: use anyhow::Result for all app-server integration tests (#5836) 2025-10-28 08:10:23 -07:00
zsh refactor: delete exec-server and move execve wrapper into shell-escalation (#12632) 2026-02-23 20:10:22 -08:00