Fetch account security reminders through app-server (#60082)

## Why

Security reminder requests need to use app-server's active authentication and HTTP runtime, with results bound to the login that fetched them.

## What changed

- Add `account/securitySetup/read`, returning an optional notice with account and user IDs, plus generated protocol schemas and bindings.
- Fetch reminders in app-server only for a matching saved ChatGPT login. Return `notice: null` for ineligible, unavailable, or timed-out reads, and discard results when the login changes during the request.
- Route TUI reminder reads through the new method while retaining notice validation and identity checks. Unsupported servers produce no reminder.

## Testing

Add coverage for shared runtime use across restarts, ineligible authentication modes, and login changes during a fetch. Update TUI coverage for unavailable, unsupported, and mismatched notices.

GitOrigin-RevId: 426fee7ce98df17970957c06876881bc5b005196
This commit is contained in:
cooper-oai
2026-11-07 08:11:37 +00:00
committed by copyberry
parent c4f0e09912
commit 4be90eb069
22 changed files with 707 additions and 78 deletions
@@ -52,6 +52,25 @@ class AccountRoutingOverride(Enum):
us_cr = "us_cr"
class AccountSecuritySetupAction(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
label: str
url: str
class AccountSecuritySetupNotice(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
account_id: Annotated[str, Field(alias="accountId")]
action: AccountSecuritySetupAction
description: str
title: str
user_id: Annotated[str, Field(alias="userId")]
class AccountSessionWorkspaceKind(Enum):
personal = "personal"
workspace = "workspace"
@@ -1919,6 +1938,13 @@ class GetAccountRateLimitsParams(BaseModel):
] = None
class GetAccountSecuritySetupResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
notice: AccountSecuritySetupNotice | None = None
class GetAccountTokenUsageParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -8148,6 +8174,18 @@ class AccountLogoutRequest(BaseModel):
params: Annotated[None, Field(None)] = None
class AccountSecuritySetupReadRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
id: RequestId
method: Annotated[
Literal["account/securitySetup/read"],
Field(title="Account/securitySetup/readRequestMethod"),
]
params: Annotated[None, Field(None)] = None
class AccountRateLimitsReadRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -13699,6 +13737,7 @@ class ClientRequest(
| AccountLoginStartRequest
| AccountLoginCancelRequest
| AccountLogoutRequest
| AccountSecuritySetupReadRequest
| AccountRateLimitsReadRequest
| AccountRateLimitResetCreditConsumeRequest
| AccountUsageReadRequest
@@ -13810,6 +13849,7 @@ class ClientRequest(
| AccountLoginStartRequest
| AccountLoginCancelRequest
| AccountLogoutRequest
| AccountSecuritySetupReadRequest
| AccountRateLimitsReadRequest
| AccountRateLimitResetCreditConsumeRequest
| AccountUsageReadRequest