Skip to content

fix(scripts): report failing gateway concurrency probes - #118308

Merged
steipete merged 1 commit into
mainfrom
codex/fix-bench-gateway-concurrency-probes
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-bench-gateway-concurrency-probes

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Related: #118193

What Problem This Solves

Fixes an issue where operators running the gateway concurrency benchmark on Linux received only gateway probes did not pass before concurrent load, with no indication whether readiness, session listing, or the Control UI failed. The benchmark also failed before startup under native Node with ERR_MODULE_NOT_FOUND, despite Node's built-in TypeScript support.

Why This Change Was Made

The pre-load probes now run serially for attribution, retain bounded status/error details, and report every probe in the failure. Load-time sampling remains parallel. The benchmark's small source import graph now uses native-Node-compatible TypeScript specifiers and a dependency-free integer parser, so the canonical command no longer needs tsx.

User Impact

Operators can run the benchmark directly on supported Node versions and immediately see which baseline probe failed. The Hetzner reproduction now shows that readiness and Control UI pass while sessions.list times out, ruling out both the production UI asset and authentication theories without masking the underlying latency with a larger timeout.

Evidence

  • Before: Hetzner Node 26.5 reproduction reached a clean gateway startup but emitted only the generic probe failure.
  • After: Hetzner Node 26.5 diagnostic run reported readyz 200 in 18.5 ms, Control UI 200 in 392 ms, and only sessionsList failing with timeout waiting for sessions.list after 20 seconds.
  • Native Node: Hetzner Node 22.22.3 and 26.5.0 proof, including 85 focused tests.
  • Changed gate: Hetzner Node 26.5.0, all selected formatting, package, boundary, declaration, typecheck, and lint lanes passed.
  • Autoreview: Codex gpt-5.6-sol high reasoning, clean with 0.98 confidence. Source-blind behavior validation passed all native execution, invalid-input, and attributable-diagnostic clauses.

@steipete steipete self-assigned this Aug 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M maintainer Maintainer-authored PR labels Aug 2, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 8:03 PM ET / August 3, 2026, 00:03 UTC.

ClawSweeper review

What this changes

The PR updates the gateway concurrency benchmark to run under native Node and to report individual readiness, Control UI, and session-list probe failures before concurrent load begins.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for normal maintainer handling. It makes a focused, source-backed repair to the current gateway concurrency benchmark: native-Node execution becomes viable and failed baseline probes name the actual failing surface. No actionable patch defect was found, but the protected maintainer label requires an explicit human merge decision.

Priority: P3
Reviewed head: 556be6d9f9d67605cbdadab8c9a4aceae4f372eb
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) This is a focused repair with targeted regression coverage and reported live evidence; remaining action is protected-label maintainer confirmation rather than a patch correction.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (linked_artifact): The PR body provides before/after Hetzner benchmark runs, native-Node proof on supported Node versions, and a successful real-behavior-proof check; direct artifact retrieval was unavailable because DNS failed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): The PR body provides before/after Hetzner benchmark runs, native-Node proof on supported Node versions, and a successful real-behavior-proof check; direct artifact retrieval was unavailable because DNS failed.
Evidence reviewed 6 items Current-main behavior: Current main runs the TypeScript benchmark through tsx and retains .js source specifiers in the benchmark import graph; the branch changes the canonical package command and the affected source imports to native-Node-compatible .ts paths.
Failure attribution owner boundary: The branch captures each HTTP/RPC failure at its probe boundary, runs only baseline probes serially, and formats all three results when a baseline fails; load-time sampling remains parallel.
Regression coverage: The changed test covers a failing readiness response, invalid Control UI body, and failed sessions RPC, asserting serial probe order and attributed diagnostics; it also invokes the script through native Node for --help.
Findings None None.
Security None None.

How this fits together

The gateway CPU scenario harness runs a concurrency benchmark against an isolated gateway and mock provider. That benchmark establishes readiness, Control UI, and session-list baselines before applying concurrent agent load, then records performance observations for operators and CI.

flowchart LR
  A[Gateway CPU scenario] --> B[Concurrency benchmark]
  B --> C[Isolated gateway and mock provider]
  C --> D[Baseline probes]
  D --> E{All probes pass?}
  E -->|No| F[Named failure diagnostics]
  E -->|Yes| G[Concurrent agent load]
  G --> H[Latency and health report]
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled diagnostic repair merge after its live head, linked proof, and remaining required checks are confirmed? Confirm and merge: Verify that the live head and linked proof match this reviewed commit, then merge when required checks finish successfully.

Why: The code review found no blocking defect, but the protected maintainer label and future-dated supplied GitHub metadata require an explicit human merge decision.

Before merge

  • Resolve merge risk (P1) - The supplied GitHub context dates creation and update as August 3, 2026, while this review date is August 2, 2026. The checked-out branch commit is dated August 2, 2026 at 16:57:22 -07:00, but live GitHub and Crabbox reads could not refresh because DNS failed; confirm the exact head, linked evidence, and remaining checks before merge.
