Skip to content

remove get_responses_requests and get_responses_request_bodies to use in-place matcher#8858

Merged
aibrahim-oai merged 13 commits intomainfrom
matcher/use
Jan 8, 2026
Merged

remove get_responses_requests and get_responses_request_bodies to use in-place matcher#8858
aibrahim-oai merged 13 commits intomainfrom
matcher/use

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

No description provided.

@aibrahim-oai
Copy link
Copy Markdown
Collaborator Author

@codex fix it

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Summary

Testing

  • just fmt
  • just fix -p codex-core
  • cargo test -p codex-core (failed: default_client::tests::test_create_client_sets_default_headers; models_manager::manager::tests::refresh_available_models_*; exec::tests::kill_child_process_group_kills_grandchildren_on_timeout; shell_snapshot::tests::linux_sh_snapshot_includes_sections; shell_snapshot::tests::try_new_creates_and_deletes_snapshot_file; unified_exec::tests::multi_unified_exec_sessions; unified_exec::tests::reusing_completed_process_returns_unknown_process; interrupted after long-running unified_exec::tests::unified_exec_persists_across_requests/unified_exec_timeouts)
  • ⚠️ cargo test --all-features (not run; blocked by failing codex-core tests)

View task →

@aibrahim-oai
Copy link
Copy Markdown
Collaborator Author

@codex review this

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 995ccfffa4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/tests/suite/compact.rs Outdated
Comment on lines +1107 to +1110
let requests: Vec<_> = request_log
.iter()
.flat_map(ResponseMock::requests)
.collect();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid flattening per-mock ResponseMock logs

In this test you flatten ResponseMock::requests() from four mount_sse_once_match mocks, but base_mock inserts the ResponseMock matcher before the custom matcher and wiremock evaluates matchers in order (MockBuilder::and appends; MountedMock::matches uses all). That means each mock records every POST to /responses even when its custom matcher fails, so with multiple mocks you’ll see duplicates (and ordering grouped by mock), making the request_bodies.len()/index assertions wrong or flaky. Consider logging via a single mock (e.g., mount_sse_sequence), or ensure the logging matcher runs last so only actual matches are captured.

Useful? React with 👍 / 👎.

@aibrahim-oai
Copy link
Copy Markdown
Collaborator Author

@codex fix this

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Summary

Testing

  • just fmt
  • just fix -p codex-core
  • cargo test -p codex-core (failed: default_client::tests::test_create_client_sets_default_headers; exec::tests::kill_child_process_group_kills_grandchildren_on_timeout; models_manager::manager::tests::{refresh_available_models_drops_removed_remote_models,refresh_available_models_refetches_when_cache_stale,refresh_available_models_sorts_and_marks_default,refresh_available_models_uses_cache_when_fresh}; shell_snapshot::tests::{linux_sh_snapshot_includes_sections,timed_out_snapshot_shell_is_terminated}; unified_exec::tests::{multi_unified_exec_sessions,reusing_completed_process_returns_unknown_process})

View task →

@aibrahim-oai aibrahim-oai merged commit 0d3e673 into main Jan 8, 2026
45 of 47 checks passed
@aibrahim-oai aibrahim-oai deleted the matcher/use branch January 8, 2026 21:57
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants