Skip to content

Propagate safety buffering events to app-server clients#29371

Merged
fc-oai merged 4 commits into
mainfrom
fc/safety-buffering-events
Jun 22, 2026
Merged

Propagate safety buffering events to app-server clients#29371
fc-oai merged 4 commits into
mainfrom
fc/safety-buffering-events

Conversation

@fc-oai

@fc-oai fc-oai commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Responses API safety buffering metadata currently stops at the transport boundary, so app-server clients cannot render the in-progress safety review state.

This change:

  • decodes and deduplicates safety_buffering metadata from Responses API SSE and WebSocket events without suppressing the original response event
  • emits a typed core event containing the requested model plus backend use cases and reasons
  • forwards that event as turn/safetyBuffering/updated through app-server v2 and updates generated protocol schemas
  • keeps the side-channel event out of persisted rollouts and turn timing

This supports the Codex Apps buffering UX and depends on the Responses API backend work in https://github.com/openai/openai/pull/1044569 and https://github.com/openai/openai/pull/1044571.

Validation:

  • focused codex-core safety-buffering integration test passes
  • cargo check -p codex-core -p codex-app-server -p codex-app-server-protocol
  • just fix -p codex-api -p codex-protocol -p codex-core -p codex-app-server-protocol -p codex-app-server -p codex-rollout -p codex-rollout-trace -p codex-otel
  • just fmt
  • broad package test run: 4,430/4,492 passed; 62 unrelated local-environment/concurrency failures involved unavailable test binaries, MCP subprocess setup, and app-server timeouts

@fc-oai fc-oai marked this pull request as ready for review June 22, 2026 02:08
@fc-oai fc-oai requested a review from a team as a code owner June 22, 2026 02:08
turn_state: Option<&OnceLock<String>>,
) -> Result<(), ApiError> {
let mut last_server_model: Option<String> = None;
let mut safety_buffering_emitted = false;

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.

I think we don't need that. let's send all notifications

@fc-oai fc-oai enabled auto-merge (squash) June 22, 2026 03:13
@fc-oai fc-oai merged commit 566f7bf into main Jun 22, 2026
31 checks passed
@fc-oai fc-oai deleted the fc/safety-buffering-events branch June 22, 2026 03:39
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants