[app-server] Allow custom in-process thread stores#28459
Open
adamvy-oai wants to merge 1 commit into
Open
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
This was referenced Jun 16, 2026
Author
|
I have read the CLA Document and I hereby sign the CLA |
a70301e to
5569b5a
Compare
5569b5a to
ec3b1ca
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.
Overview
This is the first change in a five-PR stack that makes
codex-app-servereasier to embed as a Rust library. The stack adds explicit, opt-in host configuration for persistence and event delivery, then extracts reusable helpers for stored-thread views and rollout-history classification before adding durable external thread goals. Existing startup behavior remains the default, and the stack does not change app-server wire methods or schemas.What
InProcessStartOptionstypewith_thread_store()for supplying aThreadStorestart_with_options()for starting the in-process app server with those optionsstart()as the compatibility entry point with the existing default store and behaviorWhy
The in-process entry point previously selected its thread store internally. A program embedding
codex-app-servertherefore could not provide another persistence implementation without reproducing app-server startup code. This change makes the store an explicit opt-in dependency while preserving the existing path for all current callers.Private fields and builder methods keep construction controlled and allow later options without requiring callers to initialize every field.
Stack
Each PR is based on the preceding branch:
Validation
Validation for the final stacked commits:
just test -p codex-app-server: 886 passed; one timing retry passed on its second attemptjust test -p codex-core: 2,717 passed; eight timing-sensitive failures passed in focused reruns, while five high-output code-mode failures remainedjust test --test-threads=8: 10,944 of 10,958 passed; the remaining failures were the same five high-output tests, three timing-sensitive tests that pass in focused reruns, and six tests in untouched exec/TUI code affected by this host's managed permission policyupstream/maincommitjust fix -p codex-app-server,just fix -p codex-core, andjust fmt; final worktree clean