Repository navigation
fix(ci): allow Testbox queue admission for one hour - #164587
Conversation
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.
|
🦞👀 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: needs maintainer review before merge. Reviewed October 3, 2026, 6:46 PM ET / 22:46 UTC. ClawSweeper reviewWhat this changesThis PR extends Testbox queue admission to 60 minutes and updates workflow diagnostics, CI documentation, and deadline regression coverage. Merge readiness✅ Ready for maintainer review The PR remains useful: current main still rejects requests after 10 minutes. No introduced correctness or security defect was found, and the maintainer explicitly accepts the bounded increase in abandoned-request hydration. Priority: P2 Review scores
Verification
How this fits togetherTestbox admission turns remote testing requests into bounded GitHub Actions runner leases. A shared policy supplies capacity slots, runner choices, runtime limits, and an expiry that workflows check before checkout and hydration. flowchart TD
A[Remote testing request] --> B[Hosted admission policy]
B --> C[Shared capacity slot]
C --> D[Runner assigned]
D --> E{Dispatch age under 60 minutes}
E -->|Yes| F[Checkout and hydration]
E -->|No| G[Reject with recovery guidance]
F --> H[Runtime and idle limits]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +36, Docs +12, Config 0, Other +2. Total +50 across 9 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one dispatch-based admission deadline in the shared policy while retaining existing capacity, runtime, idle, and cleanup controls. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main deterministically rejects admission at ten minutes, including a still-waiting request delayed for 35 minutes. No live saturation scenario was executed during review. Is this the best way to solve the issue? Yes. Adjusting the existing policy owner is the narrowest solution, and the tests exercise both hosted admission and the workflow deadline guards without adding a second lease watcher. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 88415783fb41. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
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
Since #162678, a Testbox lease is rejected when its runner starts more than 10 minutes after admission ("Testbox waited more than 10 minutes; request a fresh lease"). Under this week's queue saturation runners routinely took longer, so most queued Testbox requests were refused after waiting, including requests whose client was still waiting for them, and agents had to re-request and wait again.
Why This Change Was Made
scripts/ci-testbox-budget.mjscomputes the admission expiry from workflow creation time, and the "Reject expired Testbox admission" step in five Testbox workflows enforces it before checkout. The window bounds abandoned requests (a request whose client gave up should not hydrate an unused runner), but 10 minutes is shorter than normal queue latency under load.The available client and provider surfaces (Crabbox warmup delegation, the Blacksmith CLI, and the pinned begin/run actions) do not expose a queued-requester liveness signal, so this change keeps a wall-clock bound rather than assuming abandonment detection: the allowance is now 60 minutes, at the existing policy owner, with updated diagnostics in all five workflows and the CI docs. Exactly 60 minutes still rejects; runner assignment does not reset the clock.
Unchanged protections: the 32 shared slots and the four-slot high-memory subset, runner choices, job runtime defaults and maxima, the 15-minute idle ceiling (which still reaps a hydrated lease nobody uses), and active SSH protection. Accepted tradeoff: a request abandoned less than an hour ago can still hydrate, and is then bounded by the idle ceiling.
User Impact
Maintainers and agents can get a Testbox during saturated queues instead of being refused after a 10-minute wait. Idle spend after hydration is capped exactly as before.
Evidence
test/scripts/ci-testbox-budget.test.ts: 10 fail on the old policy (35-minute waits rejected), all 22 pass after (35 and 59 minutes accepted, 60 rejected).pnpm check:workflows(actionlint, zizmor, workflow guards), andcheck-changedpass. One real lease confirmed the idle cap still applies.cc @vincentkoc since this adjusts the admission window from #162678; the concurrency and idle-spend caps are unchanged.