Skip to content

Make turn diff tracker multi-env aware#26433

Merged
pakrym-oai merged 8 commits into
mainfrom
pakrym/full-ci-turn-diff-shared-multi-env
Jun 5, 2026
Merged

Make turn diff tracker multi-env aware#26433
pakrym-oai merged 8 commits into
mainfrom
pakrym/full-ci-turn-diff-shared-multi-env

Conversation

@pakrym-oai

@pakrym-oai pakrym-oai commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Why

Turn diffs were tracked as one flat set of absolute paths. In multi-environment turns, local and remote environments can report the same path while representing different filesystems, so a single path key can collapse distinct changes or attribute them to the wrong environment.

The environment name is NOT included in the generated unified diff. This can come later.

@pakrym-oai pakrym-oai force-pushed the pakrym/full-ci-turn-diff-shared-multi-env branch 3 times, most recently from 6a70fc8 to 320d4a4 Compare June 4, 2026 18:04
@pakrym-oai pakrym-oai force-pushed the pakrym/full-ci-turn-diff-shared-multi-env branch from 320d4a4 to 776fcab Compare June 4, 2026 18:20
@pakrym-oai pakrym-oai marked this pull request as ready for review June 4, 2026 18:31
@pakrym-oai pakrym-oai requested a review from a team as a code owner June 4, 2026 18:31

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

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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0d32deb6d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread codex-rs/core/src/session/turn.rs Outdated
@pakrym-oai

Copy link
Copy Markdown
Collaborator Author

@codex review this

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@jif-oai jif-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

First 2 comments are the real blockers IMO. The last one is just an opinion

Comment thread codex-rs/core/src/turn_diff_tracker.rs
Comment thread codex-rs/core/tests/suite/apply_patch_cli.rs

async fn turn_diff_display_roots(turn_context: &TurnContext) -> Vec<(String, PathBuf)> {
let mut display_roots = Vec::new();
for turn_environment in &turn_context.environments.turn_environments {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we resolve the display root lazily for the environment when its first delta is tracked? Otherwise this feels a bit racy/latency if we have slow secondary remote

@pakrym-oai pakrym-oai enabled auto-merge (squash) June 5, 2026 17:24
@pakrym-oai pakrym-oai merged commit 86a1ddd into main Jun 5, 2026
56 of 61 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/full-ci-turn-diff-shared-multi-env branch June 5, 2026 17:31
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 5, 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