Skip to content

fix(ci): keep admitted Testboxes alive and enforce current workflow limits - #163021

Merged
vincentkoc merged 1 commit into
mainfrom
fix/testbox-admission-lifecycle
Oct 2, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/testbox-admission-lifecycle

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes Testbox leases expiring during checkout after admission, and updated wrapper calls allocating historical workflows that bypass the spending limits.

User Impact

Routine proof keeps the 16-class, 60-minute job limit and 15-minute idle ceiling. Testbox run and warmup use workflow ref main; explicit historical workflow refs fail with recovery guidance. The source capsule still installs and tests the selected checkout. Explicit high-memory workflow/job selection remains available.

Maintainer decision (2026-10-02): accept the documented rejection of explicit historical Testbox workflow refs and override of configured historical refs. This is intentional spending-policy enforcement; historical source remains testable through the selected local checkout and source capsule.

Why This Change Was Made

Check queue age before checkout, then let the job and idle deadlines govern admitted work. Enforce the maintained workflow ref before capturing the lease receipt, respecting the final flag value and the boundary between options and payload arguments.

This applies to the updated OpenClaw wrapper. Raw callers, old wrappers and alternate workflows still require provider-side controls. Native Crabbox also needs claim-bound cancellation of newly allocated leases that remain queued beyond ten minutes; this PR does not implement a second lease watcher.

Related: #162678

Evidence

  • Observed valid admission followed by checkout expiry and a post-merge historical workflow using 32-class.
  • New entrypoint/routing regressions reproduced the defects before the fixes; five targeted cases pass in 6.70 seconds wall time.
  • Full budget, wrapper and lease-freshness run: 318 passed, one skipped, three old argument expectations failed in 292.80 seconds. Updated the shared expectation for the enforced ref; those three cases pass in 6.92 seconds. Existing source-capsule, frozen-install and lease-reuse coverage passed.
  • Validation: all planned changed-file gates completed, with the affected test typecheck and lint rerun after fixes; pinned actionlint and zizmor passed.
  • Independent review: no P0/P1 findings. No paid Testboxes or manual CI runs were launched for this change; hosted execution and post-merge savings remain unmeasured.

@vincentkoc vincentkoc self-assigned this Oct 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: S labels Oct 1, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 1, 2026
@clawsweeper

clawsweeper Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 1, 2026, 10:48 PM ET / October 2, 2026, 02:48 UTC (Revision 2).

ClawSweeper review

What this changes

The PR stops queue-expiry checks from terminating admitted Testboxes after checkout and makes the OpenClaw wrapper select current main-branch workflows while preserving the source revision being tested.

Merge readiness

✅ Ready for maintainer review

The repair remains necessary on current main. The recorded maintainer acceptance resolves the previous compatibility blocker, and no actionable introduced defect was found.

Priority: P2
Reviewed head: 9ae9fdb0c3437062fea26280ddbdc92f14434584

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with useful regression coverage, no actionable findings, and an explicitly accepted compatibility tradeoff.
Proof confidence 🌊 off-meta tidepool Not applicable: The MEMBER-authored PR is exempt from external-contributor runtime proof. Configure and workflow-ref routing have regression coverage with filesystem and executable doubles; hosted after-fix execution remains explicitly unmeasured. No stored-data contract or principal authorization boundary changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from external-contributor runtime proof. Configure and workflow-ref routing have regression coverage with filesystem and executable doubles; hosted after-fix execution remains explicitly unmeasured. No stored-data contract or principal authorization boundary changes.
Evidence reviewed 10 items Pinned introduced change: The merge-base-to-head delta removes the post-checkout expiry assertion and enforces the workflow ref before lease-receipt preparation. The original blobs were also inspected.
Current-main defect remains: Configure still validates the original queue deadline after checkout on fetched main. A request admitted shortly before that deadline can therefore fail during idle configuration.
Lifetime controls preserved: All four edited workflows retain the pre-checkout expiry check, shared concurrency admission, job deadlines, and SSH cleanup. Configure still caps the existing external idle-timeout file at 15 minutes without changing its format.
Findings None None.
Security None None.

How this fits together

