Skip to content

fix: bound authentication and cancellation records in the Realtime demo - #2182

Merged
markstuart-oai merged 1 commit into
feat/codex-harnessfrom
codex-security/realtime-demo-state-limits
Nov 5, 2026
Merged

markstuart-oai merged 1 commit into
feat/codex-harnessfrom
codex-security/realtime-demo-state-limits

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Summary

The server-controlled Realtime demo could store authentication and cancellation records without a limit. It now caps demo principals and clears expired entries. It also caps the number of distinct live and cancelled session IDs.

The server returns HTTP 503 when it cannot admit a new ID. Existing principals can renew, and active sessions can still close at capacity. Cancelled IDs stay recorded until restart so late setup cannot reuse them. If those records fill the session budget, the demo needs a restart to accept new sessions.

Please review the admission limits and the order of setup and cancellation.

Test plan

  • Passed 42 focused tests. They cover expired principals, cancellation before setup, and closing an active session at capacity.
  • Passed all 102 tests in the Realtime example.
  • Passed the full repository verification with both example patches applied.

Checks

  • Added regression tests and updated the example README.
  • Ran .agents/skills/code-change-verification/scripts/run.sh.

@markstuart-oai
markstuart-oai requested a review from a team as a code owner November 5, 2026 18:44
@changeset-bot

changeset-bot Bot commented Nov 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9b86a6e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T18:45:12.015043Z 9b86a6e PR opened
🔒 Security Review ✅ Completed 2026-11-05T18:46:31.003615Z 9b86a6e 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.

@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 at 9b86a6e. Reviewed all eight changed files and surrounding session/authentication lifecycle. Principal admission is capped before allocation, existing principals renew at capacity, and expiry sweeps are bounded. Session capacity counts live IDs and cancellation tombstones once, preserving ownership checks, delayed-setup rejection and cleanup/retry for admitted sessions even with pending hangup. Tests cover these boundaries.

Coordinator and independent static review found no actionable issues; existing feedback checked. Hosted CI remains pending. No candidate code, tests, builds or CI reruns executed.

@markstuart-oai
markstuart-oai merged commit 90f1d0c into feat/codex-harness Nov 5, 2026
8 checks passed
@markstuart-oai
markstuart-oai deleted the codex-security/realtime-demo-state-limits branch November 5, 2026 19:45
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.

3 participants