Skip to content

fix(server): enforce live sessions and bounded agent requests - #255

Merged
HHStudioAI merged 2 commits into
mainfrom
codex/session-agent-hardening-20261102
Nov 2, 2026
Merged

HHStudioAI merged 2 commits into
mainfrom
codex/session-agent-hardening-20261102

Conversation

@HHStudioAI

@HHStudioAI HHStudioAI commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

An identity-provider outage no longer destroys a valid knowledge-library session. Live validation updates current identity without allowing stale requests to overwrite rotated refresh credentials; short access-token lifetimes renew early, and a refresh followed by a temporary UserInfo failure retains the new credential in a pending, fail-closed state.

Agent turns now have bounded request size, per-session and authenticated-user concurrency, deadlines, model-call and token budgets, and cancellation when the client disconnects. Compaction calls count toward the budget and implicit SDK retries are disabled. Shared packages move together to 0.1.8; app version is 0.12.9.

Validation: full verify passed (1,440 unit tests, 67 browser cases, 2 existing manual-only skips, independent packed-package consumers), bundle and gate checks passed. Three local CLI review rounds ended with no actionable finding; rubric review and fresh-context review completed. The PR review finding about legacy storage owners splitting per-user quotas is fixed in the final commit: admission is keyed by the authenticated caller, with a regression covering legacy and current session ownership.

Two tested review revisions after initial publication; no CI failure reruns, no gate weakening. Latest commit CI and security scans passed before explicit squash merge. Customer application still requires registry-package installation and its own real Core/account acceptance before deployment.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 53157f89-05ed-40ee-bc40-0af76ebc4e68
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 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-02T16:52:39.213137Z 6aec0ad 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.

@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: 6aec0adf9a

ℹ️ 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 packages/web-server/src/agent/http.ts Outdated
if (res.destroyed || res.writableEnded) return;
if (
activeControllers.has(sessionId) ||
(activeUsers.get(owner) ?? 0) >= 2 ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Key the per-user turn limit by the authenticated caller

When legacySessionsOwner is configured, that authenticated user can access both legacy sessions stored under demo and new sessions stored under oidc:<sub>. Because ownerOf() returns the storage owner, these sessions use separate admission counters, allowing the same user to run four simultaneous model turns despite the documented two-turn limit. Key the admission counter and its cleanup by the authenticated subject (falling back to the default user in unauthenticated mode), while retaining the storage owner for the ADK invocation.

Useful? React with 👍 / 👎.

@HHStudioAI
HHStudioAI merged commit 35f831f into main Nov 2, 2026
10 checks passed
@HHStudioAI
HHStudioAI deleted the codex/session-agent-hardening-20261102 branch November 2, 2026 17:28
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.

1 participant