[app-server] Add stored-thread view helpers#28461
Draft
adamvy-oai wants to merge 2 commits into
Draft
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
This was referenced Jun 16, 2026
4ac9c7c to
fb990e8
Compare
53b0ae8 to
aa5343c
Compare
fb990e8 to
48321c1
Compare
48321c1 to
7a32119
Compare
aa5343c to
16d35f1
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 third change in a five-PR stack that improves the Rust embedding API for
codex-app-server. It gives stored-thread consumers one intentional module for producing the same views, filters, and pages as the built-in request processors.What
codex_app_server::thread_viewsfrom_stored_thread()for projecting aStoredThreadinto the app-server representationThreadSourceFilterfor the two-stage source filtering used by thread list and search requestsallowed_sourceslist applies no source filterpaginate_loaded_thread_ids()andpaginate_turns()Why
Stored-thread projection and pagination previously lived inside request-processing code, while source filtering lived in a separate private module. Embedders with another
ThreadStorewould have to reproduce that behavior to return app-server-compatible views.The new module defines that behavior once and makes the built-in request processors use the same API.
ThreadSourceFilterretains the existing split between coarse store filtering and precise in-memory classification for source kinds that the store cannot distinguish directly. The backing-store contract is now explicit: an emptyallowed_sourceslist applies no store-level source filter, soThreadSourceFilter::matches()can perform the precise classification afterwards.Stack
Each PR is based on the preceding branch:
Validation
Validation for the final stacked commits:
thread_viewstests, including unfiltered backing-store queries followed by precise source classificationjust 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