Skip to content

Complete Codex accounts, models, and configuration typed surface#221

Draft
VolkerChristian wants to merge 6 commits into
masterfrom
codex/phase-a1-2-accounts-models-configuration
Draft

Complete Codex accounts, models, and configuration typed surface#221
VolkerChristian wants to merge 6 commits into
masterfrom
codex/phase-a1-2-accounts-models-configuration

Conversation

@VolkerChristian

@VolkerChristian VolkerChristian commented Jul 24, 2026

Copy link
Copy Markdown
Member

Status

Phase A1.2 implementation and local closure are complete. This pull request remains open, draft, and unmerged. It contains one feature branch and exactly six logical task commits. Final GitHub Actions run 30112754628 for rewritten head 8665803 is in progress; no green conclusion is claimed.

Verified base and A1.1 prerequisite

  • Actual starting master/base SHA: 9f7b295.
  • That commit is origin/master and the merge commit for PR Complete Codex conversation-domain typed surface #220.
  • Required correction tip d32d1cb is an ancestor of the base.
  • The base and correction tip resolve to the exact same tree, adb042243c7d0942fc5a702fd56638f34dce931f.
  • Merged A1.1 remains exactly 151/151 Complete with the 167 Complete / 8 Partial / 164 NotImplemented / 48 NotApplicable global baseline.
  • The params-only codex.extension correction, full A1.1 fixture and closure evidence, final A1.1 artifacts, and exact A1.1 ratchet remain explicitly green.
  • master had not moved beyond the A1.1 merge when this branch was created.

Exact six-commit history

  1. 98556b8 — Audit and freeze Codex A1.2 implementation batches
  2. 3cbbafe — Complete Codex account and authentication surface
  3. fef4d7d — Complete Codex model and provider surface
  4. 7711341 — Complete Codex configuration read surface
  5. 29a065a — Complete Codex configuration mutation and feature surface
  6. 8665803 — Close and verify the Codex A1.2 slice

The final portability fixes were autosquashed into their owning B2 and B4 commits. Commit 6 contains closure, reporting, installed-consumer/package registration, and guards only; it contains no scheduled runtime type, handler, codec, descriptor, or facade implementation.

Actions runs 30098145635, 30098484782, 30101888403, and 30104851647 succeeded on the originally pushed Commit 2–5 boundary heads c87c6d6, 609ee19, 6c4d5f8, and 989dc55. Autosquash changed the final Commit 2–5 SHAs; those run IDs are retained as boundary evidence, not misidentified as runs for the rewritten SHAs. Final run 30112754628 is the authoritative Actions run for the rewritten six-commit head and is in progress at handoff.

Frozen denominator, response obligations, and status

Exactly 45 registry identities:

  • 18 client-request method identities
  • 7 server-notification method identities
  • 1 server-request method identity
  • 19 tagged-union discriminator identities
  • 0 client notifications
  • 0 ThreadItem identities
  • 0 ResponseItem identities

The 18 successful client-result roots and one auth-refresh server-response root are 19 implementation obligations, not registry identities. The A1.2 denominator is 45, never 64.

Classification is exactly 26 StablePublicRoot / 11 RootOwnedNestedUnion / 8 SharedWithinSlice. Production module ownership is exactly 45 AccountsModelsConfiguration.

The mechanically frozen start was 2 Partial — model/rerouted and account/chatgptAuthTokens/refresh — plus 43 NotImplemented. Final A1.2 status is 45 Complete / 0 Partial / 0 NotImplemented / 0 NotApplicable. Final global status is 212 Complete / 6 Partial / 121 NotImplemented / 48 NotApplicable.

The six exact residual Partial identities are initialize, initialized, error, item/commandExecution/requestApproval, item/fileChange/requestApproval, and item/tool/requestUserInput. No identity outside A1.2 was promoted or regressed.

Staged global metrics were mechanically confirmed:

  • B2: 191 Complete / 7 Partial / 141 NotImplemented / 48 NotApplicable
  • B3: 196 / 6 / 137 / 48
  • B4: 207 / 6 / 126 / 48
  • B5: 212 / 6 / 121 / 48

