Repository navigation
fix(ci): cap Testbox concurrency and idle spend - #162678
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 1, 2026, 3:06 PM ET / 19:06 UTC (Revision 7). ClawSweeper reviewWhat this changesThe PR limits paid Testbox jobs through shared concurrency, admission expiry, shorter idle retention, smaller routine runners, and a separate high-memory workflow. Merge readiness⛔ Blocked before merge - 2 items remain The controls remain useful and absent from main. The previous documentation finding is resolved, and the routine deadline tradeoff is explicitly accepted. No blocking code defect was found; required test-cost reporting remains incomplete. Priority: P2 Review scores
Verification
How this fits togetherTestbox workflows prepare remote machines for OpenClaw validation commands. Dispatch requests pass through admission before runner allocation, hydration, and SSH execution. flowchart TD
A[Remote proof request] --> B[Hosted admission]
B --> C[Runner and deadline validation]
C --> D[Shared concurrency slots]
D --> E[Expiry check and hydration]
E --> F[Remote validation command]
F --> G[Idle expiry and SSH cleanup]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +224, Docs +113, Config +428, Other +130. Total +895 across 22 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one shared admission policy and the accepted routine/high-memory split, with measured test costs recorded alongside validation evidence. Do we have a high-confidence way to reproduce the issue? Not applicable to a product bug reproduction: current main and the latest release visibly lack the proposed shared spending controls. Is this the best way to solve the issue? Yes. Shared admission before paid allocation fits the existing workflow boundary, preserves PR validation routes, and keeps memory-heavy proof explicit. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9f5f633e54d0. LabelsLabel changes: No label 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
HistoryReview history (6 earlier review cycles)
|
|
Merged via squash.
|
* fix(ci): cap Testbox concurrency and idle spend * test(ci): align workflow guards with Testbox admission * fix(ci): declare optional Testbox admission inputs * fix(ci): narrow Testbox CLI rejection errors * test(ci): verify admitted Testbox workflow behavior * fix(ci): reserve large Testboxes for memory-heavy proof * fix(ci): default routine Testboxes to one hour * docs(ci): clarify Testbox profiles and total job deadlines Co-authored-by: Vincent Koc <[email protected]>
Extend the shared dispatch-age window from ten to sixty minutes so a requester can survive a saturated queue without resetting the abandonment deadline at runner assignment. Keep the 32 shared slots, four high-memory slots, runtime limits, and fifteen-minute idle ceiling unchanged. Update all five expiry diagnostics and the CI docs. Exercise delayed hosted admission and the actual workflow Bash guards across every profile, including refusal at the exact sixty-minute boundary. Regression for 32dc6c8 (#162678). On an isolated Blacksmith Testbox, the baseline budget fails ten new cases; the fixed suite passes all 22 (75 ms test time, 1.58 s one-worker command wall time). The build, all 1,492 related tests, workflow sanity checks, and check-changed pass; one native-Windows-only case is skipped on Linux. No workflow deployment or saturated live queue measurement is claimed.
Extend the shared dispatch-age window from ten to sixty minutes so a requester can survive a saturated queue without resetting the abandonment deadline at runner assignment. Keep the 32 shared slots, four high-memory slots, runtime limits, and fifteen-minute idle ceiling unchanged. Update all five expiry diagnostics and the CI docs. Exercise delayed hosted admission and the actual workflow Bash guards across every profile, including refusal at the exact sixty-minute boundary. Regression for 8a2095c (openclaw#162678). On an isolated Blacksmith Testbox, the baseline budget fails ten new cases; the fixed suite passes all 22 (75 ms test time, 1.58 s one-worker command wall time). The build, all 1,492 related tests, workflow sanity checks, and check-changed pass; one native-Windows-only case is skipped on Linux. No workflow deployment or saturated live queue measurement is claimed.
What Problem This Solves
General Testbox dispatches default to the 32-class even for routine proof, can allocate runners without a shared concurrency budget, retain idle capacity for up to 90 minutes, and let Windows callers select arbitrary runner labels. Old queued requests can also begin expensive hydration after the caller has stopped waiting.
User Impact
Routine remote proof defaults to the 16-class and a 60-minute total-job deadline, including hydration. The explicit 32-class high-memory workflow can occupy at most four slots inside a shared maximum of 32 active Testbox jobs across five maintained lease workflows. All profiles have a 15-minute idle ceiling and admission expiry after 10 minutes. Concurrency replacement does not cancel active jobs; the outer GitHub deadline can still terminate an active SSH command. Each concurrency slot retains one pending request; a newer request can replace that pending request. Hash collisions can queue work below the overall ceiling.
The limits apply to workflows containing this change. Historical refs, other repositories, alternate workflows, and probe jobs remain outside this pool; an organization-wide cap still requires provider enforcement.
Why This Change Was Made
A lightweight hosted admission job validates lease identity, runner choice, dispatch age, and runtime before scheduling paid capacity. All five workflows use the same finite GitHub concurrency namespace, then recheck expiry before hydration and bound the provider idle timer. Windows dispatches allow only the existing 8- and 16-class runners. ARM and build leases also close their SSH sessions on exit.
The standard default drops from four hours to one hour; an explicit workflow
timeout_minutesinput can still select 1–240 minutes. Managed Crabbox 0.69.0 cannot forward arbitrary workflow inputs, including this input, and--ttldoes not extend the GitHub job. The high-memory full-suite workflow retains its four-hour default. The explicit full-suite Testbox PR gate retains its measured high-memory allocation; routine commands and changed gates use the smaller default. A larger runner is not a workaround for needing more time. The sizing audit found sampled median/p75 memory peaks of 6.2/12.8 GiB against the 8-class's 7.66 GiB. Lease-duration percentiles include idle retention, so the one-hour default is an operating choice, not a claimed active-runtime percentile. The CI limits and Crabbox skills require evidence for large-runner exceptions and reject generic failures or timeouts as sizing signals. Native CLI workflow selection requires a separate high-memory entrypoint; it reuses the existing setup actions and hydration script. Expired queued requests can still incur runner startup time before the second expiry check.Evidence
Historical Author-Reported Proof
FORCE_COLOR=0; forced-color numeric output is a pre-existing issue in the unchanged gate parser.a9262a7b93433a0c4898c37e7851e5091409e958. Fresh 16-class proof passed onc8a6f847ddbc8f29cd47e1b5fa2c76fa79c2f8f4: 4 observed CPUs, 15.42 GiB RAM, 15-minute idle cap, all 16 admission tests passed, and the task-owned lease completed. The subsequent runtime-default change passed 17 focused tests; no new paid lease was needed to repeat the already-verified sizing and hydration path. These older live runs are not exact-head proof of the new runtime default.Maintainer Correction and Review Disposition
9f43e3b56ffd95ac1a3efa8bcaa8f1a83fee745fpreserves the original PR ancestry and changes onlydocs/ci.mdanddocs/ci/local-proof.md(+21/-10). It corrects the stale 32-class/four-hour routine description, preserves measured capacity attribution, and distinguishes the outer deadline, idle limit, and managed CLI limitations. No runtime, workflow, default, or CI policy changed in this correction.9f43e3b56ffd95ac1a3efa8bcaa8f1a83fee745f: 47 successful jobs, 24 skipped, no failed jobs. Docs job passed formatting, config-doc baseline, plugin inventory and the complete docs-check command, including MDX/link checks. Both required check-run and Security Review aggregate status are successful. No local application checks or new Testbox proof have been run.cb15a68b7838ad40eee584a55343c95e7c1c6ce5. Its two-doc finding is addressed. The maintainer explicitly retains the 60-minute total routine deadline, including hydration, as an operating policy with the documented memory-justified long path. Active SSH does not waive the outer deadline. No guaranteed four-hour routine-runtime contract is claimed.scripts/ci-testbox-budget.mjswrites the existing external Testbox idle timer and GitHub Actions outputs, not an OpenClaw SQLite schema or application persistence model.9f43e3b56ffd, confirms the docs finding is resolved, the deadline tradeoff is accepted, and there are no code or security findings. Its repeated migration flag is source-rejected as above. Its per-file test-cost reporting request remains a disclosed limitation: original isolated one-worker measurements have not been recovered, and shared CI timings do not satisfy that measurement. The maintainer's scoped direction retains the original proof without replay and limits this correction to two docs plus available hosted timing; no claim is made that the missing isolated measurements were produced.cb15a68b7838ad40eee584a55343c95e7c1c6ce5: 47 successful jobs, 24 conditionally skipped, no failures, including the required aggregate. Actionlint also passed.check-docsjob wall time was 210 seconds; the CI job envelope was 584 seconds. These are available hosted timings, not isolated test-file measurements, summed billing, or a performance comparison. Historical focused-test and live-proof captures above have not been independently recovered for this correction.