Repository navigation
fix(ci): prevent cold hosted Android builds timing out - #136307
Conversation
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 9:49 AM ET / 13:49 UTC. ClawSweeper reviewWhat this changesThe PR assigns a 35-minute timeout only to GitHub-hosted Android Merge readinessThe 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 Review scores
Verification
How this fits togetherThe 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]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +55, Docs 0, Config +2. Total +57 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
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-playjob 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-playjobs 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
39824f9ab80eed6e18f1206dcdb4b9f5b03ac568in 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.