Skip to content

[3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages - #3704

Merged
integry merged 3 commits into
mainfrom
3703/claude-opus-5-5-ci-chromium-install-times-20261118-1101-hz1
Nov 18, 2026
Merged

integry merged 3 commits into
mainfrom
3703/claude-opus-5-5-ci-chromium-install-times-20261118-1101-hz1

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3703

Branch: 3703/claude-opus-5-5-ci-chromium-install-times-20261118-1101-hz1
Commits: ✅ Changes committed (f4cbb25)


AI Processing Completed

Execution Details:

Summary:
The retry in scripts/ci-install-chromium.sh now downloads from a different apt mirror than the one that stalled, instead of repeating the same fetch. It hasn't run on a real hosted runner yet; that will happen in this PR's CI. Upstream main is the same commit as this branch's base, so nothing there had fixed this already.

What changed

  • Mirror demotion before the retry: after a timed-out first attempt, the script stops apt as before. It then rewrites every mirror list the runner's apt sources point to. On the hosted ubuntu-24.04 image that is /etc/apt/apt-mirrors.txt. Whichever mirror apt would try first (lowest priority:, and every tied one) moves to the end. The other mirrors keep their order and the moved one stays as a last resort.
  • Fallback: if only that one mirror is listed, http://archive.ubuntu.com/ubuntu/ goes first.
  • Why this works: apt always picks the lowest priority. Entries without a priority come last, and ties are broken by a per-machine random choice, so the same mirror wins every time. I took this from apt's source code.
  • Failure handling: if no mirror list is configured, or it can't be read or rewritten, the step prints a warning and retries as before. Two timed-out attempts still fail the step with the same error, any other failure still ends it straight away, and the time limit is unchanged. Self-hosted runners still only download the browser.
  • Minimum-speed limit: apt has no such setting for HTTP, so this wasn't an option.

Font packages: I kept --with-deps unchanged. Which fonts are installed changes how the browser tests render, and I couldn't check here that the suites pass without them on ubuntu-24.04. Moving away from the slow mirror covers the library packages too, not only the fonts.

Testing

  • Real apt: I set up two local mirrors with apt 2.6 in the container. With the 30-second timeout, a mirror that sends one byte per second still held the first download until it was killed. After the script's rewrite, the second download fetched from the healthy mirror in under a second.
  • Script tests: test/ciChromiumInstall.test.mjs now runs against a scratch /etc/apt (set through a new PROPR_CI_APT_ETC variable). New cases cover:
    • the hosted mirror list being reordered between attempts, or left alone when the first attempt succeeds
    • both attempts timing out
    • running as root
    • tied, missing and extra priority tags
    • lists in both apt source-file formats, and a list shared by several sources being rewritten only once
    • a missing, empty or unwritable mirror list
  • Results: 10 of 10 tests pass, and the new tests fail against the old script. The related CI routing, workflow and release-validation tests pass, shellcheck --exclude=SC2016 is clean, and npm run release:verify passes.

I also added an Unreleased "Fixed" entry to CHANGELOG.md. There are no visual previews, since nothing visible changes.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • scripts/ci-install-chromium.sh (+88/−1)
  • Low risk (2 files)
    • CHANGELOG.md (+13/−0)
    • test/ciChromiumInstall.test.mjs (+168/−8)

Diff size: 3 files changed, +269/−9 lines

View task for the run's logs and conversation.


This PR was created automatically by ProPR after processing issue #3703.


💡 Need changes?

Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!

…fferent apt mirror than the one that stalled, instead of repeating the same fetch. It hasn't run on a real hosted runner yet; that will happen in this PR's CI. Upstream `main` is the same commit as this branch's base, so nothing there had fixed this already.

What changed
- Mirror demotion before the retry: after a timed-out first attempt, the script stops apt as before. It then rewrites every mirror list the runner's apt sources point to. On the hosted `ubuntu-24.04` image that is `/etc/apt/apt-mirrors.txt`. Whichever mirror apt would try first (lowest `priority:`, and every tied one) moves to the end. The other mirrors keep their order and the moved one stays as a last resort.
- Fallback: if only that one mirror is listed, `http://archive.ubuntu.com/ubuntu/` goes first.
- Why this works: apt always picks the lowest priority. Entries without a priority come last, and ties are broken by a per-machine random choice, so the same mirror wins every time. I took this from apt's source code.
- Failure handling: if no mirror list is configured, or it can't be read or rewritten, the step prints a warning and retries as before. Two timed-out attempts still fail the step with the same error, any other failure still ends it straight away, and the time limit is unchanged. Self-hosted runners still only download the browser.
- Minimum-speed limit: apt has no such setting for HTTP, so this wasn't an option.

Font packages: I kept `--with-deps` unchanged. Which fonts are installed changes how the browser tests render, and I couldn't check here that the suites pass without them on `ubuntu-24.04`. Moving away from the slow mirror covers the library packages too, not only the fonts.

Testing
- Real apt: I set up two local mirrors with apt 2.6 in the container. With the 30-second timeout, a mirror that sends one byte per second still held the first download until it was killed. After the script's rewrite, the second download fetched from the healthy mirror in under a second.
- Script tests: `test/ciChromiumInstall.test.mjs` now runs against a scratch `/etc/apt` (set through a new `PROPR_CI_APT_ETC` variable). New cases cover:
  - the hosted mirror list being reordered between attempts, or left alone when the first attempt succeeds
  - both attempts timing out
  - running as root
  - tied, missing and extra priority tags
  - lists in both apt source-file formats, and a list shared by several sources being rewritten only once
  - a missing, empty or unwritable mirror list
- Results: 10 of 10 tests pass, and the new tests fail against the old script. The related CI routing, workflow and release-validation tests pass, `shellcheck --exclude=SC2016` is clean, and `npm run release:verify` passes.

I also added an Unreleased "Fixed" entry to `CHANGELOG.md`. There are no visual previews, since nothing visible changes.
@propr-dev propr-dev Bot changed the title 🔨 [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages ✅ [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages Nov 18, 2026

integry commented Nov 18, 2026

Copy link
Copy Markdown
Owner

/ultrafix goal=8 max=3

@propr-dev propr-dev Bot added the ultrafix label Nov 18, 2026
@propr-dev

propr-dev Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 3)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev propr-dev Bot changed the title ✅ [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages 🔨 [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages Nov 18, 2026
@propr-dev

propr-dev Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR addresses stalled apt downloads by changing mirror priorities before the existing bounded retry. It needs a localized correctness fix: the newly supported unranked-list path can explicitly prefer the same mirror that stalled.

✅ Bounded failure propagation — Two timed-out attempts still fail, and other installation errors retain their exit status.

✅ Host isolation — The self-hosted path exits before any apt configuration changes.

✅ Recovery coverage — Tests cover normal priority demotion, missing lists, write refusal, and root execution.

The supplied current-head status reports 27 passed checks and no failures or pending checks. This review is static; no commands were run. The linked issue’s acceptance criteria are truncated, so assessment is limited to the visible objective and changed behavior.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Unranked lists can retry the stalled mirror

  • Category: correctness

  • Required behavior: The changed recovery behavior must move the stalled preferred mirror behind alternatives so the retry uses a different source.

  • Evidence: scripts/ci-install-chromium.sh:rewrite_mirror_list, specifically if (k == 0 && !listed) and the subsequent demoted-entry output; test/ciChromiumInstall.test.mjs, the unranked.txt fixture.

    1. Use the supplied fixture containing unranked Azure and archive.ubuntu.com entries. On a runner whose initial selection is Azure, a slow Azure download times out and enters mirror recovery.
    2. With no explicit priorities, the function marks both entries demoted. Consequently, k == 0; because archive.ubuntu.com is already present, listed prevents insertion of a preferred fallback.
    3. The function emits the original order with explicit priorities: Azure becomes priority 1 and archive.ubuntu.com becomes priority 2.
    4. The retry therefore prefers the same stalled Azure mirror and can exhaust the second timeout despite an available alternative.

    static trace: This follows directly from the supplied fixture and rewrite branches. The starting selection is a reachable tie outcome under the selection behavior documented in the changed script. The existing test explicitly expects Azure to remain first and scripts the retry result as success; it never checks which mirror apt would fetch from. The timeout bounds the failure but does not provide mirror recovery.

  • Minimum fix: Handle the all-tied/unranked case so the retry demonstrably prefers a different mirror from the timed-out attempt, including when the fallback is already listed. Add a regression covering that selection rather than only the rewritten text.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Exercise actual apt mirror selection

A small isolated integration test could verify that apt consumes the rewritten list and selects the intended endpoint. Current tests provide useful shell-control coverage, but stub the entire installation command. This additional coverage is optional; the demonstrated ordering defect can be corrected and regression-tested locally.

Score

The implementation preserves important failure and host boundaries, and current checks pass. One reachable recovery path still defeats the central mirror-switching behavior.

Score: 6/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 51s
  • Tokens: 35,308 (34,133 in / 1,175 out)
  • Cost: $0.29

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix F1 S1

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 6d98f5f

Addressed 1 AI review comment (IDs: 6977961763)

Addressed finding F1

Summary of Changes

I fixed F1. When every mirror in the list is tied, the retry now starts from a mirror the first attempt could not have used, even when archive.ubuntu.com is already listed. node --test test/ciChromiumInstall.test.mjs passes (11/11), and the new tests fail on the branch's previous script. This still hasn't run on a real hosted runner; the PR's CI will be the first time.

The fix (scripts/ci-install-chromium.sh)

  • Why the old code failed: when no entry outranks another, apt picks one of them using a seed tied to the machine. The script can't tell which mirror stalled, so no listed mirror is safe to put first.
  • What it does now: in that case it puts the first fallback mirror that isn't in the list at the front. That is archive.ubuntu.com, or security.ubuntu.com when archive.ubuntu.com is already listed. The hosted runners already list security.ubuntu.com as a full mirror.
  • Same bug, second case: a list whose only entry is archive.ubuntu.com used to be retried against that same mirror. It now goes to security.ubuntu.com first.
  • Remaining limit: if both fallbacks are already in the tied list, there's no safe choice left. The script then warns that the retry may reuse the slow mirror, and retries anyway.

Tests (test/ciChromiumInstall.test.mjs)

  • I added a helper that works out which mirrors apt could try first: the lowest explicit priority, or every entry when none has one. For each fixture, it checks that the retry has exactly one first choice and that it's not a mirror the first attempt could have used. So the tests check what apt would fetch from, not just the rewritten text.
  • The unranked.txt expectation now has security.ubuntu.com first. I added an archive-only.txt fixture, and a test for the case where both fallbacks are already tied, which checks the warning and the unchanged list.
  • The tests ran under mawk, which is the awk on hosted Ubuntu.

I also updated the CHANGELOG entry to describe the fallback order. No preview was made because nothing here is visual.

Review digest

Risk-tiered paths

  • High risk: none
  • Normal risk (1 file)
    • scripts/ci-install-chromium.sh (+23/−8)
  • Low risk (2 files)
    • CHANGELOG.md (+4/−3)
    • test/ciChromiumInstall.test.mjs (+56/−4)

Diff size: 3 files changed, +83/−15 lines


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @propr-ultrafix
  • Time: 4m 55s
  • Tokens: 513,873 (504,294 in / 9,579 out)
  • Cost: $0.53

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…y now starts from a mirror the first attempt could not have used, even when `archive.ubuntu.com` is already listed. `node --test test/ciChromiumInstall.test.mjs` passes (11/11), and the new tests fail on the branch's previous script. This still hasn't run on a real hosted runner; the PR's CI will be the first time.

I fixed F1. When every mirror in the list is tied, the retry now starts from a mirror the first attempt could not have used, even when `archive.ubuntu.com` is already listed. `node --test test/ciChromiumInstall.test.mjs` passes (11/11), and the new tests fail on the branch's previous script. This still hasn't run on a real hosted runner; the PR's CI will be the first time.

**The fix (`scripts/ci-install-chromium.sh`)**
- **Why the old code failed:** when no entry outranks another, apt picks one of them using a seed tied to the machine. The script can't tell which mirror stalled, so no listed mirror is safe to put first.
- **What it does now:** in that case it puts the first fallback mirror that isn't in the list at the front. That is `archive.ubuntu.com`, or `security.ubuntu.com` when `archive.ubuntu.com` is already listed. The hosted runners already list `security.ubuntu.com` as a full mirror.
- **Same bug, second case:** a list whose only entry is `archive.ubuntu.com` used to be retried against that same mirror. It now goes to `security.ubuntu.com` first.
- **Remaining limit:** if both fallbacks are already in the tied list, there's no safe choice left. The script then warns that the retry may reuse the slow mirror, and retries anyway.

**Tests (`test/ciChromiumInstall.test.mjs`)**
- I added a helper that works out which mirrors apt could try first: the lowest explicit priority, or every entry when none has one. For each fixture, it checks that the retry has exactly one first choice and that it's not a mirror the first attempt could have used. So the tests check what apt would fetch from, not just the rewritten text.
- The `unranked.txt` expectation now has `security.ubuntu.com` first. I added an `archive-only.txt` fixture, and a test for the case where both fallbacks are already tied, which checks the warning and the unchanged list.
- The tests ran under mawk, which is the `awk` on hosted Ubuntu.

I also updated the CHANGELOG entry to describe the fallback order. No preview was made because nothing here is visual.

PR: #3704
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The PR addresses stalled hosted-runner mirrors by changing mirror priority before the existing bounded retry. It is merge-ready within the supplied scope, conditional on the five pending checks completing successfully; no current checks have failed.

✅ Targeted recovery — Mirror rewriting occurs only after the first timed-out hosted install, after apt cleanup. Successful installs and the self-hosted path remain unchanged.

✅ Failure propagation preserved — Non-timeout failures retain their exit status, and two timed-out attempts still fail the step.

✅ Focused regression coverage — Added tests cover priority ordering, tied and singleton lists, root execution, and unavailable mirror lists.

This review used static analysis only; no commands were run. The linked issue’s acceptance criteria are truncated, so requirements beyond the visible text could not be assessed.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Verify selection with real apt

The firstChoices helper in test/ciChromiumInstall.test.mjs reproduces the implementation’s priority assumptions. An optional integration test using apt and controlled local mirrors would independently verify that rewriting the list changes the retry’s actual download source. The existing tests already provide useful coverage of rewriting and retry control flow.

S3: 🟢 Qualify the changelog guarantee

CHANGELOG.md says the retry “therefore downloads from a different source,” but the implementation explicitly warns that it may reuse the slow mirror when all entries are tied and both fallbacks are already listed. Qualifying this sentence would align the release note with that documented exception; this is a non-blocking documentation refinement.

Score

The change is focused, preserves existing failure behavior, and includes substantial regression coverage. Static review found no merge blockers; hosted validation remains pending.

Score: 8/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 23s
  • Tokens: 36,998 (36,496 in / 502 out)
  • Cost: $0.26

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S2 S3

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Nov 18, 2026
@propr-dev propr-dev Bot changed the title 🔨 [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages ✅❽ [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages Nov 18, 2026
@propr-dev

propr-dev Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from main into 3703/claude-opus-5-5-ci-chromium-install-times-20261118-1101-hz1 in commit 6c6c836

Conflicting Files

  • CHANGELOG.md

Resolution Summary

I resolved the one merge conflict, in CHANGELOG.md. No other file in the repository has conflict markers.

What the conflict was about: both branches added entries under ## [Unreleased] in the same spot.

  • This PR added a ### Fixed entry: a slow hosted apt mirror no longer fails the Chromium install in CI, because the retry in scripts/ci-install-chromium.sh now downloads from a different mirror.
  • main added a ### Changed entry (the agent image now bundles Codex CLI 0.170.0, Claude Code 2.1.327 and Antigravity CLI 1.5.11) and a ### Removed entry (OpenCode GLM 5.3 Flash Free is gone and saved selections move to DeepSeek V4.1 Flash Free).

How I resolved it: I kept every entry from both sides, unchanged. ## [Unreleased] now lists ### Changed, then ### Removed, then the PR's ### Fixed.

Why: the entries cover separate changes, so nothing needed to be merged or rewritten. The order follows the Keep a Changelog convention the file says it uses, where Changed and Removed come before Fixed.

Checks: the file has no conflict markers left, and npm run release:verify passes ("Release metadata is consistent for v0.9.2").


🤖 Resolution Details

  • Model: Claude Opus 5.5
  • Time: 4m 11s

View Task Execution


System-triggered merge conflict resolution

@propr-dev propr-dev Bot changed the title ✅❽ [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages 🔨 [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages Nov 18, 2026
…ium-install-times-20261118-1101-hz1

Automatically resolved merge conflicts after merging target branch into PR branch.
Resolved conflicts in:
- CHANGELOG.md

PR: #3704
Model: Claude Opus 5.5
@propr-dev propr-dev Bot changed the title 🔨 [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages ✅❽ [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages Nov 18, 2026
@integry
integry merged commit b3b5301 into main Nov 18, 2026
44 checks passed
@integry
integry deleted the 3703/claude-opus-5-5-ci-chromium-install-times-20261118-1101-hz1 branch November 18, 2026 18:02
@propr-dev propr-dev Bot changed the title ✅❽ [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages [3703 by Claude Opus 5.5] CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Chromium install times out when the hosted runner's apt mirror stalls on font packages

1 participant