perf(core): pipeline ancestor discovery#31810
Open
jif-oai wants to merge 2 commits into
Open
Conversation
anp-oai
reviewed
Jul 10, 2026
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.
Why
Remote project startup still serialized most of its ancestor discovery:
.agents/skillsdirectories were checked one directory at a time;Each check is a normal
fs/getMetadataRPC, so deep projects paid for hundreds of avoidable RTTs even though the paths are known from the cwd.What changed
This does not add a filesystem batch API or change the wire protocol. Results are still consumed in the original deterministic order.
RTT benchmark
The depth-64 case removes 274.8 serialized RTT equivalents, a 7.8x improvement. The remaining plateau is mostly the existing 32 KiB AGENTS budget being filled by serial file reads; this PR keeps that separate from metadata discovery.
Measured with optimized app-server binaries, unique cold project fixtures, and a warm process/model/executor transport. Each point is the median of three campaigns with five samples at both 6 ms and 30 ms full RTT; the RTT count is derived from the wall-time delta.
Tests
just test -p codex-core -E 'test(agents_md)'(57 passed)just test -p codex-core-skills(119 passed)