Skip to content

Scope file change approval cancellation to the requesting turn - #59910

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4c833ccd0f33c2df4e9dfb25e2729ab19b6c879f
Nov 6, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Scope file change approval cancellation to the requesting turn

Why

A delayed file change approval cancellation could interrupt a later turn, even when the original approval was no longer pending.

What changed

Send Op::CancelPatchApproval with the approval ID and requesting turn ID from the app server. Resolve cancellations only for a matching pending approval and interrupt its requesting turn only if it is still active. Route legacy Op::PatchApproval abort decisions through the same pending-approval handling.

Testing

Add a regression test that cancels an approval, then replays that cancellation while a second turn has a pending approval with the same call ID. Verify that the second approval succeeds and its turn remains active.

## Why

A delayed file change approval cancellation could interrupt a later turn, even when the original approval was no longer pending.

## What changed

Send `Op::CancelPatchApproval` with the approval ID and requesting turn ID from the app server. Resolve cancellations only for a matching pending approval and interrupt its requesting turn only if it is still active. Route legacy `Op::PatchApproval` abort decisions through the same pending-approval handling.

## Testing

Add a regression test that cancels an approval, then replays that cancellation while a second turn has a pending approval with the same call ID. Verify that the second approval succeeds and its turn remains active.

GitOrigin-RevId: 4c833ccd0f33c2df4e9dfb25e2729ab19b6c879f
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/4c833ccd0f33c2df4e9dfb25e2729ab19b6c879f branch from 5f00c1c to ad1dbba Compare November 6, 2026 13:21
@copyberry
copyberry Bot merged commit ad1dbba into main Nov 6, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/4c833ccd0f33c2df4e9dfb25e2729ab19b6c879f branch November 6, 2026 13:22
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 2026

This branch was previously deployed

1 inactive deployment
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.

3 participants