Skip to content

Use anyhow::Result in tests for error propagation#4105

Merged
pakrym-oai merged 2 commits intomainfrom
codex/update-tests-to-use-anyhow-result
Sep 23, 2025
Merged

Use anyhow::Result in tests for error propagation#4105
pakrym-oai merged 2 commits intomainfrom
codex/update-tests-to-use-anyhow-result

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

Summary

  • update protocol, mcp-server, core, login, and execpolicy tests to return anyhow::Result and replace unwrap() on fallible calls with ?
  • add the missing anyhow dev-dependencies and refresh Cargo.lock
  • adjust login integration tests and execpolicy helpers to propagate errors cleanly when skipping in sandboxes

Testing

  • just fix -p codex-protocol
  • just fix -p codex-mcp-server
  • just fix -p codex-core
  • just fix -p codex-login
  • just fix -p codex-execpolicy

https://chatgpt.com/codex/tasks/task_i_68d2c4b134fc832082f8218d7a986dd3

@pakrym-oai pakrym-oai added the codex Label used by connector to tag PRs that have been reviewed by Codex label Sep 23, 2025 — with ChatGPT Codex Connector
…n tests

- Split anyhow imports for clarity
- Inline map_err in match arms for brevity
- Remove unnecessary match formatting in MatchedArg tests
@pakrym-oai pakrym-oai merged commit 0f9a796 into main Sep 23, 2025
19 checks passed
@pakrym-oai pakrym-oai deleted the codex/update-tests-to-use-anyhow-result branch September 23, 2025 20:31
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 23, 2025
@dylan-hurd-oai
Copy link
Copy Markdown
Collaborator

@pakrym-oai should we also update AGENTS.md?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

codex Label used by connector to tag PRs that have been reviewed by Codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants