Skip to content

fix(session_card): CI-safe headless chrome flags + timeout retry - #14

Closed
ra-co88 wants to merge 1 commit into
mainfrom
fix/session-card-ci-chrome
Closed

ra-co88 wants to merge 1 commit into
mainfrom
fix/session-card-ci-chrome

Conversation

@ra-co88

@ra-co88 ra-co88 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Standalone follow-up to the corpus-verify restore (now PR-only content on fix/restore-corpus-verify-cli): keeps the CI-hardening changes separate so each PR is reviewable on its own.

Problem: tests/test_session_card.py::test_render_card_chrome_produces_png flaked on the 3.12 CI leg — chrome render timed out after 20s (run 33490519437; recurred on 33499015053 with flags alone; passed on other legs, on the PR run, and on reruns). The renderer launches stock headless Chrome as root in a CI container, which can hang on sandbox/first-run/small-/dev/shm until the cap.

Fix:

  • CI-safe flags: --no-sandbox, --disable-dev-shm-usage, isolated --user-data-dir, first-run suppressors
  • On timeout: one retry with a 60s window; real failures (non-zero exit, empty screenshot) still fail fast with their own reasons
  • Desktop behavior unchanged: same screenshot path, same virtual-time budget

Test plan: python -m py_compile wallbreaker/tools/session_card.py clean; branch CI green on both legs (run 33499514813 pattern); flake history documented above.

Stock headless chrome running as root in a CI container needs
--no-sandbox (the default sandbox refuses to start), --disable-dev-shm-usage
(small /dev/shm in containers), and an isolated --user-data-dir (first-run
profile waits); without these the renderer can hang until the 20s cap,
which surfaced as a flaky timeout in test_render_card_chrome_produces_png
on the 3.12 CI leg (run 33490519437, then 33499015053 with the flags
alone - the same test passes on other legs and on reruns).

On timeout, retry once with a 60s window before giving up; real failures
(non-zero exit, empty screenshot) still surface immediately. Desktop
behavior is unchanged: same screenshot path, same virtual-time budget.
@ra-co88

ra-co88 commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded: this change is already on main via #13 (commits 238fafc + 504ef67). The branch was a squashed variant differing only in comments/docstring; after the merge the two versions diverged cosmetically, producing the conflicts. Nothing to merge — closing. The CI hardening remains live on main.

@ra-co88 ra-co88 closed this Sep 2, 2026
@ra-co88
ra-co88 deleted the fix/session-card-ci-chrome branch September 2, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants