Repository navigation
improve(agents): isolate concurrency benchmark workers - #119749
Conversation
7c6a0f4 to
57f0b50
Compare
|
Maintainer reconciliation for exact head
|
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 6:41 PM ET / 22:41 UTC. ClawSweeper reviewWhat this changesThis PR runs each agent-concurrency benchmark scenario in a fresh worker process, validates framed results, and expands lifecycle-cleanup coverage. Merge readinessKeep open: current main still has the original shared-process benchmark, while this PR supplies the linked isolated-worker implementation. The reviewed patch has no actionable correctness or security finding, but its maintainer label and fresh member assignment require human landing judgment. Priority: P3 Review scores
Verification
How this fits togetherThe maintainer benchmark invokes real subagent registration, admission, recovery, and completion paths, then emits JSON measurements. Isolated workers prevent one scenario’s process state or SQLite data from affecting the next measurement. flowchart LR
A[Benchmark command] --> B[Scenario scheduler]
B --> C[Fresh worker process]
C --> D[Subagent lifecycle owners]
D --> E[Validated result frame]
E --> F[JSON benchmark report]
Decision needed
Why: The patch is correct on reviewed source evidence, but the protected maintainer label and fresh member assignment require explicit human handling rather than automated cleanup. Before merge
Agent review detailsSecurityNone. PR surfaceTests +190, Other +780. Total +970 across 4 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the worker-isolation design and land it after the responsible maintainer confirms the exact-head review guidance is fully satisfied. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR improves a maintainer benchmark rather than fixing a user-reported runtime failure; the supplied exact-head benchmark run is relevant validation. Is this the best way to solve the issue? Yes: process isolation fixes benchmark contamination at the measurement boundary without changing the production agent lifecycle owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5ec4d9f82a6b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Native squash merge completed.
|
…cope * origin/main: perf(agents): isolate concurrency benchmark workers (openclaw#119749) fix(diagnostics): preserve OTEL startup failure (openclaw#119747) fix(agents): seed fresh session identity before transcript append (openclaw#119473) fix: steering reaches active runs across agent harnesses (openclaw#119594) fix(cli): report accurate filtered node totals (openclaw#119744) fix(skills): keep installed verdicts scoped to publisher (openclaw#119672) fix(diagnostics): honor signal-specific OTLP protocols (openclaw#119708)
Closes #119568
Issue: #119568
What Problem This Solves
Resolves a maintainer-tooling problem where the agent concurrency benchmark mixed process-global state, detached completion work, and durable SQLite writes across samples. The resulting timings and RSS values could not be attributed to one scenario and overstated percentile confidence.
Why This Change Was Made
The benchmark now uses one fresh worker process per scenario and size, emits schema v2, validates a framed worker result, and separates in-memory spawn registration from isolated durable SQLite registration. Spawn timing ends before completion is released; teardown then proves task, registry, wait, and durable rows are clean. Recovery still exercises interrupted-recovery coordinator routing, and completion dedupe now covers newest-first and oldest-first inputs.
Worker progress is written to stderr so the default multi-minute run remains observable without contaminating JSON stdout.
No production runtime, config, protocol, migration, or package surface changes.
User Impact
Maintainers get comparable agent-concurrency measurements with attributable process high-water RSS, deterministic cleanup, explicit durable-state proof, and honest p50/max reporting for the default five samples. p95/p99 appear only when at least 20 measured samples support them.
Evidence
node scripts/run-vitest.mjs test/scripts/bench-agent-concurrency.test.ts— 7/7 passed.pnpm test:agents:concurrency— 18/18 workers completed, fanout through 64, recovery sweep through 512, exit 0 in 3m39s. Run: https://github.com/openclaw/openclaw/actions/runs/31048999297node scripts/check-changed.mjs -- scripts/bench-agent-concurrency.ts scripts/bench-agent-concurrency-worker.ts test/scripts/bench-agent-concurrency.test.ts— scripts/test-root typechecks, formatting, declarations, lint, and guards passed, exit 0 in 3m15s. Run: https://github.com/openclaw/openclaw/actions/runs/31049318183PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm deadcode:dependencies— passed, exit 0 in 2m57s. Run: https://github.com/openclaw/openclaw/actions/runs/31051128235Review Notes
Schema v2 intentionally removes the misleading process-wide peak RSS field and reports per-worker high-water RSS.
No latency thresholds are added; timings remain advisory.
Recovery full-map ownership optimization is deliberately deferred to a separate PR after this measurement contract lands.
AI-assisted implementation and review
I understand the code and validation evidence