Repository navigation
refactor(tooling): unify benchmark and process helpers - #125491
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Land-ready verification is complete for Proof run:
Kept local by design: raw persisted-PID Telegram SUT/tunnel signaling and caller-owned liveness/grace/registry/failure policy. Process helpers outside the seven requested sites remain a separate audit tranche. No live-provider or user-visible behavior is involved. LOC: production +0/-0; tests +57/-503; tooling +475/-840. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 10:06 PM ET / August 18, 2026, 02:06 UTC. ClawSweeper reviewWhat this changesThis PR consolidates benchmark support code and process-tree termination helpers used by repository tooling scripts. Merge readinessKeep open for explicit maintainer handling: this fresh maintainer-owned tooling refactor has no source-backed blocking defect, but its protected label and shared cross-platform process-cleanup impact warrant final exact-head validation. Priority: P3 Review scores
Verification
How this fits togetherRepository automation launches benchmark workers and build/package helper processes, then parses results and terminates child process trees across platforms. The shared helpers sit below those scripts and determine how timeouts, forwarded signals, and cleanup propagate. flowchart LR
A[Benchmark and tooling scripts] --> B[Shared benchmark harness]
A --> C[Managed child process helper]
B --> D[Worker processes and reports]
C --> E[Process group or task tree]
E --> F[Cleanup result]
D --> G[Automation outcome]
Decision needed
Why: The supplied context omits the latest ClawSweeper comment body, and the protected maintainer label requires explicit human handling rather than automatic closure or merge. Before merge
Agent review detailsSecurityNone. PR surfaceTests -446, Other -365. Total -811 across 19 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one shared benchmark and process-tree helper, with its owner suite protecting platform signaling while callers retain their local timeout, liveness, and cleanup policies. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates internal benchmark and process-cleanup implementations rather than reporting a user-facing defect. Is this the best way to solve the issue? Yes: sharing canonical lifecycle mechanics while retaining caller-specific timeout and liveness policy is the cleanest owner boundary found. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 75fcaba9191e. 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
|
|
Merged via squash.
|
* refactor(tooling): unify benchmark and process helpers * test(tooling): harden process fixture readiness * fix(tooling): keep benchmark harness types private
What Problem This Solves
Resolves repository-tooling duplication where two benchmarks independently maintained the same CLI/worker/report lifecycle and seven scripts independently reimplemented process-group plus Windows task-tree signaling.
Why This Change Was Made
One benchmark harness now owns bounded option parsing, timing summaries, worker sentinel decoding/spawn limits, deterministic progress, report emission, and failed-trailer handling while each benchmark keeps its domain schema and invariant validation. The existing managed-child primitive now supports foreground children and diagnostic callbacks, allowing all seven named scripts to use it directly while keeping their timeout grace, liveness polling, registries, and cleanup policy local.
Repeated caller-local Windows signaling tests were removed; the managed owner suite now covers taskkill, forced taskkill, foreground-child signaling, and group-error diagnostics. Caller boundary tests still exercise real timeout, descendant, forwarded-signal, cleanup, and report behavior.
User Impact
No product behavior changes. Maintainers get one benchmark lifecycle, one cross-platform child-tree signaling primitive, less duplicated test machinery, and consistent process cleanup across build, package, QA, and wrapper scripts.
Evidence
node scripts/check-changed.mjs --base origin/main --head HEADpassed after rebase, including script/test typechecks, two targeted script-lint batches, erasability over 506 script implementations, and Docker E2E boundary guards.pnpm buildpassed end-to-end in 16m44s, including all nine tsdown invocations, package/plugin surfaces, runtime postbuild, Control UI build, and CLI startup metadata generation.Kept local by design:
ChildProcesshandle and owns explicit persisted-PID liveness/wait/escalation policy.Production LOC: +0/-0 | Tests: +57/-503 | Tooling: +475/-840