Skip to content

CI: install frontend dependencies for overlay rail smoke - #9622

Closed
Apoze wants to merge 1 commit into
unslothai:mainfrom
Apoze:fix/ui-smoke-install-frontend-deps
Closed

Apoze wants to merge 1 commit into
unslothai:mainfrom
Apoze:fix/ui-smoke-install-frontend-deps

Conversation

@Apoze

@Apoze Apoze commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Install the locked frontend dependencies before the self-hosted overlay rail smoke.
  • Limit the install to the banner shard and disable dependency lifecycle scripts.

Motivation

The smoke added by #9246 starts npm run dev, but the normal Studio installation removes studio/frontend/node_modules after building. A clean runner therefore reaches the smoke without Vite and exits with sh: 1: vite: not found before Firefox or WebKit is exercised.

Tests

  • npm ci --ignore-scripts --no-fund --no-audit
  • npm run dev -- --version (vite/8.0.16)
  • playwright_overlay_rail.py with Firefox
  • playwright_overlay_rail.py with WebKit
  • 136 targeted workflow, shard, and trigger tests

@Apoze
Apoze requested a review from danielhanchen as a code owner August 24, 2026 12:08
@Apoze

Apoze commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: ff12f4216e

ℹ️ 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

Copy link
Copy Markdown
Member

Diagnosis confirmed independently. Job 97391286915 step 31 dies in npm run dev, not in a browser:

RuntimeError: vite exited with code 127 before serving http://127.0.0.1:5197/smoke-overlay-rail.html?nostrict
sh: 1: vite: not found

and step 30 (Update banner layout, other engines) drove firefox and webkit successfully in the same job one step earlier, so the libcurl4-openssl-dev ... 404 Not Found in that log is a red herring rather than a broken WebKit.

Verified the fix locally: npm ci --ignore-scripts --no-fund --no-audit in studio/frontend adds 1047 packages in 14s and npm run dev -- --version gives vite/8.0.16. --ignore-scripts is safe, the lockfile has three packages with install scripts (@biomejs/biome, msw, vite/node_modules/fsevents) and none is on the vite dev-server path.

One correction to the motivation, since it matters for where the fix belongs. The install does not remove node_modules. The rm -rf node_modules at studio/setup.sh:1317 is only on the bun-failure path. What actually happens is that frontend-dist-restore reports Cache hit for: fe-dist-Linux-4b4d8135... and restored a prebuilt frontend; setup.sh will report it up to date, so setup.sh takes the step "frontend" "up to date" return at line 1121 and never reaches substep "building frontend..." at line 1265. The dependencies are never installed in the first place. That also explains why #9246's own run passed: it logged Cache not found for input keys for the same key and therefore built.

Two small things:

  • The new step is inserted between the # The rail's block gutter, in the two engines ... comment and the step that comment documents, so the comment ends up attached to the install.
  • On a cold cache setup.sh has already installed the dependencies, and an unconditional npm ci deletes and refetches them for nothing.

#9654 covers both of those (conditional on the binary, plus a check that the install actually landed) and adds an up-front refusal in start_vite so a missing toolchain does not read as a vite crash. Suggest closing this in favour of that one. The diagnosis here was right and got there first.

@danielhanchen

Copy link
Copy Markdown
Member

Closing this as superseded by #9654, which is now merged as f2fa54f8c. To be clear about the order things happened in: you filed this first, and your diagnosis and your fix were both correct. #9654 landed a superset while this was open, which is on us, not on you.

What #9654 added on top of your step:

  • The install is conditional on node_modules/.bin/vite rather than unconditional. On the cold-cache path setup.sh has already installed these, and a bare npm ci would delete and refetch them for nothing.
  • It fails loudly when the toolchain is still missing afterwards, instead of letting the next step come back as vite exited with code 127. That reads as vite crashing rather than as a setup step nobody ran, which is what made this take a day to attribute.
  • It moved the comment, which in this PR ended up attached to the install step rather than to the step it documents.

The mechanism you can take credit for pinning: frontend-dist-restore reports a cache hit, so setup.sh returns at the step "frontend" "up to date" path and never reaches the frontend build, which is the only place it installs the dev dependencies. They are never installed in the first place. That also explains why #9246 was green on its own run and red on every run after: its run logged a cache miss for the same key and therefore built.

Thanks for chasing this one down. The libcurl4-openssl-dev 404 in that log is a genuinely convincing red herring and it would have been easy to stop there.

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