Skip to content

Add a final-only approved output UI example - #6213

Open
markstuart-oai wants to merge 10 commits into
markstuart/sdk-controls-06-preflight-tool-ownershipfrom
markstuart/sdk-controls-07-approved-output
Open

markstuart-oai wants to merge 10 commits into
markstuart/sdk-controls-06-preflight-tool-ownershipfrom
markstuart/sdk-controls-07-approved-output

Conversation

@markstuart-oai

@markstuart-oai markstuart-oai commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

A streaming chat UI can put a secret on screen before the complete answer is checked. Rejecting the final response is already too late to prevent that disclosure.

Summary

This example uses existing APIs to build a final-only UI. It waits for run cleanup, checks the complete answer against a disclosure policy and displays only approved text. Raw deltas and exception messages stay out of its view. Other observers need separate policies.

Run the complete example offline.

uv run python examples/basic/approved_output_ui.py

Look for Public result, two outer requests and one SDK tool execution.

Parent #6212. #6128 has already merged. Retain its merged tracing version when updating this branch, which includes an older snapshot.

Test plan

UI tests passed for split secrets, rejected answers, approval of a 65,538-byte answer after cleanup, cancellation, subscription failure and provider ownership.

Issue number

None.

Checks

  • I've added new tests, if relevant
  • I've run .agents/skills/code-change-verification/scripts/run.sh
  • I've confirmed all verification steps pass
  • If using Codex, I've run /review before submitting this PR

@markstuart-oai
markstuart-oai requested review from a team, rm-openai and seratch as code owners November 24, 2026 07:28
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T08:21:24.456251Z 6c02745 New commits
🔒 Security Review ✅ Completed 2026-11-24T08:21:35.499645Z 6c02745 New commits
ℹ️ 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.

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

Copy link
Copy Markdown

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: b985c39dde

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/basic/approved_output_ui.py Resolved
Comment thread examples/basic/approved_output_ui.py Resolved

@jbeckwith-oai jbeckwith-oai 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.

Request changes after reviewing the tracing scope, final-only display lifecycle, business tracing example, and tests. Independently confirmed both existing findings:

Linking existing findings rather than duplicating inline comments. Hosted CI at review: 17 passed, 2 skipped, 2 still running. Static review only; no candidate code or tests executed.

Hosted CI update (2026-11-24 07:37 UTC): 19 passed, 4 skipped; no checks remain pending in the current rollup. The request-changes decision still applies to the code findings. No local tests were run.

@jbeckwith-oai jbeckwith-oai 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.

Approved after static re-review and an independent review. Final-only display now omits preview buffering, so long valid output reaches final disclosure approval after cleanup. Passing through an omitted config restores Runner ownership of the default provider while preserving caller-owned providers and the metadata-only tracing scope. Reviewed eager subscription failure, cancellation-safe draining, repeated cancellation, fixed UI statuses, and regression coverage for provider ownership and output beyond the preview limit. Prior findings are addressed; inherited preflight changes were separately reviewed.

Hosted CI at review: {"SUCCESS":17,"IN_PROGRESS":2}. Pending checks remain under follow-up. No candidate code or local tests executed.

Hosted CI follow-up (2026-11-24 08:32 UTC): all checks at this reviewed commit are complete: 19 passed and 2 skipped, with no failures. The pending CI follow-up is resolved. No candidate code or local tests executed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants