core-agent-ide/codex-rs/app-server/tests/suite/v2
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
..
account.rs fix(app-server): for external auth, replace id_token with chatgpt_acc… (#11240) 2026-02-09 20:48:58 -08:00
analytics.rs Reapply "Add app-server transport layer with websocket support" (#11370) 2026-02-11 18:13:39 +00:00
app_list.rs app-server: fix flaky list_apps_returns_connectors_with_accessible_flags test (#12286) 2026-02-20 02:27:18 +00:00
collaboration_mode_list.rs Remove test-support feature from codex-core and replace it with explicit test toggles (#11405) 2026-02-10 22:44:02 -08:00
compaction.rs Treat compaction failure as failure state (#10927) 2026-02-06 13:51:46 -08:00
config_rpc.rs Reapply "Add app-server transport layer with websocket support" (#11370) 2026-02-11 18:13:39 +00:00
connection_handling_websocket.rs Reapply "Add app-server transport layer with websocket support" (#11370) 2026-02-11 18:13:39 +00:00
dynamic_tools.rs feat(app-server, core): allow text + image content items for dynamic tool outputs (#10567) 2026-02-04 16:12:47 -08:00
experimental_api.rs feat: opt-out of events in the app-server (#11319) 2026-02-10 18:04:52 +00:00
experimental_feature_list.rs Add stage field for experimental flags. (#10793) 2026-02-05 23:31:04 +00:00
initialize.rs feat: opt-out of events in the app-server (#11319) 2026-02-10 18:04:52 +00:00
mod.rs app-server: expose loaded thread status via read/list and notifications (#11786) 2026-02-18 15:20:03 -08:00
model_list.rs fix: send unfiltered models over model/list (#11793) 2026-02-13 16:26:32 -08:00
output_schema.rs Add text element metadata to types (#9235) 2026-01-14 16:41:50 -08:00
plan_item.rs chore: rm remote models fflag (#11699) 2026-02-17 11:43:16 -08:00
rate_limits.rs feat: support multiple rate limits (#11260) 2026-02-10 20:09:31 -08:00
request_user_input.rs change collaboration mode to struct (#9793) 2026-01-23 17:00:23 -08:00
review.rs chore: rm remote models fflag (#11699) 2026-02-17 11:43:16 -08:00
safety_check_downgrade.rs Chore: remove response model check and rely on header model for downgrade (#12061) 2026-02-18 01:50:06 +00:00
skills_list.rs feat: extend skills/list to support additional roots. (#10835) 2026-02-09 13:30:38 -08:00
thread_archive.rs app-server: Emit thread archive/unarchive notifications (#12030) 2026-02-17 14:53:58 -08:00
thread_fork.rs app-server: expose loaded thread status via read/list and notifications (#11786) 2026-02-18 15:20:03 -08:00
thread_list.rs app-server: expose loaded thread status via read/list and notifications (#11786) 2026-02-18 15:20:03 -08:00
thread_loaded_list.rs [chore] move app server tests from chat completion to responses (#8939) 2026-01-08 22:27:55 +00:00
thread_read.rs app-server: expose loaded thread status via read/list and notifications (#11786) 2026-02-18 15:20:03 -08:00
thread_resume.rs tests: centralize in-flight turn cleanup helper (#12271) 2026-02-20 01:47:34 +00:00
thread_rollback.rs app-server: expose loaded thread status via read/list and notifications (#11786) 2026-02-18 15:20:03 -08:00
thread_start.rs app-server: expose loaded thread status via read/list and notifications (#11786) 2026-02-18 15:20:03 -08:00
thread_status.rs app-server: expose loaded thread status via read/list and notifications (#11786) 2026-02-18 15:20:03 -08:00
thread_unarchive.rs app-server: expose loaded thread status via read/list and notifications (#11786) 2026-02-18 15:20:03 -08:00
turn_interrupt.rs Fix test_shell_command_interruption flake (#10649) 2026-02-04 22:19:06 +00:00
turn_start.rs tests: centralize in-flight turn cleanup helper (#12271) 2026-02-20 01:47:34 +00:00
turn_start_zsh_fork.rs tests: centralize in-flight turn cleanup helper (#12271) 2026-02-20 01:47:34 +00:00
turn_steer.rs tests: centralize in-flight turn cleanup helper (#12271) 2026-02-20 01:47:34 +00:00
windows_sandbox_setup.rs app-server support for Windows sandbox setup. (#12025) 2026-02-18 13:03:16 -08:00