Public grouped API and all 18 operations

Wire method Public facade method Result contract
account/login/cancel Accounts::cancelLogin Concrete
account/login/start Accounts::startLogin Concrete
account/logout Accounts::logout Unit
account/rateLimitResetCredit/consume Accounts::consumeRateLimitResetCredit Concrete
account/rateLimits/read Accounts::readRateLimits Concrete
account/read Accounts::read Concrete
account/sendAddCreditsNudgeEmail Accounts::sendAddCreditsNudgeEmail Concrete
account/usage/read Accounts::readUsage Concrete
account/workspaceMessages/read Accounts::readWorkspaceMessages Concrete
model/list Models::list Concrete
modelProvider/capabilities/read Models::readProviderCapabilities Concrete
config/batchWrite Configuration::batchWrite Concrete
config/mcpServer/reload Configuration::reloadMcpServers Unit
config/read Configuration::read Concrete
config/value/write Configuration::writeValue Concrete
configRequirements/read Configuration::readRequirements Concrete
experimentalFeature/enablement/set Configuration::setExperimentalFeatureEnablement Concrete
experimentalFeature/list Configuration::listExperimentalFeatures Concrete

Result totals are exactly 2 Unit and 16 Concrete. The Unit methods are account/logout and config/mcpServer/reload, both guarded against a future non-empty result schema.

The new entry points are client.typed().accounts(), client.typed().models(), and client.typed().configuration(). They share the existing AppServerClient::RawProtocol and its one transport, JSONL engine, ID allocator, pending registries, generation boundary, ordering, observers, cancellation, and occurrence tokens. No direct AppServerClient facade accessor, generic request facade, MCP facade, feature facade, session facade, future, coroutine, worker, retry machine, or second protocol state was added.

typed::Client remains one pointer; AppServerClient keeps its PIMPL-only layout. SOVERSION remains unchanged.

Notifications and bounded preservation

The seven complete notification identities are:

  • account/login/completed
  • account/rateLimits/updated
  • account/updated
  • configWarning
  • model/rerouted
  • model/safetyBuffering/updated
  • model/verification

Existing model/rerouted semantics remain identical: same thread/turn association, from/to model values, reason string, 64-entry bounded history, and frontend shape. Future reason strings remain observable without terminating the connection.

The six newly typed A2-unmodeled notifications use the existing bounded preservation path. Typed internal raw retains the complete envelope; BackendCore preservation retains raw["params"]; frontend codex.extension.params contains recursively sanitized params only. Envelope-only fields cannot enter frontend params. The A1.1 params-only regression remains explicit.

Auth-refresh server request and compatibility

account/chatgptAuthTokens/refresh now models:

  • request: required open reason, optional-nullable previous account/workspace ID, exact internal raw request, and occurrence token;
  • response: required access token, required ChatGPT account ID, and optional-nullable plan type.

The one pending-server-request registry, stale-token rejection, generation isolation, validation-before-enqueue, exactly-once response, duplicate rejection, and existing BackendCore/frontend authentication path remain unchanged.

Canonical replies use Requests::respondRefresh. Existing AuthenticationRequest, AuthenticationResponse, and the legacy braced respond(request, {token, account, nullopt}) source form remain compile-covered and forward to the canonical encoder without collapsing canonical omitted/null/value semantics.

Nineteen tagged-union identities

  • Account: amazonBedrock, apiKey, chatgpt
  • LoginAccountParams: apiKey, chatgpt, chatgptAuthTokens, chatgptDeviceCode
  • LoginAccountResponse: apiKey, chatgpt, chatgptAuthTokens, chatgptDeviceCode
  • ConfigLayerSource: enterpriseManaged, legacyManagedConfigTomlFromFile, legacyManagedConfigTomlFromMdm, mdm, project, sessionFlags, system, user

Request and response login unions have distinct public types and distinct future alternatives. Known branches retain all known fields. Incoming result/account values retain raw JSON; outgoing login params do not add convenience raw state.

