Skip to content

Inline images: give a slow sandbox image load a bounded grace and say why it timed out - #16923

Merged
danielhanchen merged 2 commits into
mainfrom
ci-inline-images-load-wait
Nov 7, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
ci-inline-images-load-wait

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Inline images (windows-latest) failed twice today on unrelated PRs (#16921, and the fix/webkitgtk-long-thread-scrolling branch), both times on the same check and only in Firefox:

{"browser": "firefox", "platform": "win32", "failed": 1, ...}
{"name": "filename: 日本語.png", "passed": false, "error": "Error: Condition timed out"}

Chromium, WebKit, Chrome and Edge passed in the same job, the other 58 Firefox checks passed (café.png right before it, 100%.png right after it), and other runs of the same workflow pass the check. So it is a slow load on that runner rather than a wrong URL, which would fail every run. loaded() gives each sandbox image 5 s and the timeout message said nothing about what state the image was in, so the logs cannot tell a missing image from a slow one or a wrong one.

Change

tests/studio/fixtures/inline-image-client.js, test only:

  • loaded() keeps its 5 s per load, and a load that runs over may borrow up to 10 s more from a 15 s grace shared by the whole run. One slow load is covered; one browser adds at most 15 s, so the five-browser step (about 90 s when healthy, measured on run Inline images today: 72 to 88 s) stays far inside its 5 minute limit. A flat longer timeout would not do: with every load failing, 15 s per load runs past the harness's 180 s wait for the report (measured below), so a real breakage would lose the per-check report entirely.
  • On a timeout, until() now appends the image state: (no image), or complete, naturalWidth and the start of currentSrc.

Nothing else in the checks changes, and the other until() callers keep the old 5 s and message.

Testing

tests/studio/playwright_inline_images.py --browsers chromium firefox on Linux, from a clean npm ci:

result
this branch (15 s grace) chromium 59 of 59, firefox 59 of 59
this branch (30 s grace at the time), every success load expecting a 33 px image (sabotage) report in 112 s, 14 failed checks, e.g. Condition timed out (complete=true naturalWidth=32 src=blob:...)
the flat 15 s version of this change, same sabotage no report: the harness gave up at 180 s waiting for it

What this cannot prove here: the Windows Firefox slowness itself, which this machine cannot reproduce. If it persists past 15 s, the next failure will at least name the image state.

… why it timed out

Firefox on windows-latest has timed out the first non-Latin filename check at
the 5 s load wait twice today while every other browser and filename passed.
A slow load may now borrow up to 10 s from a 30 s grace shared by the run, so
a run where every load fails still reports before the harness stops waiting,
and a timeout names the image state (missing, still loading, or wrong size).
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T08:01:40.787473Z abb82a1 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 6, 2026
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 6, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 6, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 6, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 6, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 6, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 6, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 6, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 6, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 6, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 7, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 7, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 7, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 7, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 7, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 7, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 7, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 7, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 7, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Nov 7, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5dfba66894

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const start = performance.now();
await until(
() => image()?.complete && image()?.naturalWidth === width,
5000 + Math.max(0, Math.min(loadGraceMs, 10000)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bound the grace against the full suite's report deadline

When a regression causes sandbox images to remain missing or have the wrong dimensions, the shared grace still allows the suite to exceed the harness deadline. With all seven configured codecs supported, there are 35 reachable loaded() waits even when the scope-switch check stops on its first failure: their base timeouts consume 175 seconds, and this grace adds another 30 seconds before other checks and overhead. However, tests/studio/playwright_inline_images.py waits only 180 seconds for #report[data-complete="true"], so it closes the browser before finish() and loses all per-check results, including the new diagnostics. Budget the extra waiting against an overall deadline, or adjust the harness deadline to accommodate the actual worst-case run.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right that the comment overclaimed: with every codec supported and every load failing, the 5 s base alone (35 x 5 s) is already past the harness's 180 s report wait, so no grace size can promise a report there, and the "Browser simulations" step's 5 minute limit ends that case either way. The grace does not cause that, but it should not make it worse by much, so in abb82a1 the shared grace is 15 s instead of 30 s and the comment now says what it bounds: one slow load is still covered, and one browser adds at most 15 s to a step that takes about 90 s for all five browsers when healthy. Chromium and Firefox still pass 59 of 59 locally.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: abb82a1485

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 9299877 into main Nov 7, 2026
@danielhanchen
danielhanchen deleted the ci-inline-images-load-wait branch November 7, 2026 08:06
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.

1 participant