Skip to content

Preserve aggregate turn diffs across steering - #61820

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/fbd1ebef072d8486a324190c9125fc1446510802
Nov 16, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/fbd1ebef072d8486a324190c9125fc1446510802

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Preserve aggregate turn diffs across steering

Why

A steer can restart sampling within the same turn. Recreating the diff tracker loses earlier edits, and changing the working directory can change the meaning of relative diff paths.

What changed

Keep the diff tracker for the lifetime of the turn and retain each environment's first display root. Refresh cached diff headers when new environments are added. Emit the final aggregate TurnDiff before TurnComplete instead of at sampling completion.

Testing

Extend regression coverage for steering during the final flush, with and without additional patches and with a changed working directory. Check final diff ordering across continued sampling and header updates when adding an environment.

## Why

A steer can restart sampling within the same turn. Recreating the diff tracker loses earlier edits, and changing the working directory can change the meaning of relative diff paths.

## What changed

Keep the diff tracker for the lifetime of the turn and retain each environment's first display root. Refresh cached diff headers when new environments are added. Emit the final aggregate `TurnDiff` before `TurnComplete` instead of at sampling completion.

## Testing

Extend regression coverage for steering during the final flush, with and without additional patches and with a changed working directory. Check final diff ordering across continued sampling and header updates when adding an environment.

GitOrigin-RevId: fbd1ebef072d8486a324190c9125fc1446510802
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/fbd1ebef072d8486a324190c9125fc1446510802 branch from 1888df5 to e5839cb Compare November 16, 2026 14:18
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-16T14:18:51.884686Z 1888df5 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit e5839cb into main Nov 16, 2026
11 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/fbd1ebef072d8486a324190c9125fc1446510802 branch November 16, 2026 14:19
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — e5839cbc Deployed Nov 16, 2026 by Yoge5h9 via Identify potential duplicates (open issues fallback) #63808
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.