feat(app-server): filter threads by parent - #26662
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
c8ea2dd to
acfa2ba
Compare
| Ok(mut page) => { | ||
| // Parent-filtered listings intentionally treat persisted state as authoritative. | ||
| if parent_thread_id.is_some() { |
There was a problem hiding this comment.
Codex: This is intentionally a narrow accommodation in the existing rollout/state adapter. Conceptually, querying indexed thread metadata and validating rollout-file existence would be separate layers; parent-filtered listing only needs the first. Extracting that boundary here would broaden the PR and risk existing thread/list behavior, so this branch returns authoritative persisted relationships before rollout validation while leaving the ordinary path unchanged.
7b5cee5 to
7caeaaf
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b5cee517c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
7caeaaf to
9cfc79e
Compare
4ef72f3 to
0c79164
Compare
0c79164 to
6cd747d
Compare
jif-oai
left a comment
There was a problem hiding this comment.
This won't be backward compatible but lgtm after my comments
Please check with DDR as well, he did some work on sub-second ordering / reflection
6cd747d to
fee5e2f
Compare
9cbdb67 to
95d0018
Compare
Why
Clients that display or coordinate spawned subagents need an authoritative snapshot of a thread's immediate spawned children when they connect to app-server or recover after missing live events.
thread/listcannot query by parent, so clients must otherwise scan unrelated threads or reconstruct relationships from rollout history and transient events.The direct spawn relationship already exists in persisted
thread_spawn_edgesstate. Review and Guardian threads do not participate in that lifecycle and are intentionally outside this filter's scope.What changed
This adds an experimental
parentThreadIdfilter tothread/list. Parent-filtered requests return direct spawned children from persisted state while preserving the existing response shape, explicit filters, sorting, and timestamp-only cursor behavior. The lookup does not read rollout transcripts or recursively return descendants.Supersedes #25112 with the narrower
thread/listfilter approach.How it works
parentThreadId.thread/listsemantics.Verification
State (144 tests), rollout (69 tests), and focused app-server thread-list (31 tests) suites passed. Scoped Clippy checks and repository formatting also passed. Coverage includes direct spawned children, omitted grandchildren, pagination, malformed IDs, mixed source kinds, explicit filters, and operation without rollout files.