Transitive type/path closure

The final mechanically derived closure contains:

  • 40 unique seed definitions
  • 104 reachable named definitions
  • 302 schema paths
  • 272 known property declarations

Definition dispositions:

  • 70 PublicHandwrittenType
  • 26 OpenStringEnum
  • 8 ReusedExistingType

Path dispositions:

  • 47 PublicHandwrittenType
  • 19 PrivateCodecHelper
  • 2 OpenStringEnum
  • 42 StrongIdentifier
  • 7 ProtocolDefinedOpaqueJson
  • 185 ReusedExistingType

Batch closure counts are B2 42 definitions / 97 paths, B3 16 / 57, and B4 32 / 111. B5 reuses dependency-closed configuration definitions while owning its five exact registry identities. Authorized arbitrary JSON is retained only at schema-evidenced paths, including config write values; ConfigReadResponse and other known objects are not raw wrappers, and known additionalProperties fields are not dropped.

Unknown, malformed, and sensitivity model

  • Future method or discriminator: explicit direction-specific unknown alternative plus ForwardCompatibility.
  • Future open enum nested in a known branch: known outer branch retained plus UnknownEnumValue.
  • Malformed known branch, missing/wrong discriminator, missing required field, or wrong shape: MalformedKnownPayload / ProtocolWarning, never false future classification.
  • Typed decode failure never terminates the connection.
  • Diagnostics contain stable identities and field paths, never values.

Path sensitivity counts are:

  • 206 NonSensitiveProtocolData
  • 41 AccountUsageData
  • 19 PotentialCredentialBearingConfiguration
  • 13 AuthenticationFlowData
  • 7 PersonallyIdentifyingAccountData
  • 7 WorkspaceContent
  • 5 AccountWorkspaceIdentity
  • 3 CredentialSecret
  • 1 EphemeralAuthenticationCode

API keys, access tokens, active device user codes, account/workspace identity, auth payloads, and potentially credential-bearing configuration values never enter diagnostics, exception text, semantic logs, generated evidence/Markdown, BackendCore canonical state, frontend messages, or generic extensions. No formatter/stream support or remote operation was added for secret-bearing aggregates.

The repository-level synthetic-secret guard has an exact 21-path fixture allow-list and a planted negative self-test. After all builds, tests, packages, and docs, it passed across GCC, Clang, ASan, and UBSan trees: 41,626 encountered paths, 41,275 unique scans, and 42 verified package copies.

Registry and descriptor architecture

ProtocolSurfaceRegistry remains the sole production authority for disposition, runtime target, typed status, module, slice, schema status, and backend/frontend security dispositions. Evidence classification remains generated non-runtime metadata.

Private reproducible descriptors key exact ProtocolSurfaceKey rows. Public C++ types are handwritten. A1.2 adds exactly 18 client-request targets, 7 notification targets, the completed auth server-request target, and the domain-appropriate AccountsModelsConfiguration union family. Runtime rows and descriptors are bijective.

Bidirectional guards assert exact diagnostic-code multisets for missing, duplicate, wrong-category, row-only, descriptor-only, coherently drifted, demoted, removed, stale, false-complete, wrong-result-decoder, and wrong Unit/Concrete associations. A1.0/A1.1 descriptor artifacts and exact ratchets remain intact.

BackendCore, frontend, application, ABI, and package boundaries

BackendCore changes are compatibility-only visitor arms into the existing model-reroute reducer or bounded typed-event preservation. No account/config/model canonical state, merge semantics, new BackendCommand, or exposure decision was added.

There are no production diffs under:

  • src/ai/openai/codex/frontend/
  • src/apps/codex-backend/
  • src/apps/codex-backend-client/

Frontend Protocol v1 bytes, identity/version, commands, events, snapshots, response shapes, codex.extension.params semantics, and codex-backend-client behavior remain unchanged. No REST, WebSocket, MQTT, Context UI, Qt, or remotely callable account/model/configuration operation was added.

Only Accounts.h, Models.h, Configuration.h, and intended supporting public types are installed. Registry internals, private descriptors, schemas, fixtures, generators, and evidence remain private. The staged consumer verifies 30 exact public headers, self-contained include guards, no detail signatures, aggregate plus isolated facade consumers, compatibility names, one-pointer layout, and SOVERSION 1. The binary package contains three exact component archives/libraries and excludes all offline evidence; the source package retains and independently reruns offline verification inputs.

Fixtures and mutations

The final offline corpus contains 4,815 indexed records: 1,881 positive and 2,934 negative.

It covers:

  • 19,229 required-property removals
  • 19,051 wrong-type mutations
  • 178 exact schema-authorized unconstrained exclusions
  • 19,631 optional present/omission locations
  • every known union alternative and open-enum value
  • omitted/null/value tri-states, defaults, boundaries, collections, Unit mutations, stale operation/descriptor associations, and authorized JSON kinds

Commit 5 fixture generation/check took 32.198s / 32.314s. Final cold registered fixture runs took 152.31s and 149.87s under the unchanged 300-second timeout. GNU time was unavailable, so peak RSS is not claimed.

Per-commit validation boundaries

Commit 1 — 98556b8

  • Debug configure/build passed.
  • 11 focused audit/generated/registry/codec tests passed in 19.02s.
  • Exact A1.1 audit, closure, artifact byte identity, fixture, and source-package regeneration remained green.
  • git diff --check passed.
  • GitHub Actions run 30089180193: success.

Commit 2 — 3cbbafe

  • Debug configure/build and 25 focused account/auth/schema/registry/backend/frontend tests passed in 25.27s.
  • Exhaustive fixture infrastructure passed in 89.54s at the unchanged timeout.
  • Installed/source/binary packages and exact A1.0/A1.1 ratchets passed.
  • Secret non-disclosure, auth occurrence-token, AF_UNIX bytes, lifecycle, and compatibility tests passed.
  • git diff --check passed.
  • GitHub Actions run 30098145635: success.

Commit 3 — fef4d7d

  • Debug configure/build and 22 focused model/provider/schema/registry/backend/facade tests passed in 25.46s.
  • Exhaustive fixtures passed in 90.34s.
  • Installed/source/binary packages and earlier ratchets passed.
  • model/rerouted parity and both new bounded-preservation paths passed.
  • git diff --check passed.
  • GitHub Actions run 30098484782: success.

Commit 4 — 7711341

  • Debug full build and both backend applications passed.
  • 26 focused configuration-read/schema/registry/backend/facade tests passed in 25.57s.
  • Exhaustive fixtures passed in 96.18s.
  • Installed/source/binary packages, known-field/origin/source handling, and earlier ratchets passed.
  • git diff --check passed.
  • GitHub Actions run 30101888403: success.

Commit 5 — 29a065a

  • Debug full build with parallel 4 passed, including both backend applications.
  • Focused audit/A1.1/registry/account/model/configuration/facade/backend suite passed 26/26 in 24.29s.
  • Exhaustive fixtures passed in 96.90s.
  • B5 exact codecs, AF_UNIX bytes, Unit/Concrete dispatch, arbitrary JSON, lifecycle, packages, and all prior ratchets passed.
  • git diff --check passed.
  • GitHub Actions run 30104851647: success.

Commit 6 — 8665803

  • Clean GCC Debug configure and full parallel-4 build passed.
  • ctest -N registered exactly 285 tests; closure Structurally cache semantic loggers in hot framework paths #179, public-header policy #284, and secret guard #285 are present.
  • Exact Codex label: 115/115 passed in 396.75s; the gated typed live integration was skipped.
  • Full repository: 285/285 passed in 403.27s; the same gated integration was skipped.
  • Explicit installed-consumer regex: 1/1 passed in 27.52s.
  • codex-backend and codex-backend-client built successfully.
  • Final source package recheck after documentation: passed in 135.40s.
  • Final global secret scan, closure check, docs consistency, package audits, and git diff --check passed.
  • Final GitHub Actions run 30112754628: in progress at handoff.

