Skip to content

[3411 by Claude Opus 5.5] CI robustness: stop the Chromium install from hanging for an hour on GitHub-hosted runners. Check current upstream main first. - #3412

Merged
integry merged 3 commits into
mainfrom
3411/claude-opus-5-5-ci-robustness-stop-the-ch-20261101-0257-fou
Nov 1, 2026
Merged

integry merged 3 commits into
mainfrom
3411/claude-opus-5-5-ci-robustness-stop-the-ch-20261101-0257-fou

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3411

Branch: 3411/claude-opus-5-5-ci-robustness-stop-the-ch-20261101-0257-fou
Commits: ✅ Changes committed (8b08b7f)


AI Processing Completed

Execution Details:

Summary:
The Chromium install on GitHub-hosted runners is now bounded and retries once, so a stalled apt mirror fails or recovers within 10 minutes instead of holding the PR for an hour. Upstream main is still the same commit as this branch's base, and its install script is identical to the old one here, so nothing upstream had already fixed this.

What changed

  • scripts/ci-install-chromium.sh, hosted path:
    • It writes an apt drop-in at /etc/apt/apt.conf.d/99propr-ci-network-timeouts with Acquire::Retries "3", Acquire::http::Timeout "30" and Acquire::https::Timeout "30". A drop-in is needed because Playwright runs apt-get through sudo, which drops apt's command-line settings. If the drop-in can't be written, the script fails rather than installing without limits.
    • Each npx playwright install --with-deps chromium attempt is capped at 3 minutes. If one times out, the script stops any leftover apt-get/dpkg, finishes any half-done package setup (capped at 60 seconds), and tries once more.
    • Package names still come from Playwright, and no Ubuntu release name appears anywhere, so the move to Ubuntu 26 won't matter.
  • Fail-closed: any failure other than a timeout ends the step with its own exit code and isn't retried. If both attempts time out, the step fails with an error.
  • Self-hosted path: unchanged; it still runs npx playwright install chromium.
  • Step timeouts (timeout-minutes: 10) on every step that installs Chromium:
    • pr-build-check.yml: the PWA smoke-test install (two 3-minute attempts plus cleanup fit inside it)
    • pr-test-on-label.yml: the browser-test install
    • desktop-release-guard.yml: both installs
  • .propr/setup.sh: the nightly and labelled docs-validation jobs install Chromium through this script rather than in a separate step, so I capped its browser download at 10 minutes there instead. It falls back to an unbounded download on machines without timeout. This goes slightly beyond what the issue listed; it's how I covered the nightly workflow.
  • Tests:
    • New test/ciChromiumInstall.test.mjs, also added to test:unit. It runs the script with sudo, timeout and npx stubbed out and checks the apt settings, the retry, the fail-closed cases and the unchanged self-hosted path. It also checks that every Chromium install step in every workflow has a timeout of 15 minutes or less, and that the two attempts fit inside the step's limit.
    • In test/ciRunnerRouting.test.mjs I removed the hosted-runner assertion, which the new file now covers.
  • CHANGELOG: a "CI: Chromium install no longer hangs for an hour" entry under [Unreleased] → Fixed. There's no CI/tooling heading, so I used a bold "CI:" label.

Checks

  • The new tests pass (7/7). Run against the old script, 3 of them fail, so they really test the change.
  • The related workflow-contract suites pass (289 + 26 tests, 0 failures).
  • shellcheck v0.10.0 is clean on both scripts, and bash -n passes.
  • ESLint reports nothing on the two test files.
  • actionlint v1.7.7 (an older release than CI's) only flagged the macos-15-intel runner label, on lines this change doesn't touch.

Nothing ran on a real GitHub-hosted runner, so whether the 30-second apt timeouts are enough on their own against that mirror stall is unproven. If they aren't, the 3-minute cap and retry are the backstop.

There's no visual change, so I made no previews.

Detailed Logs:

  • Conversation: 91 messages
  • Session: 02ce24ad-b987-4786-8090-edf95230bb27

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3411-2026-11-01T03-04-09-819Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3411-2026-11-01T03-04-09-819Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: The Chromium install on GitHub-hosted runners is now bounded and retries once, so a stalled apt mirror fails or recovers within 10 minutes instead of holding the PR for an hour. Upstream `main` is sti...


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


💡 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!

…ies once, so a stalled apt mirror fails or recovers within 10 minutes instead of holding the PR for an hour. Upstream `main` is still the same commit as this branch's base, and its install script is identical to the old one here, so nothing upstream had already fixed this.

What changed

- `scripts/ci-install-chromium.sh`, hosted path:
  - It writes an apt drop-in at `/etc/apt/apt.conf.d/99propr-ci-network-timeouts` with `Acquire::Retries "3"`, `Acquire::http::Timeout "30"` and `Acquire::https::Timeout "30"`. A drop-in is needed because Playwright runs apt-get through sudo, which drops apt's command-line settings. If the drop-in can't be written, the script fails rather than installing without limits.
  - Each `npx playwright install --with-deps chromium` attempt is capped at 3 minutes. If one times out, the script stops any leftover `apt-get`/`dpkg`, finishes any half-done package setup (capped at 60 seconds), and tries once more.
  - Package names still come from Playwright, and no Ubuntu release name appears anywhere, so the move to Ubuntu 26 won't matter.
- Fail-closed: any failure other than a timeout ends the step with its own exit code and isn't retried. If both attempts time out, the step fails with an error.
- Self-hosted path: unchanged; it still runs `npx playwright install chromium`.
- Step timeouts (`timeout-minutes: 10`) on every step that installs Chromium:
  - `pr-build-check.yml`: the PWA smoke-test install (two 3-minute attempts plus cleanup fit inside it)
  - `pr-test-on-label.yml`: the browser-test install
  - `desktop-release-guard.yml`: both installs
- `.propr/setup.sh`: the nightly and labelled docs-validation jobs install Chromium through this script rather than in a separate step, so I capped its browser download at 10 minutes there instead. It falls back to an unbounded download on machines without `timeout`. This goes slightly beyond what the issue listed; it's how I covered the nightly workflow.
- Tests:
  - New `test/ciChromiumInstall.test.mjs`, also added to `test:unit`. It runs the script with sudo, `timeout` and npx stubbed out and checks the apt settings, the retry, the fail-closed cases and the unchanged self-hosted path. It also checks that every Chromium install step in every workflow has a timeout of 15 minutes or less, and that the two attempts fit inside the step's limit.
  - In `test/ciRunnerRouting.test.mjs` I removed the hosted-runner assertion, which the new file now covers.
- CHANGELOG: a "CI: Chromium install no longer hangs for an hour" entry under [Unreleased] → Fixed. There's no CI/tooling heading, so I used a bold "CI:" label.

Checks

- The new tests pass (7/7). Run against the old script, 3 of them fail, so they really test the change.
- The related workflow-contract suites pass (289 + 26 tests, 0 failures).
- shellcheck v0.10.0 is clean on both scripts, and `bash -n` passes.
- ESLint reports nothing on the two test files.
- actionlint v1.7.7 (an older release than CI's) only flagged the `macos-15-intel` runner label, on lines this change doesn't touch.

Nothing ran on a real GitHub-hosted runner, so whether the 30-second apt timeouts are enough on their own against that mirror stall is unproven. If they aren't, the 3-minute cap and retry are the backstop.

There's no visual change, so I made no previews.
@integry

integry commented Nov 1, 2026

Copy link
Copy Markdown
Owner

/review

@propr-dev

propr-dev Bot commented Nov 1, 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 1, 2026

Copy link
Copy Markdown
Contributor Author

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

Overall Evaluation

Ready to merge within the visible scope. The PR bounds Chromium installation while preserving failure propagation and the self-hosted package boundary. The supplied current-head status reports 38 passed checks and no failures or pending checks.

✅ Layered time limits — Workflow step deadlines cap installation time, while hosted installs add apt network limits and one retry after a timeout.

✅ Preserved host isolation — Self-hosted and unset runner environments still take the browser-only path before any privileged commands.

✅ Focused regression coverage — Tests exercise success, timeout recovery, exhausted retries, ordinary failures, and unavailable sudo.

The supplied issue objective is truncated; this assessment covers its visible requirements and the complete supplied diff. No commands were run.

Merge blockers

No merge blockers.

Suggestions

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

S1: 🟢 Bound cleanup termination explicitly

In scripts/ci-install-chromium.sh, timeout 60s dpkg --configure -a lacks a kill-after grace period. If configuration does not exit on SIGTERM, cleanup can exceed the 60 seconds assumed by the timing test and prevent the second attempt. Adding --kill-after would strengthen recovery. This is optional because the enclosing workflow’s 10-minute deadline still bounds the original hang.

S2: 🟢 Cover multiline workflow commands

The workflow scanner in test/ciChromiumInstall.test.mjs only detects installation commands appearing on the same line as run:. Parsing YAML and inspecting each step’s complete command would also cover future run: | blocks. The current changed installation steps are covered, so this is a future coverage improvement.

Score

The implementation addresses the visible objective, preserves relevant safety boundaries, and has focused tests backed by passing current-head checks. No merge-blocking regression was demonstrated.

Score: 9/10


🤖 Review Details

  • Model: GPT-6 Astra
  • Time: 24s
  • Tokens: 42,946 (42,408 in / 538 out)
  • Cost: $0.34

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 S1 S2

🤖 Review by ProPR

@integry

integry commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Main now has the 0.9.1 release prep (#3414, tagged v0.9.1). Please merge current main into this branch and make sure the CHANGELOG entry for the Chromium install fix sits under the new empty ## [Unreleased] section (add a ### Fixed heading there), not under ## [0.9.1]. Keep ## [0.9.1] and everything below it byte-identical to main. Re-run test/ciChromiumInstall.test.mjs and test/ciRunnerRouting.test.mjs afterwards.

@propr-dev

propr-dev Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 585ad5b

Summary of Changes

I brought current main (2ee3573, the v0.9.1 release prep) into this branch. The Chromium install entry now sits under ## [Unreleased] → ### Fixed, and both tests you asked for pass.

Why this isn't a real merge: git merge and git fetch fail here because the worktree's git directory is read-only. The local origin/main ref already pointed at the latest commit, so I applied main's changes directly to the files. When ProPR commits, the result will be an ordinary commit, not a merge commit with two parents.

  • Files only main changed (32): copied byte-for-byte from origin/main, including the six new macOS-preview files. A check found no differences from main in any of them.
  • package.json: combined with a three-way merge. Main's version bump to 0.9.1 and the dependency bumps sit alongside this branch's addition of test/ciChromiumInstall.test.mjs to test:unit. There were no conflicts.
  • CHANGELOG.md: I took main's file and added ### Fixed with the Chromium install entry under the empty ## [Unreleased]. A byte comparison confirms ## [0.9.1] and everything below it is identical to main.
  • Files only this branch changed: the workflows, .propr/setup.sh, scripts/ci-install-chromium.sh and the two tests are unchanged. Main didn't touch any of them.

Tests:

  • test/ciChromiumInstall.test.mjs: 7/7 pass.
  • test/ciRunnerRouting.test.mjs: 51/51 pass.

I didn't create a visual preview, because this change has nothing a user would see.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @integry
  • Time: 2m 51s
  • Tokens: 308,533 (305,929 in / 2,604 out)
  • Cost: $0.31

Undo Changes • 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
Processing comment ID: 6554709875✓

… into this branch. The Chromium install entry now sits under `## [Unreleased]` → `### Fixed`, and both tests you asked for pass.

I brought current `main` (2ee3573, the v0.9.1 release prep) into this branch. The Chromium install entry now sits under `## [Unreleased]` → `### Fixed`, and both tests you asked for pass.

**Why this isn't a real merge:** `git merge` and `git fetch` fail here because the worktree's git directory is read-only. The local `origin/main` ref already pointed at the latest commit, so I applied main's changes directly to the files. When ProPR commits, the result will be an ordinary commit, not a merge commit with two parents.

- **Files only main changed (32):** copied byte-for-byte from `origin/main`, including the six new macOS-preview files. A check found no differences from main in any of them.
- **`package.json`:** combined with a three-way merge. Main's version bump to 0.9.1 and the dependency bumps sit alongside this branch's addition of `test/ciChromiumInstall.test.mjs` to `test:unit`. There were no conflicts.
- **`CHANGELOG.md`:** I took main's file and added `### Fixed` with the Chromium install entry under the empty `## [Unreleased]`. A byte comparison confirms `## [0.9.1]` and everything below it is identical to main.
- **Files only this branch changed:** the workflows, `.propr/setup.sh`, `scripts/ci-install-chromium.sh` and the two tests are unchanged. Main didn't touch any of them.

**Tests:**
- `test/ciChromiumInstall.test.mjs`: 7/7 pass.
- `test/ciRunnerRouting.test.mjs`: 51/51 pass.

I didn't create a visual preview, because this change has nothing a user would see.

PR: #3412
Comment by: @integry (ID: 6554709875)
Model: Claude Opus 5.5
@propr-dev

propr-dev Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from main into 3411/claude-opus-5-5-ci-robustness-stop-the-ch-20261101-0257-fou in commit 7eb919e

Conflicting Files

  • CHANGELOG.md

Resolution Summary

I resolved the one conflict, in CHANGELOG.md. A search of the whole repository finds no other conflict markers.

What the conflict was about: Both branches changed the area just below ## [Unreleased]:

  • This PR added a ### Fixed entry there: "CI: Chromium install no longer hangs for an hour" (bounded apt retries and timeouts, a 3-minute limit with one retry for playwright install, 10-minute step timeouts, and a bounded download in .propr/setup.sh).
  • main made the v0.9.1 release. It moved its earlier unreleased entries into ## [0.9.1] - 2026-11-01 and left [Unreleased] empty.

Git flagged the PR's new entry against main's empty section.

How I resolved it: I kept the PR's ### Fixed entry under ## [Unreleased], directly above main's ## [0.9.1] - 2026-11-01 section, and removed the markers. Main's 0.9.1 and older sections are unchanged and appear only once.

Why: Main's side had no content of its own in that spot; it was just the emptied section after the release. The PR's Chromium fix isn't part of 0.9.1, so it belongs under [Unreleased], and Keep a Changelog puts that section above the latest release.

Check: The file has no conflict markers, and the release headings are in order ([Unreleased], [0.9.1], [0.9.0], …). Compared with main, CHANGELOG.md differs only by the 11 added lines of the PR's entry.


🤖 Resolution Details

  • Model: Claude Opus 5.5
  • Time: 2m 29s

View Task Execution


System-triggered merge conflict resolution

…tness-stop-the-ch-20261101-0257-fou

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

PR: #3412
Model: Claude Opus 5.5
@integry
integry merged commit dcd3bb9 into main Nov 1, 2026
50 checks passed
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 robustness: stop the Chromium install from hanging for an hour on GitHub-hosted runners. Check current upstream main first.

1 participant