Complete Codex accounts, models, and configuration typed surface#221
Draft
VolkerChristian wants to merge 6 commits into
Draft
Complete Codex accounts, models, and configuration typed surface#221VolkerChristian wants to merge 6 commits into
VolkerChristian wants to merge 6 commits into
Conversation
VolkerChristian
force-pushed
the
codex/phase-a1-2-accounts-models-configuration
branch
from
July 24, 2026 13:45
63568c0 to
c87c6d6
Compare
VolkerChristian
force-pushed
the
codex/phase-a1-2-accounts-models-configuration
branch
from
July 24, 2026 17:22
989dc55 to
8665803
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Exact six-commit history
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:
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:
Public grouped API and all 18 operations
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:
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:
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
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:
Definition dispositions:
Path dispositions:
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
Path sensitivity counts are:
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:
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:
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
Commit 2 — 3cbbafe
Commit 3 — fef4d7d
Commit 4 — 7711341
Commit 5 — 29a065a
Commit 6 — 8665803
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:
LeakSanitizer required the unrestricted environment because the development sandbox denies its ptrace operation. No sanitizer finding was suppressed.
Integration
Test-integrity accounting
Cumulative diffs from the verified base:
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