[TUI] Update request-count test for response records introduced by #39372
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- rust
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100