core-agent-ide/codex-rs/app-server/tests/suite
Michael Bolin 366ecaf17a
app-server: fix flaky list_apps_returns_connectors_with_accessible_flags test (#12286)
## Why

`app/list` emits `app/list/updated` after whichever async load finishes
first (directory connectors or accessible tools). This test assumed the
directory-backed update always arrived first because it injected a tools
delay, but that assumption is not stable when the process-global Codex
Apps tools cache is already warm. In that case the accessible-tools path
can return immediately and the first notification shape flips, which
makes the assertion flaky.

Relevant code paths:

-
[`codex-rs/app-server/src/codex_message_processor.rs`](13ec97d72e/codex-rs/app-server/src/codex_message_processor.rs (L4949-L5034))
(concurrent loads + per-load `app/list/updated` notifications)
-
[`codex-rs/core/src/mcp_connection_manager.rs`](13ec97d72e/codex-rs/core/src/mcp_connection_manager.rs (L1182-L1197))
(Codex Apps tools cache hit path)

## What Changed

Updated
`suite::v2::app_list::list_apps_returns_connectors_with_accessible_flags`
in `codex-rs/app-server/tests/suite/v2/app_list.rs` to accept either
valid first `app/list/updated` payload:

- the directory-first snapshot
- the accessible-tools-first snapshot

The test still keeps the later assertions strict:

- the second `app/list/updated` notification must be the fully merged
result
- the final `app/list` response must match the same merged result

I also added an inline comment explaining why the first notification is
intentionally order-insensitive.

## Verification

- `cargo test -p codex-app-server`
2026-02-20 02:27:18 +00:00
..
v2 app-server: fix flaky list_apps_returns_connectors_with_accessible_flags test (#12286) 2026-02-20 02:27:18 +00: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
codex_message_processor_flow.rs feat(core): plumb distinct approval ids for command approvals (#12051) 2026-02-18 01:55:57 +00:00
config.rs fix: added test helpers for platform-specific paths (#7954) 2025-12-13 00:14:12 +00: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 feat: fork conversation/thread (#8866) 2026-01-08 12:54:20 -08:00
fuzzy_file_search.rs [app-server] add fuzzyFileSearch/sessionCompleted (#11773) 2026-02-13 15:08:14 -08:00
interrupt.rs Fix test_shell_command_interruption flake (#10649) 2026-02-04 22:19:06 +00:00
list_resume.rs chore: add phase to message responseitem (#10455) 2026-02-03 02:52:26 +00: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 Add text element metadata to protocol, app server, and core (#9331) 2026-01-15 17:26:41 -08:00
send_message.rs chore(core) rm Feature::RequestRule (#11866) 2026-02-16 22:30:23 +00: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