One preceding Codex-label attempt reached the existing 120s binary-package timeout because CPack's serial preinstall was rebuilding downstream targets after the final codec relink. The required full parallel build was then completed; the unchanged audit passed in 12.12s alone and 12.31s in the definitive Codex run. No timeout or assertion was weakened.

Clang and sanitizers

Clang 21.1.8 passed the focused 21-test A1.2 matrix in 3.54s. A scoped -Wno-error=nrvo concession was required only for a pre-existing unchanged frontend warning; all other configured warnings remained errors.

The same 21 tests passed under:

  • ASan with leak detection disabled: 21/21 in 6.09s
  • ASan plus LeakSanitizer: 21/21 in 6.14s
  • UBSan: 21/21 in 4.48s

LeakSanitizer required the unrestricted environment because the development sandbox denies its ptrace operation. No sanitizer finding was suppressed.

Integration

  • Established raw non-credential App Server handshake: passed; explicit final run 0.19s.
  • Credential/quota-gated typed live integration: skipped because its gate was unset.
  • No live login/logout, credits, nudge email, configuration mutation, MCP reload, or feature mutation was attempted.
  • No live response body was printed, captured as an artifact, or used as proof of synthetic-secret safety.

Test-integrity accounting

Cumulative diffs from the verified base:

Boundary tests/ tests/component/codex/ tests/policy/ tests/installed/codex/
Commit 1 6 files, +2,912/-6 5 files, +2,881/-0
Commit 2 20 files, +7,111/-103 16 files, +6,956/-93 1 file, +106/-1
Commit 3 23 files, +9,423/-108 19 files, +9,200/-98 1 file, +164/-1
Commit 4 26 files, +11,323/-195 22 files, +11,030/-185 1 file, +225/-1
Commit 5 28 files, +13,235/-197 24 files, +12,834/-187 1 file, +331/-1
Commit 6 37 files, +14,360/-198 25 files, +13,152/-187 3 files, +659/-0 5 files, +450/-1

Commit 6 alone changes 12 test files by +1,129/-5: 2 component files by +318/-0, 3 policy files by +659/-0, and 4 installed-consumer files by +119/-0.

No pre-existing regression test was deleted, renamed, merged, disabled, or weakened. Modified pre-existing tests retain their original A0/A1.0/A1.1 contracts and add exact A1.2 identities, paths, fixtures, lifecycle checks, and diagnostic-code multisets. The complete original/new/retained/deletion audit and intrinsic code sets are recorded in docs/ai/openai/codex/a1-2-test-integrity.md.

Final local validation summary

Responsible parallelism was 4 after nproc reported 28 CPUs and free -h reported about 62 GiB RAM. Final GCC commands included clean configure/build, ctest -N, exact codex label, full ctest, installed-consumer regex, application targets, closure/generator/package checks, integration, secret scan, and git diff --check.

The first sandboxed configure encountered restricted DNS while resolving an existing dependency; the approved unrestricted configure succeeded. Ordinary generated checks and tests remain offline and require no Codex credentials, quota, executable configuration, or user configuration. Peak memory remains unreported because GNU time is unavailable.

Known limitations and explicit exclusions

  • The credential/quota-gated typed live integration was not enabled; the raw non-credential handshake passed.
  • Peak fixture RSS was not measured because GNU time is unavailable.
  • Final CI run 30112754628 is in progress at handoff; completion is not claimed.
  • A1.3, A1.4, A2, A3, Context UI, REST, WebSocket, MQTT, and Qt were not implemented.
  • Experimental-only App Server inventory was not typed; only the two pinned stable experimentalFeature management methods are included.
  • No new frontend exposure or security decision was made.
  • Codex did not mark this PR ready, did not merge it, and did not create a second PR.

@VolkerChristian
VolkerChristian force-pushed the codex/phase-a1-2-accounts-models-configuration branch from 63568c0 to c87c6d6 Compare July 24, 2026 13:45
@VolkerChristian
VolkerChristian force-pushed the codex/phase-a1-2-accounts-models-configuration branch from 989dc55 to 8665803 Compare July 24, 2026 17:22
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