Skip to content

fix(ci): allow Testbox queue admission for one hour - #164587

Merged
steipete merged 1 commit into
mainfrom
fix/w6-testbox-window
Oct 4, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/w6-testbox-window

Conversation

@steipete

@steipete steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

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.mjs computes 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

  • New regressions in 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).
  • Blacksmith Testbox: build, 1,492 related tests (one native-Windows-only case skipped), pnpm check:workflows (actionlint, zizmor, workflow guards), and check-changed pass. One real lease confirmed the idle cap still applies.
  • The 60-minute window itself is proven with controlled clocks, not a deployed saturation run.
  • Production/tooling +9/-7 LOC; tests +36; docs +15/-3.

cc @vincentkoc since this adjusts the admission window from #162678; the concurrency and idle-spend caps are unchanged.

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.
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 3, 2026 22:40
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: S labels Oct 3, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 3, 2026, 6:46 PM ET / 22:46 UTC.

ClawSweeper review

What this changes

This 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
Reviewed head: ac92405cf39d73b214d8c0a658d5d09c15bdf50c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused policy adjustment with useful boundary coverage and no actionable introduced defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The verified repository-admin author is exempt from ordinary external-contributor proof. Controlled-clock tests cover the changed admission owner and actual workflow guards; the reported real lease covers the unchanged idle cap, and a deployed saturated-queue result is expressly unclaimed. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The verified repository-admin author is exempt from ordinary external-contributor proof. Controlled-clock tests cover the changed admission owner and actual workflow guards; the reported real lease covers the unchanged idle cap, and a deployed saturated-queue result is expressly unclaimed. No stored-data contract changes.
Evidence reviewed 9 items Pinned introduced change: The merge-base-to-head diff changes the admission window and its diagnostics, documentation, and tests; runner selection, concurrency groups, runtime limits, action pins, and permissions are unchanged.
Current main still needs the change: Fetched main retains ADMISSION_AGE_MS = 10 * 60_000. Admission computes expiry from workflow creation time and rejects at or beyond that deadline; the PR therefore supplies behavior absent from current main.
Production enforcement and retained limits: All five workflows consume the admission expiry and use the same >= deadline guard before checkout. The shared policy still assigns 32 slots, confines high-memory work to four of those slots, and caps idle time at 15 minutes. Assignment does not renew expiry.
Findings None None.
Security None None.

How this fits together

Testbox 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +36, Docs +12, Config 0, Other +2. Total +50 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 36 0 +36
Docs 2 15 3 +12
Config 5 5 5 0
Generated 0 0 0 0
Other 1 4 2 +2
Total 9 60 10 +50

Review metrics

Metric Value Why it matters
Queue allowance 10 → 60 minutes; running-job and idle limits unchanged The extra 50 minutes applies to admission age without extending an assigned runner's execution deadline.

Technical review

Best 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.

Labels

Label changes:

  • add P2: This is a bounded remote-testing workflow improvement for saturated queues, with existing spending ceilings preserved.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The verified repository-admin author is exempt from ordinary external-contributor proof. Controlled-clock tests cover the changed admission owner and actual workflow guards; the reported real lease covers the unchanged idle cap, and a deployed saturated-queue result is expressly unclaimed. No stored-data contract changes.

Label justifications:

  • P2: This is a bounded remote-testing workflow improvement for saturated queues, with existing spending ceilings preserved.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The verified repository-admin author is exempt from ordinary external-contributor proof. Controlled-clock tests cover the changed admission owner and actual workflow guards; the reported real lease covers the unchanged idle cap, and a deployed saturated-queue result is expressly unclaimed. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduced change: The merge-base-to-head diff changes the admission window and its diagnostics, documentation, and tests; runner selection, concurrency groups, runtime limits, action pins, and permissions are unchanged. (scripts/ci-testbox-budget.mjs:17, ac92405cf39d)
  • Current main still needs the change: Fetched main retains ADMISSION_AGE_MS = 10 * 60_000. Admission computes expiry from workflow creation time and rejects at or beyond that deadline; the PR therefore supplies behavior absent from current main. (scripts/ci-testbox-budget.mjs:17, 88415783fb41)
  • Production enforcement and retained limits: All five workflows consume the admission expiry and use the same >= deadline guard before checkout. The shared policy still assigns 32 slots, confines high-memory work to four of those slots, and caps idle time at 15 minutes. Assignment does not renew expiry. (.github/workflows/ci-check-testbox.yml:109, ac92405cf39d)
  • Meaningful regression coverage: The new cases cover delayed hosted admission for every profile and execute the actual workflow Bash guards with controlled clocks at 35, 59, and 60 minutes. The captured commit reports ten baseline failures, 22 passing tests after the change, and 1.58 seconds for the one-worker command. These are author-reported results; no tests were executed during this read-only review. (test/scripts/ci-testbox-budget.test.ts:97, ac92405cf39d)
  • Accepted operating tradeoff: The captured PR body explicitly accepts that abandoned requests younger than one hour can hydrate, while preserving the idle ceiling and caller-cleanup requirement. Its source identity is 8184feab6e8ee291a886e9a35b4d2622821946d6627322451e5e6e556053c683. A separate GitHub permission read verified steipete has repository admin permission, resolving the inconsistent author-association metadata. This acceptance covers the current narrow change. Public docs: docs/ci/runners.md. (docs/ci/runners.md:21, ac92405cf39d)
  • Related merged work remains distinct: fix(ci): cap Testbox concurrency and idle spend #162678 established the spending controls. fix(ci): keep admitted Testboxes alive and enforce current workflow limits #163021 subsequently removed the post-checkout expiry recheck and enforced maintained workflow refs. Neither implements the longer queue-admission window; this PR preserves their controls. (scripts/ci-testbox-budget.mjs:82, d6411f28a12c)

Likely related people:

  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 5e10298 into main Oct 4, 2026
177 of 181 checks passed
@steipete
steipete deleted the fix/w6-testbox-window branch October 4, 2026 00:18
@steipete

steipete commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant