Skip to content

Upload all skill files concurrently - #2540

Merged
xeophon merged 2 commits into
mainfrom
perf/ordered-skill-uploads
Sep 14, 2026
Merged

xeophon merged 2 commits into
mainfrom
perf/ordered-skill-uploads

Conversation

@xeophon

@xeophon xeophon commented Sep 5, 2026 •

Copy link
Copy Markdown
Member

Upload all configured skill files concurrently through the existing runtime write API, then restore executable bits in one chmod call. Harness setup waits for every upload to settle before returning or propagating an upload error.

File and skill upload order is unspecified. Configurations with colliding destination paths must not depend on which write wins. File contents are buffered in memory for the upload phase; the runtime client's connection pool manages network connections.

Warm Prime VM measurements, including the runtime upload-directory improvement already merged in #2539:

Workload Current main Batches of eight All concurrent
Install 32 files 6.099 s 1.447 s 1.009 s
Install 128 files Not measured 4.425 s 1.705 s
Install three skills, 37 files Not measured 2.539 s 1.062 s
Full warm Codex setup, 32 skill files 7.776 s 3.238 s 2.776 s

One temporary vm=True Prime VM (python:3.11-slim, 1 CPU, 2 GiB), one warmup round and six interleaved measured rounds per workload. All variants use the full Prime runtime from main at 284bcfdfb9fa. Provisioning and initial program downloads are excluded; the setup measurement includes the full existing warm Codex setup path.

This comparison measures setup latency on one VM, including up to 128 concurrent uploads. It does not measure model inference or throughput across many simultaneous rollouts.
Observed all-concurrent install/multi range: 0.950–1.061 s.
Observed all-concurrent install/large range: 1.614–1.846 s.
Observed all-concurrent setup/multi range: 2.498–4.926 s.


Note

Low Risk
Setup-path performance change only; higher peak memory during install and reliance on concurrent runtime.write being safe, with no auth or scoring behavior changes.

Overview
Harness.install_skills no longer writes each skill file to the runtime one at a time. It first walks all configured skills, reads every file into memory, and records targets plus executable paths, then runs all runtime.write calls in parallel with asyncio.gather (failures are collected and re-raised after uploads finish). A single chmod +x still runs afterward for every executable path across skills.

Traversal no longer sorts files under a skill, so upload order is unspecified—configs must not rely on write ordering or on which concurrent write wins when destinations collide.

Reviewed by Cursor Bugbot for commit 484af55. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Batch skill uploads in Harness.install_skills via tar archives

  • Replaces single-file runtime writes with ordered tar batches for runtimes that support live processes. Batches contain at most 32 files or 1 MiB of file sizes.
  • Adds the _EXTRACT_SKILLS helper script to extract uploaded archives in the runtime and remove the temporary archive path on exit.
  • Singleton batches or runtimes without live-process support continue to use direct writes.
  • Risk: Multi-file extraction failures now raise SandboxError, attempting shielded process termination and temporary archive removal.
📊 Macroscope summarized 484af55. 1 file reviewed, 2 issues evaluated, 0 issues filtered, 2 comments posted

🗂️ Filtered Issues

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-14T14:15:50.001981Z 484af55 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@macroscopeapp

macroscopeapp Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This changes every skill-supporting harness setup from ordered per-file writes to unbounded concurrent writes while buffering the entire skill tree, affecting runtime resource usage and overwrite ordering. Unresolved comments identify concrete memory/process pressure and nondeterministic collision risks that require human review.

Not approved because:

  • 2 blocking correctness issues found at or above your repo's Minimum Blocking Severity

No code changes detected at 484af55. Prior analysis still applies.

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@xeophon xeophon changed the title Batch skill uploads through ordered archives Upload all skill files concurrently Sep 5, 2026
@xeophon
xeophon requested a review from hallerite September 5, 2026 10:02
Comment thread verifiers/v1/harness.py
Comment thread verifiers/v1/harness.py

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

Copy link
Copy Markdown

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: b34cf2a337

ℹ️ 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 verifiers/v1/harness.py
Comment thread verifiers/v1/harness.py

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b34cf2a. Configure here.

Comment thread verifiers/v1/harness.py
@xeophon
xeophon enabled auto-merge (squash) September 6, 2026 10:47
@xeophon
xeophon force-pushed the perf/ordered-skill-uploads branch from b34cf2a to 484af55 Compare September 14, 2026 14:13
@xeophon
xeophon merged commit fb9d6d7 into main Sep 14, 2026
14 checks passed
@xeophon
xeophon deleted the perf/ordered-skill-uploads branch September 14, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants