[TUI] Update request-count test for response records introduced by #39372

Open Beginner friendly
#40,238 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
testing-qa

Research direction

Run the exact cargo test command from the issue and inspect the request-count assertion in codex-rs/tui/src/app/tests/session_lifecycle_requests.rs. Account for records with method server/request/response when counting outbound requests, then rerun the targeted test and confirm it passes without changing the test's existing intent.

Written by the indexing model from the issue text.

Description

app-server bug TUI

Summary

The TUI test changing_directory_preserves_project_trust_permissions_history_and_hooks fails after #39372 (8843960ba06b1b2570e689f3fff354c324ab2417).

Reproduction

Run:

cargo test -p codex-tui --lib app::tests::session_lifecycle_requests::changing_directory_preserves_project_trust_permissions_history_and_hooks -- --exact

The test reaches the assertion in codex-rs/tui/src/app/tests/session_lifecycle_requests.rs where it counts recorded requests, and observes one request where zero are expected.

Cause

#39372 changed the app-server test recorder to store JSON-RPC responses in the same collection as outbound requests, using the synthetic method server/request/response. The test still treats the collection length as the number of outbound app-server requests, so responses inflate the count.

Suggested fix

Exclude records whose method is server/request/response from this count, or keep recorded responses in a separate collection. The former is the smallest targeted change and preserves the existing test intent.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.