Skip to content

Parallelize skill metadata stats#29326

Merged
jif-oai merged 1 commit into
mainfrom
jif/parallel-skill-metadata-scalar
Jun 21, 2026
Merged

Parallelize skill metadata stats#29326
jif-oai merged 1 commit into
mainfrom
jif/parallel-skill-metadata-scalar

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

This switches skill discovery to the simpler same-connection scalar request shape.

After reading a skills directory, discovery now starts the existing fs/getMetadata calls for all visible entries in that directory before awaiting the results. There is no JSON-RPC batch frame and no new filesystem API; remote filesystems use the existing request-id multiplexing on the same exec-server connection.

This is the scoped alternative to the batch-frame approach in #29074 / #29075.

What changed

  • Collect visible directory entries before processing them.
  • Run their existing fs.get_metadata(...) calls with join_all.
  • Process the results in the original directory order, so skill discovery behavior stays the same.

Benchmarks

Fresh local benchmark against generated skill trees over a real exec-server remote filesystem. The benchmark calls the actual load_skills_from_roots path, so this includes directory reads, metadata stats, SKILL.md reads, and parsing.

Times are p50 milliseconds from 5 samples after 1 warmup, using warmed runs.

Scenario Legacy main Batch frame stack (#29074 / #29075) Same-connection scalar stack
100 flat skills 377.4 389.0 378.6
500 flat skills 1983.2 1856.6 1757.5

Takeaway: for the actual skill discovery path, same-connection scalar is tied with legacy at 100 skills and best at 500 skills. The batch-frame stack does not show enough win here to justify the extra protocol/API surface.

Benchmark command:

  • just test -p codex-exec-server benchmark_remote_skill_discovery --run-ignored ignored-only --no-capture

Checked locally with:

  • just test -p codex-core-skills
  • just bazel-lock-update
  • just bazel-lock-check

@jif-oai

jif-oai commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5b4ea41f7

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core-skills/src/loader.rs
Comment thread codex-rs/core-skills/src/loader.rs
@jif-oai jif-oai merged commit c2fbf42 into main Jun 21, 2026
31 checks passed
@jif-oai jif-oai deleted the jif/parallel-skill-metadata-scalar branch June 21, 2026 12:04
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant