Skip to content

Deprecate TurnContext cwd and resolve_path#22519

Merged
pakrym-oai merged 4 commits into
mainfrom
pakrym/full-ci-deprecate-turn-cwd
May 13, 2026
Merged

Deprecate TurnContext cwd and resolve_path#22519
pakrym-oai merged 4 commits into
mainfrom
pakrym/full-ci-deprecate-turn-cwd

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

@pakrym-oai pakrym-oai commented May 13, 2026

Why

TurnContext::cwd and TurnContext::resolve_path are being phased out in favor of using the selected turn environment cwd directly. Deprecating both APIs makes any new direct dependency visible while preserving the existing migration path for current callers.

What Changed

  • Marked TurnContext::cwd and TurnContext::resolve_path as deprecated with guidance to use the selected turn environment cwd instead.
  • Added exact #[allow(deprecated)] suppressions at each existing direct usage site, including tests, rather than adding crate-wide suppression.
  • Kept the change behavior-preserving: current cwd reads, writes, and path resolution continue to use the same values.

Verification

  • just fmt
  • cargo check -p codex-core
  • cargo check -p codex-core --tests
  • git diff --check

…ate-turn-cwd

# Conflicts:
#	codex-rs/core/src/session/tests.rs
#	codex-rs/core/src/session/tests/guardian_tests.rs
#	codex-rs/core/src/tools/handlers/shell/container_exec.rs
#	codex-rs/core/src/tools/handlers/shell/shell_handler.rs
@pakrym-oai pakrym-oai marked this pull request as ready for review May 13, 2026 17:19
@pakrym-oai pakrym-oai requested a review from a team as a code owner May 13, 2026 17:19
@pakrym-oai pakrym-oai changed the title Deprecate TurnContext cwd Deprecate TurnContext cwd and resolve_path May 13, 2026
@pakrym-oai pakrym-oai merged commit 4454e14 into main May 13, 2026
43 of 51 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/full-ci-deprecate-turn-cwd branch May 13, 2026 18:15
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 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