Skip to content

Tests: the titlebar smoke treats Vite outdated pre-bundle 504 as a reload - #16130

Merged
danielhanchen merged 1 commit into
mainfrom
tests-titlebar-smoke-ignores-vite-outdated-dep
Oct 30, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
tests-titlebar-smoke-ignores-vite-outdated-dep

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

Frontend build + bundle sanity fails intermittently at the Titlebar modal blur and window controls (Chromium) step on unrelated PRs (seen on #15994, #16091 and the staging run for #16109). Every time it is the same shape: all modal checks pass, then the final assert not errors trips on

504: http://127.0.0.1:5491/node_modules/.vite/deps/sonner.js?v=...
504: http://127.0.0.1:5491/node_modules/.vite/deps/zustand.js?v=...

with no page error logged. The smoke records every script, stylesheet or font response at 400 or above. When the Vite dev server re-optimizes its dependencies mid-load, it answers in-flight requests for the replaced pre-bundles with 504 Outdated Optimize Dep and then reloads the page. That response is Vite's reload signal, not a missing asset, and the page checks after it pass. It depends on runner timing, so it does not reproduce on demand (a cold cache and the CI step order both passed locally).

Fix

  • tests/studio/_playwright_robust.py: is_vite_outdated_dep(response) matches exactly status 504 with the status text Outdated Optimize Dep. Vite's other 504, Optimize Deps Processing Error, is a real failure and still counts.
  • tests/studio/playwright_titlebar_blur.py: the asset response guard skips only that response. A 404, a 500 or a processing-error 504 is still recorded and still fails the smoke.
  • tests/studio/test_vite_outdated_dep.py pins this:
    • the predicate's truth table;
    • that the smoke's guard keeps the exemption as a single and not ... term;
    • that the installed Vite still sends that status text, so a rename upstream shows up here instead of as a dead exemption.

Verification

  • New tests pass (8 passed, the Vite source check included).
  • Sabotage:
    • With the predicate reduced to status == 504, two rows fail (the processing-error and gateway-timeout cases).
    • With the exemption removed from the smoke, the guard test fails.
  • In a real Chromium page served by a small HTTP server, Playwright reports status_text == "Outdated Optimize Dep" for the first response, and the predicate is true only there. It is false for Optimize Deps Processing Error.
  • python3 tests/studio/playwright_titlebar_blur.py passes with the change.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T14:44:46.111514Z 30be503 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 30be50387f

ℹ️ 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 febcd3e into main Oct 30, 2026
0 of 36 checks passed
@danielhanchen
danielhanchen deleted the tests-titlebar-smoke-ignores-vite-outdated-dep branch October 30, 2026 15:16
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