Testboxes provide remote machines for OpenClaw validation. The wrapper transfers the selected checkout, while GitHub admission, job deadlines, and provider idle limits govern allocation and lifetime.

flowchart TD
  A[Validation request] --> B[OpenClaw wrapper]
  B --> C[Current workflow selection]
  C --> D[Queue admission check]
  D --> E[Checkout and hydration]
  B --> F[Selected source capsule]
  E --> G[Remote validation]
  F --> G
  G --> H[Job and idle deadlines]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +91, Docs +11, Config -8, Other +13. Total +107 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 101 10 +91
Docs 3 13 2 +11
Config 4 0 8 -8
Generated 0 0 0 0
Other 2 14 1 +13
Total 12 128 21 +107

Review metrics

None.

Technical review

Best possible solution:

Keep allocation on maintained workflows while testing the selected source capsule, with queue admission separate from admitted job and idle lifetimes.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main admits a request before checkout and then rechecks the same deadline during configure, allowing checkout duration to invalidate admitted work. Runtime reproduction was not executed in this read-only review.

Is this the best way to solve the issue?

Yes. Removing the redundant post-checkout check preserves bounded lifetime controls, and workflow selection uses the existing wrapper and source-capsule owners under the accepted compatibility policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 949f3f52121b.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded remote-validation lifecycle and spending-policy repair.
  • merge-risk: 🚨 compatibility: Historical workflow-ref commands now fail and configured refs are overridden; the October 2 maintainer decision explicitly accepts this documented change.
  • 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 MEMBER-authored PR is exempt from external-contributor runtime proof. Configure and workflow-ref routing have regression coverage with filesystem and executable doubles; hosted after-fix execution remains explicitly unmeasured. No stored-data contract or principal authorization boundary changes.

Evidence

What I checked:

  • Pinned introduced change: The merge-base-to-head delta removes the post-checkout expiry assertion and enforces the workflow ref before lease-receipt preparation. The original blobs were also inspected. (scripts/crabbox-wrapper.mts:3777, 9ae9fdb0c343)
  • Current-main defect remains: Configure still validates the original queue deadline after checkout on fetched main. A request admitted shortly before that deadline can therefore fail during idle configuration. (scripts/ci-testbox-budget.mjs:81, 949f3f52121b)
  • Lifetime controls preserved: All four edited workflows retain the pre-checkout expiry check, shared concurrency admission, job deadlines, and SSH cleanup. Configure still caps the existing external idle-timeout file at 15 minutes without changing its format. (.github/workflows/ci-check-high-memory-testbox.yml:70, 9ae9fdb0c343)
  • Compatibility acceptance resolves prior review: The captured PR body explicitly records the October 2 maintainer decision accepting rejection of explicit historical refs and override of configured historical refs. Live metadata confirms the same head, MEMBER association, and acceptance text. This covers the unchanged behavior previously awaiting acceptance. (9ae9fdb0c343)
  • Source selection remains independent: The wrapper inserts the maintained ref within the parsed option prefix before recording allocation inputs. Its existing source-capsule path still reconstructs the selected checkout; documentation explains historical-source testing and explicit high-memory workflow selection. Public docs: docs/reference/test/remote-proof.md. (docs/reference/test/remote-proof.md:29, 9ae9fdb0c343)
  • Delegated dependency contract: The introduced blacksmith-ref argument is consumed by Crabbox. GitHub verifies the dependency repository identity and resolves v0.69.0 to this commit; its config contract applies user, repository, environment, then explicit flag values, supporting the wrapper override. (internal/cli/config_blacksmith.go:13, c0be9975da84)

Likely related people:

  • Vincent Koc: Raw commit 32dc6c8 adds scripts/ci-testbox-budget.mjs:24 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 32dc6c861d3e; files: scripts/ci-testbox-budget.mjs)
  • steipete: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-01T22:01:19.115Z sha 9ae9fdb :: blocked before merge. :: none

@vincentkoc
vincentkoc marked this pull request as ready for review October 2, 2026 02:42
@vincentkoc
vincentkoc merged commit d6411f2 into main Oct 2, 2026
189 checks passed
@vincentkoc
vincentkoc deleted the fix/testbox-admission-lifecycle branch October 2, 2026 02:52
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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