Files
codex/codex-rs/app-server/tests/suite/v2
jif 6bf1e3e687 Persist command completions when approval is declined or fails (#64341)
## Why

The app server completed command items for rejected approval responses
directly in the live stream. That bypassed core's history recording, so
clients could see a completed command live and lose it when reloading
the turn.

## What changed

Keep top-level command items with their pending approvals in core.
Record and emit the command completion before unblocking the turn.
Declines and cancellations produce a `declined` item, while invalid
responses and approval request failures produce a `failed` item.

## Testing

App-server integration tests cover cancellation, decline, and malformed
responses. They check that `item/completed` precedes `turn/completed`
and that paginated history returns the same command item after restart.

GitOrigin-RevId: d3d95272c8a6af2fa65fa980f312260313cc5e32
2026-11-27 15:31:18 +00:00
..