Repository navigation
refactor(scripts): share gateway benchmark runtime - #117769
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed August 1, 2026, 11:29 PM ET / August 2, 2026, 03:29 UTC. ClawSweeper reviewWhat this changesThe branch moves common Gateway benchmark configuration, child-process, probe, trace, and output-buffer helpers into one shared runtime module, while preserving distinct startup and restart benchmark flows and fixing startup records split across output chunks. Merge readinessKeep this maintainer-labeled, assigned PR open for normal maintainer review. Current Priority: P3 Review scores
Verification
How this fits togetherThe Gateway benchmark scripts launch a local Gateway subprocess, probe readiness, parse logs and traces, then emit startup or restart measurements. The new shared runtime centralizes common CLI, fixture, process, probe, trace, and line-buffer handling used by both lifecycle-specific scripts. flowchart LR
Inputs[Benchmark command options] --> Shared[Shared benchmark runtime]
Shared --> Startup[Startup benchmark]
Shared --> Restart[Restart benchmark]
Startup --> Gateway[Gateway subprocess]
Restart --> Gateway
Gateway --> Signals[Probe results and log records]
Signals --> Results[Benchmark measurements]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +27, Other -209. Total -182 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Land one shared benchmark-runtime module after the normal maintainer review and exact-head CI complete, keeping startup and restart lifecycle measurements as separate callers of the same common helpers. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors benchmark tooling rather than reporting a user-facing defect. The branch includes a focused regression case for the concrete split-output condition, and existing restart tests cover the shared buffering semantics. Is this the best way to solve the issue? Yes. Centralizing the genuinely duplicated benchmark helpers while leaving lifecycle-specific startup and restart measurement logic in their callers is the narrowest maintainable repair; current main still carries the duplicated implementations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 14322647cd6c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* refactor(scripts): share gateway benchmark runtime * fix(scripts): keep benchmark helper types private
Consolidates duplicated gateway benchmark infrastructure while preserving the distinct startup and restart lifecycles. Fixes startup output records split across stream chunks. Production LOC: +681/-890 (net -209); tests +27. Blacksmith proof: 111 focused tests, check:changed, and full build passed. Two independent xhigh reviews: clean, best fix.