Skip to content

feat(bench): add multi-agent Gateway workloads - #149178

Merged
steipete merged 1 commit into
mainfrom
codex/perf-multi-agent-benchmark-7006
Sep 15, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/perf-multi-agent-benchmark-7006

Conversation

@steipete

@steipete steipete commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Related: #149170

What Problem This Solves

The Gateway concurrency benchmark puts every synthetic session on main. Increasing session and concurrency counts misses work that scales with the number of configured agents, including model publication and session-store routing.

Why This Change Was Made

Add a benchmark-only --agent-count option, defaulting to one and bounded by the effective session inventory. Distribute the existing session and turn totals deterministically across configured agents, with separate workspaces. Before load-window profiling starts, verify each agent's configured model and complete paginated session inventory. Retain those responses and attribute completed turns and history probes to their requested sessions.

User Impact

Developers can measure a multi-agent Gateway workload without increasing the requested session or turn totals. Existing one-agent runs retain their setup and routing; the result gains an agentCount field. This changes benchmark tooling only, with no product configuration, state schema, or dependency changes.

Evidence

  • Fresh maintained P2 review found no actionable issues. All 29 supplied source inputs and the exact three-file candidate were independently checked.
  • Eight selected checks, docs/link sanity, and all 40 benchmark tests passed on the exact candidate. The first build attempt was cancelled after an external process-monitor error; its partial evidence was retained, and only the completed checks were reused.
  • A fresh frozen installation, full build, and default-one, explicit-one, and four-agent Gateway smokes passed in the resumed Testbox run. All twelve commands settled. Each smoke completed four turns across eight sessions, with successful probes and a clean Gateway exit. Default and explicit one-agent options matched; the four-agent run retained each agent's model and session responses and all eight requested history keys.
  • This proof used base 80936b0933a1 plus the exact three-file candidate. Source, installed dependency fingerprints, and built outputs remained unchanged. The original failed build was not counted as a pass. Exact-head hosted CI is recorded below; native landing gates remain authoritative.
  • Coverage checks establish returned agent/session ownership and requested history routing. Independent physical database and transcript-content checks belong to the separate representative workload capture. This PR makes no speedup claim.

This focused three-file PR is based on main 4d7647fff9db. All three original blobs match the validated 80936b0933a1 base, and all candidate bytes match the reviewed and exercised files. The intervening catalog batching changes were source-reviewed; fresh exact-head hosted CI has validated the new integration. This is source equivalence, not a new current-main runtime result.

Exact-head CI 34983237032 passed on 5a21f92ae708. Fresh scoped P2 and ClawSweeper reviews found no actionable issues.

The hosting Testbox workflow linked above currently reports cancelled. Its accepted validation evidence is the retained successful task receipt, all twelve completed commands, native smoke reports, and independent source/install/build-output/lifecycle audit; workflow success is not inferred. The lease was stopped and confirmed completed.

@steipete steipete self-assigned this Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 15, 2026 14:40
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: S maintainer Maintainer-authored PR labels Sep 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 15, 2026
@clawsweeper

clawsweeper Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 10:48 AM ET / 14:48 UTC.

ClawSweeper review

What this changes

Adds a benchmark agent-count flag that distributes synthetic sessions across agents and records model, session-routing, and completed-turn coverage.

Merge readiness

✅ Ready for maintainer review

This remains useful work absent from current main and the latest release. No actionable introduced defect was found, and the maintainer-authored PR is protected from automatic closure.

Priority: P2
Reviewed head: 5a21f92ae708433cb0805d3466b5fcddc21dc862

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused benchmark extension with coherent defaults, bounded inputs, and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor gate does not apply to this MEMBER-authored PR, and no material authority change triggers additional proof. The body reports built-Gateway runs exercising the changed session assignment and coverage collection; its earlier-base qualification is retained, while direct log inspection was blocked by the review host.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor gate does not apply to this MEMBER-authored PR, and no material authority change triggers additional proof. The body reports built-Gateway runs exercising the changed session assignment and coverage collection; its earlier-base qualification is retained, while direct log inspection was blocked by the review host.
Evidence reviewed 9 items Introduced scope and merge result: The host-pinned introduction contains only the benchmark, its tests, and performance documentation. The locally inspected test merge has the recorded base and PR head as its ordered parents; its comparison against that base contains the same three paths.
Work remains necessary: Current main still constructs the synthetic inventory with main-agent session keys and has no agent-count flag. The v2026.9.4 source retrieved through GitHub likewise constructs main-agent keys.
Latest-release comparison: The latest supplied release retains the single-agent inventory construction; this is not an already-shipped benchmark capability.
Findings None None.
Security None None.

