Skip to content

perf(examples): parallelize examples:check with scaled budgets (#128 rec 1) - #146

Merged
ScriptedAlchemy merged 1 commit into
mainfrom
perf/examples-check-concurrency
Sep 1, 2026
Merged

perf(examples): parallelize examples:check with scaled budgets (#128 rec 1)#146
ScriptedAlchemy merged 1 commit into
mainfrom
perf/examples-check-concurrency

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Implements #128 recommendation 1: examples:check runs the five example check scripts at --workspace-concurrency=3 instead of one at a time. The examples are disjoint directories, and the audit measured the serial shape as the gate's critical path (5m14s of a 9m52s green gate wall).
  • Parallel example checks share cores exactly like the multi-worker integration pool, so the script also floors AGENT_BUNDLE_TEST_TIME_SCALE at 2 (${AGENT_BUNDLE_TEST_TIME_SCALE:-2}), mirroring the integration config's multi-worker poolTimeScale. An externally provided larger value is never lowered — local-ci passes 4 into its gates leg, and the hosted examples-check job pins 4 through the CI env inside each example's own time-scale helper.

Why the scale floor is needed

A first verification run at concurrency 3 with the default scale of 1 failed exactly one test: examples/rsc-agent-runtime tests/dev-invocation.integration.test.ts :: contains invocation stdout, stderr, and timeout failures… timed out at its 45_000 * timeScale budget while the other examples' rsbuild builds competed for cores — the precise contention class the repo's time-scale mechanism exists for (see rstest.integration.config.ts).

Test plan

  • pnpm examples:check green end to end at concurrency 3 with the scale floor, on a loaded 96-core machine (load ~30): all five example checks pass, 3m47s wall including the root build (vs 5m14s measured serial in the audit).

Refs #128.

…aled budgets (#128)

The five examples are disjoint directories, so the serial shape was a
gate-critical-path artifact (measured 5m14s of a 9m52s green gate wall in
the #128 audit). Parallel example checks share cores the same way the
multi-worker integration pool does, so the script also floors
AGENT_BUNDLE_TEST_TIME_SCALE at 2 without lowering an externally provided
value (local-ci passes 4; hosted CI pins 4 via the CI env).

Verified green end to end at concurrency 3 on a loaded 96-core machine:
all five example checks pass in 3m47s wall including the root build.
@changeset-bot

changeset-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: cc27820

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-01T07:41:54.497373Z cc27820 PR opened
ℹ️ 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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 1, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle@146
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/create-agent-bundle@146
npm i https://pkg.pr.new/ScriptedAlchemy/agent-bundle/@agent-bundle/runtime@146

commit: cc27820

@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: cc2782038f

ℹ️ 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 package.json
Comment thread package.json
@ScriptedAlchemy
ScriptedAlchemy merged commit 628775b into main Sep 1, 2026
10 checks passed
ScriptedAlchemy added a commit that referenced this pull request Sep 1, 2026
@ScriptedAlchemy
ScriptedAlchemy deleted the perf/examples-check-concurrency branch September 3, 2026 05:28
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.

1 participant