Agent review details

Security

None.

PR surface

Tests +54, Config 0, Other +56. Total +110 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 60 6 +54
Docs 0 0 0 0
Config 1 1 1 0
Generated 0 0 0 0
Other 6 108 52 +56
Total 9 169 59 +110

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: scripts/lib/dev-tooling-safety.ts, serialized state: scripts/lib/strict-integer-option.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the focused native-Node import-graph repair and per-probe diagnostic recording, then merge the reviewed head once a maintainer confirms live PR state and required checks.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the focused native-Node import-graph repair and per-probe diagnostic recording, then merge the reviewed head once a maintainer confirms live PR state and required checks.

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

Yes, from current source: the canonical benchmark path depends on tsx and its source import graph uses .js specifiers, while its generic baseline error discards which probe failed. The review did not execute the benchmark because the checkout is read-only.

Is this the best way to solve the issue?

Yes. Making the small benchmark import graph native-Node-compatible and recording errors where each probe occurs is narrower and more maintainable than adding retries, extending timeouts, or inferring failure causes downstream.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b7f9cd0a0167.

Labels

Label changes:

  • add P3: This is an operator-facing benchmark diagnostics repair that does not alter gateway runtime behavior, user configuration, or persisted state.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides before/after Hetzner benchmark runs, native-Node proof on supported Node versions, and a successful real-behavior-proof check; direct artifact retrieval was unavailable because DNS failed.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR body provides before/after Hetzner benchmark runs, native-Node proof on supported Node versions, and a successful real-behavior-proof check; direct artifact retrieval was unavailable because DNS failed.

Label justifications:

  • P3: This is an operator-facing benchmark diagnostics repair that does not alter gateway runtime behavior, user configuration, or persisted state.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): The PR body provides before/after Hetzner benchmark runs, native-Node proof on supported Node versions, and a successful real-behavior-proof check; direct artifact retrieval was unavailable because DNS failed.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides before/after Hetzner benchmark runs, native-Node proof on supported Node versions, and a successful real-behavior-proof check; direct artifact retrieval was unavailable because DNS failed.

Evidence

What I checked:

  • Current-main behavior: Current main runs the TypeScript benchmark through tsx and retains .js source specifiers in the benchmark import graph; the branch changes the canonical package command and the affected source imports to native-Node-compatible .ts paths. (scripts/bench-gateway-concurrency.ts:10, b7f9cd0a0167)
  • Failure attribution owner boundary: The branch captures each HTTP/RPC failure at its probe boundary, runs only baseline probes serially, and formats all three results when a baseline fails; load-time sampling remains parallel. (scripts/bench-gateway-concurrency.ts:278, 556be6d9f9d6)
  • Regression coverage: The changed test covers a failing readiness response, invalid Control UI body, and failed sessions RPC, asserting serial probe order and attributed diagnostics; it also invokes the script through native Node for --help. (test/scripts/bench-gateway-concurrency.test.ts:78, 556be6d9f9d6)
  • Runtime contract: The package supports Node 22.22.3+, 24.15+, and 25.9+; local Node help confirms the supported runtime exposes TypeScript type stripping, consistent with the branch’s native TypeScript execution path. (package.json:2057, 556be6d9f9d6)
  • History and ownership: The branch is a single commit directly atop current main; blame attributes the new diagnostic lines to that commit. The related merged PR introduced the benchmark that this repair corrects. (scripts/bench-gateway-concurrency.ts:611, 556be6d9f9d6)
  • Release and current-main provenance: The benchmark-introducing merged commit is reachable from the checked-out main branch, while no local release tag contains it; this PR itself is unmerged and therefore not released. (scripts/bench-gateway-concurrency.ts:1, 3f3ceb2defbe)

Likely related people:

  • steipete: Introduced the merged gateway concurrency benchmark and authored the reviewed repair; branch blame assigns the new diagnostic behavior to this commit. (role: benchmark introducer and recent area contributor; confidence: high; commits: 3f3ceb2defbe, 556be6d9f9d6; files: scripts/bench-gateway-concurrency.ts, test/scripts/bench-gateway-concurrency.test.ts)
  • vincentkoc: Recent history shows repeated fixes to the gateway CPU scenario runner and strict argument parsing used by the surrounding harness. (role: adjacent scenario-harness contributor; confidence: medium; commits: b8811b7dde14, 010c7f7110d8; files: scripts/check-gateway-cpu-scenarios.mjs, scripts/lib/gateway-bench-runtime.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Confirm the live PR head and complete check state before merge because the supplied GitHub update is dated August 3, 2026, after this August 2, 2026 review.

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 18c9f27 into main Aug 3, 2026
115 of 123 checks passed
@steipete
steipete deleted the codex/fix-bench-gateway-concurrency-probes branch August 3, 2026 00:34
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M 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