How this fits together

The Gateway concurrency benchmark starts an isolated Gateway with a synthetic model provider, seeds sessions, and measures responsiveness during agent turns. Its reports help developers compare Gateway performance under controlled workloads.

flowchart TD
  A[Benchmark options] --> B[Isolated Gateway and model provider]
  B --> C[Distribute synthetic sessions across agents]
  C --> D[Verify models and session inventories]
  D --> E[Run turns and concurrent probes]
  E --> F[Performance and agent coverage report]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +50, Other +135. Total +185 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 52 2 +50
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 146 11 +135
Total 3 198 13 +185

Review metrics

Metric Value Why it matters
Benchmark control 1 new flag; default 1 agent, maximum 128 Agent count varies independently without increasing the requested session or turn totals.

Technical review

Best possible solution:

Keep multi-agent workload generation in the existing isolated benchmark, with explicit coverage attribution and unchanged single-agent defaults.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this adds a benchmark mode rather than repairing a reported bug; source inspection confirms the existing single-agent limitation.

Is this the best way to solve the issue?

Yes: extending the existing workload generator and shared configuration writer is a focused approach that preserves measurement totals and avoids a competing benchmark implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 3c34fe88c1ac.

Labels

Label changes:

  • add P2: This is a bounded developer-tooling improvement for measuring multi-agent Gateway workloads.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor gate does not apply to this MEMBER-authored PR, and no material authority change triggers additional proof. The body reports built-Gateway runs exercising the changed session assignment and coverage collection; its earlier-base qualification is retained, while direct log inspection was blocked by the review host.

Label justifications:

  • P2: This is a bounded developer-tooling improvement for measuring multi-agent Gateway workloads.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor gate does not apply to this MEMBER-authored PR, and no material authority change triggers additional proof. The body reports built-Gateway runs exercising the changed session assignment and coverage collection; its earlier-base qualification is retained, while direct log inspection was blocked by the review host.

Evidence

What I checked:

  • Introduced scope and merge result: The host-pinned introduction contains only the benchmark, its tests, and performance documentation. The locally inspected test merge has the recorded base and PR head as its ordered parents; its comparison against that base contains the same three paths. (7b25dc1db939)
  • Work remains necessary: Current main still constructs the synthetic inventory with main-agent session keys and has no agent-count flag. The v2026.9.4 source retrieved through GitHub likewise constructs main-agent keys. (scripts/bench-gateway-concurrency.ts:1350, 3c34fe88c1ac)
  • Latest-release comparison: The latest supplied release retains the single-agent inventory construction; this is not an already-shipped benchmark capability. (scripts/bench-gateway-concurrency.ts:1173, 3a9d69db306c)
  • Workload and measurement boundaries: Session assignment preserves the effective inventory and concurrency totals. Model and paginated inventory verification precede profiler activation; completed-turn attribution follows successful turn settlement. The one-agent branch omits the additional setup reads. (scripts/bench-gateway-concurrency.ts:1485, 5a21f92ae708)
  • Runtime implementation boundary: The existing mock-provider configuration explicitly selects the OpenClaw agent runtime and a loopback Responses endpoint. The changed benchmark consumes OpenClaw Gateway RPC contracts; it does not depend on the Codex harness or protocol. (scripts/e2e/lib/fixtures/mock-openai-config.mjs:38, 5a21f92ae708)
  • Runtime evidence and inspection limitation: The captured PR body reports default-one, explicit-one, and four-agent runs through the built Gateway, each completing four turns across eight sessions, with successful probes and clean Gateway exits. It explicitly qualifies the proof as an earlier base plus identical candidate files. The linked run https://github.com/openclaw/openclaw/actions/runs/34981211936 is marked cancelled; direct job-log retrieval was blocked by the review host's storage-domain allowlist, so command-level completion was not independently verified. This does not disprove the reported results.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 87ed5d2 into main Sep 15, 2026
142 checks passed
@steipete
steipete deleted the codex/perf-multi-agent-benchmark-7006 branch September 15, 2026 15:25
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant