Skip to content

fix(ci): prevent cold hosted Android builds timing out - #136307

Merged
steipete merged 1 commit into
mainfrom
codex/ci-android-hosted-build-budget
Sep 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/ci-android-hosted-build-budget

Conversation

@steipete

@steipete steipete commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Related: #136273

What Problem This Solves

Resolves a problem where cold GitHub-hosted Android CI runs could be cancelled before finishing the complete phone build and lint workload. The affected android-build-play job reached GitHub's 20-minute deadline after Play assemble/lint passed and ThirdParty assembly finished; ThirdParty lint and the final benchmark/shared-library phase did not finish.

Why This Change Was Made

The hosted path deliberately runs three separate Gradle processes to release each variant's build state and stay within memory limits. Its job admission still used the same 20-minute budget as the Blacksmith path. Only current build-play jobs routed to GitHub-hosted runners now receive 35 minutes. Blacksmith and all other Android tasks, including frozen-target compatibility, retain 20 minutes.

The condition evaluates the current attempt at job admission: a failed-job retry can reuse the original preflight matrix while switching runner backends. No Gradle commands, lint coverage, matrix rows, parallelism, caches, dependencies or runner registrations are added or removed.

User Impact

Developers retain the complete Android validation workload on hosted fallback runners. There is no application behavior or configuration change. All three unchanged Gradle phases now completed on an exact-head GitHub-hosted runner with no restored Gradle User Home cache; required PR CI remains a separate merge gate.

Evidence

The original hosted Play job was stopped by the explicit GitHub annotation “The job has exceeded the maximum execution time of 20m0s.” Its empty-cache run completed Play assemble/lint in 12m2s, then assembled ThirdParty and entered lint. No compiler, test assertion or Gradle build failure was observed before cancellation. The earlier checkout HTTP 429 was a separate, recovered failure.

The existing hosted-budget guard fails on the old workflow with android: expected 20 to be 35. Five focused existing guards pass after the change: hosted budgets, runner routing, matrix fanout, complete Android build/lint coverage, and frozen-target compatibility. The budget table covers hosted override/retry/manual/untrusted routes and all eight current/compat task spellings. Pinned actionlint, formatting, docs listing and diff checks pass. Independent Codex P0–P2 review found no actionable findings.

No application production code changed. Workflow metadata is +3/−1 lines; tests are +62/−7; documentation expands the existing Android workload paragraph.

Exact-head hosted completion: build-play job 100255509082 passed at 39824f9ab80eed6e18f1206dcdb4b9f5b03ac568 in 19m11s (17m31s for its build step). The logs record all three complete Gradle invocations: Play assemble/lint 10m37s, ThirdParty assemble/lint 6m6s, and benchmark/shared-library assemble/lint 45s. Gradle User Home had no cache match and the wrapper was downloaded; SDK and pnpm caches were warm, and later phases reused outputs created earlier in the same job. This particular successful run also fits under the old 20-minute ceiling; the earlier explicit deadline failure remains separate evidence for the repair.

This addresses the latest ClawSweeper cold-hosted proof/rank-up request. It does not make the whole manual workflow green: its Windows test job and one Android ThirdParty branch-coordination test failed. The latter exposed a test-only synchronous-publication assumption; its separate two-line correction in #136335 passed 244 native JVM/Room executions and independent review. The Windows failure remains separately investigated, with no speculative timeout increase.

Required CI is green: run33632209786, attempt2 completed successfully on the exact head, including the selected-lane gate. All seven retried jobs actually passed; the totals of163successes/9skips also include carried-forward successes. The original six Checkout failures and separate Blacksmith Windows fixture startup failure remain retained. Its same-head hosted retry passed; that does not prove the missing sentinel error's root cause or claim a Windows repair.

The latest ClawSweeper review recognizes the hosted completion. Its route-alignment maintenance risk is covered by the existing expanded guard table, which checks the timeout alongside actual runner routing. Fresh same-head Codex P0–P2 review is scoped-clean.

Adjacent follow-up: the existing same-repository/untrusted-author routing condition can disagree with the Gradle backend/sticky-disk conditions. This was identified from source, not a reproduced CI incident, and is not changed or claimed fixed here. The observed hybrid-retry route agrees across those conditions.

@steipete steipete self-assigned this Sep 2, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: S maintainer Maintainer-authored PR labels Sep 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. 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 Sep 2, 2026
@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 9:49 AM ET / 13:49 UTC.

ClawSweeper review

What this changes

The PR assigns a 35-minute timeout only to GitHub-hosted Android build-play jobs, documents the policy, and expands CI guard coverage for runner routes and matrix tasks.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

The route-aware timeout matches the Android runner-routing policy and is covered across hosted, retry, dispatch, trusted, and untrusted paths. Current main still has the fixed 20-minute timeout, so this maintainer PR remains necessary.

Priority: P2
Reviewed head: 39824f9ab80eed6e18f1206dcdb4b9f5b03ac568

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, guarded CI reliability repair with no actionable correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The repository state records the author as a member, so the external-contributor proof gate does not apply; the PR body nevertheless links an exact-head hosted aggregate-build completion and the prior timeout cancellation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The repository state records the author as a member, so the external-contributor proof gate does not apply; the PR body nevertheless links an exact-head hosted aggregate-build completion and the prior timeout cancellation.
Evidence reviewed 5 items Introduced timeout policy: Only build-play on routes resolving to GitHub-hosted Ubuntu receives 35 minutes; the runner expression immediately above defines those hosted routes.
Current main behavior: Fetched current main still gives the Android job a fixed 20-minute timeout, so this behavior is not already implemented upstream.
Guard coverage: The guard checks GitHub, hybrid-retry, manual, fork, untrusted-author, and Blacksmith routes, and verifies the timeout split across all eight Android task spellings.
Findings None None.
Security None None.

How this fits together

The Android CI job selects a runner from repository, event, author, and retry context, then applies a timeout before running one Gradle matrix task. The aggregate build task is the heaviest Android build-and-lint path; the other tasks keep the existing budget.

flowchart LR
  A[Pull request or dispatch] --> B[Runner route selection]
  B --> C[Android matrix task]
  C --> D[Route-aware timeout]
  D --> E[Gradle build and lint]
  E --> F[CI result]
Loading

Before merge

  • Resolve merge risk (P2) - The change intentionally increases the hosted aggregate-build deadline; a future runner-routing change must keep its timeout predicate aligned with the selected runner.
Agent review details

Security

None.

PR surface

Tests +55, Docs 0, Config +2. Total +57 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 62 7 +55
Docs 1 1 1 0
Config 1 3 1 +2
Generated 0 0 0 0
Other 0 0 0 0
Total 3 66 9 +57

Review metrics

Metric Value Why it matters
Production versus test delta workflow production +2; tests +55; docs net 0 The production growth is limited to the route-aware timeout expression and its invariant comment; the expanded matrix coverage is test-only.

Merge-risk options

Maintainer options:

  1. Retain the route-tested timeout (recommended)
    Merge the bounded hosted build-play timeout policy once the normal exact-head CI gate is satisfied.

Technical review

Best possible solution:

Keep the guarded 35-minute budget for hosted aggregate Android builds while retaining the 20-minute limit for Blacksmith and every other Android task.

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

Yes. The supplied CI evidence identifies a hosted aggregate build stopped at the fixed 20-minute limit, and current main retains that same timeout path.

Is this the best way to solve the issue?

Yes. Applying the longer budget at job admission for the same hosted routes is narrower than changing Gradle work, matrix fanout, or every Android task budget.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against db907da599e3.

Labels

Label justifications:

  • P2: This repairs a bounded hosted Android CI reliability failure without changing application behavior.
  • merge-risk: 🚨 automation: The patch changes Android CI job duration according to GitHub Actions routing context.
  • 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 repository state records the author as a member, so the external-contributor proof gate does not apply; the PR body nevertheless links an exact-head hosted aggregate-build completion and the prior timeout cancellation.

Evidence

What I checked:

  • Introduced timeout policy: Only build-play on routes resolving to GitHub-hosted Ubuntu receives 35 minutes; the runner expression immediately above defines those hosted routes. (.github/workflows/ci.yml:4990, 39824f9ab80e)
  • Current main behavior: Fetched current main still gives the Android job a fixed 20-minute timeout, so this behavior is not already implemented upstream. (.github/workflows/ci.yml:4988, db907da599e3)
  • Guard coverage: The guard checks GitHub, hybrid-retry, manual, fork, untrusted-author, and Blacksmith routes, and verifies the timeout split across all eight Android task spellings. (test/scripts/ci-workflow-guards.test.ts:4290, 39824f9ab80e)
  • Documentation alignment: The updated CI documentation describes the three aggregate Gradle invocations and the hosted-only 35-minute budget. Public docs: docs/ci.md. (docs/ci.md:385, 39824f9ab80e)
  • CI-area history: Recent workflow history includes multiple preceding CI-routing changes by Peter Steinberger, supporting routing to this area contributor without treating the branch commit as historical introduction proof. (.github/workflows/ci.yml:4987, 06f897f562d7)

Likely related people:

  • 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-09-02T13:02:21.734Z sha 39824f9 :: needs maintainer review before merge. :: none

@steipete
steipete merged commit e29d55a into main Sep 2, 2026
598 of 609 checks passed
@steipete

steipete commented Sep 2, 2026

Copy link
Copy Markdown
Contributor 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 maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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