Skip to content

Speed up yarn test-flows: shard CI, skip marketing, pause UI renderer - #1830

Open
pablo-mayrgundter wants to merge 8 commits into
mainfrom
grok/speed-up-test-flows
Open

Speed up yarn test-flows: shard CI, skip marketing, pause UI renderer#1830
pablo-mayrgundter wants to merge 8 commits into
mainfrom
grok/speed-up-test-flows

Conversation

@pablo-mayrgundter

@pablo-mayrgundter pablo-mayrgundter commented Sep 1, 2026

Copy link
Copy Markdown
Member

Why

playwright-run on main was ~23m wall (18m of tests). Latest green run on main: 188 tests, 34m serial, 2 workers on the paid 8 GB larger runner. A third Chromium there starves the wasm heap. Share is public, so standard ubuntu-24.04 is 4 vCPU / 16 GB and unlimited-free; larger runners are billed even on public repos.

Coverage is unchanged. Shards serve the built docs/ as yarn test-flows-build left it — npx http-server inside that directory, no custom server, no map-stripping.

What

  • Four shards --shard=N/4, each --workers=2, on free ubuntu-24.04. Eight Chromiums across four machines, 2-per-box (the density that stayed green). Packing 4 workers onto 4 vCPU would contend on SwiftShader; more shards buy cores instead.
  • One playwright-build job produces docs/ (SKIP_MARKETING=true). Shards download that artifact and set PLAYWRIGHT_SERVE_ONLY=true.
  • Shards skip Share yarn install. They npm-install @playwright/test@1.56.1 plus http-server into a throwaway .pw-runner prefix (a root npm install still reads Share package.json and dies on ts-jest/babel-jest peers) and run npx http-server with cwd docs/ (Playwright's webServer cwd is the config dir, tools/).
  • Freeze the WebGL loop after the model is ready on dialog/panel specs that do not screenshot the canvas (pauseRenderer: true). Full-page screenshot specs still paint.
  • GoogleDriveConnect no longer double-loads index.ifc.
  • PLAYBOOK workers note was stale: local port is PID-derived, default 4 workers.

CI runtime (this PR)

Wall Notes
main (paid 8 GB, 2 workers, 1 job) ~23m 188 tests, 18m of test time
this PR, 2 shards × 2 workers on 8 GB 11m15s first green after screenshot fix
this PR, 4 shards × 2 workers, each builds 6m32s https://github.com/bldrs-ai/Share/actions/runs/33533380665
this PR, shared docs/ + per-shard yarn 9m24s https://github.com/bldrs-ai/Share/actions/runs/33536856039needs: serializes yarn
this PR, shared docs/ + skip yarn, npx http-server in docs/ 7m08s https://github.com/bldrs-ai/Share/actions/runs/33541535897

Per-shard (this run): 4m52s / 4m46s / 4m51s / 5m09s. Slowest shard: container 25s, npm install 3s, tests 4m28s. playwright-build 1m40s. playwright-webifc-run 3m10s. build 6m37s. $0.

Verified locally

  • Google Drive, Alert, About, Open dialog, Login, TopBar, ProjectsDrawer: 51 passed
  • tools/marketing/build.test.js (skip path)
  • pre-commit: eslint + typecheck + 2885 jest tests

CI playwright-run has grown to ~18m of tests (188 tests, 34m serial,
2 workers on 8GB). Split the Conway suite across two shards so four
Chromiums run without putting four wasm heaps on one machine; keep the
required check name `playwright-run` as an aggregator.

Playwright builds skip the Next.js marketing overlay (no flow spec
loads those routes). Dialog/panel specs freeze the WebGL loop after
the model is ready. GoogleDriveConnect no longer double-loads index.ifc.
@netlify

netlify Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploy Preview for bldrs-share-dev ready!

Name Link
🔨 Latest commit f024181
🔍 Latest deploy log https://app.netlify.com/projects/bldrs-share-dev/deploys/6a9713c4e739a30008cb79c9
😎 Deploy Preview https://deploy-preview-1830--bldrs-share-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 47 (no change from production)
Accessibility: 88 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@pablo-mayrgundter
pablo-mayrgundter marked this pull request as ready for review September 1, 2026 14:36
@pablo-mayrgundter

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-09-01T17:45:55.061221Z be8613e 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.

@netlify

netlify Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploy Preview for bldrs-share-prod ready!

Name Link
🔨 Latest commit f024181
🔍 Latest deploy log https://app.netlify.com/projects/bldrs-share-prod/deploys/6a9713c42140d800084cbb3c
😎 Deploy Preview https://deploy-preview-1830--bldrs-share-prod.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 505d9fe0a5

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

pauseRenderer holds the last painted canvas frame. Notes/Comment
goldens include the scene, so CI failed at ~9% pixel diff (threshold
2%). Keep the freeze on dialog/panel specs that do not screenshot
the canvas.
@pablo-mayrgundter

Copy link
Copy Markdown
Member Author

@codex review — second commit drops pauseRenderer on full-page screenshot specs (Notes/Comment goldens include the scene; first run failed at ~9% pixel diff).

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: a39bd4bfa9

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

Share is public, so standard ubuntu-24.04 is 4 vCPU / 16 GB and
unlimited-free. The paid 8 GB larger runner was the RAM ceiling
(2 workers green, 3+ starved) and billed even on a public repo.

Keep 2 workers per box — four SwiftShader Chromiums on four cores
contend — and split --shard=N/4 so eight Chromiums run across four
free machines instead of packing one box. Screenshots still use the
Playwright noble container.
@pablo-mayrgundter

Copy link
Copy Markdown
Member Author

@codex review — moved shards onto free public ubuntu-24.04 (16 GB) and split --shard=N/4, still 2 workers per box. Paid 8 GB larger runner is out of this workflow.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 3692cd0f9d

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

Four shards each ran yarn clean && build. Esbuild is seconds, but
that is four copies of the tree the suite claims to have tested.
playwright-build uploads docs/ (maps stripped); shards set
PLAYWRIGHT_SERVE_ONLY and only http-server it.

Shards still yarn install — specs import app modules — so this is
the one-build guarantee, not a skip of the install floor.
@pablo-mayrgundter

Copy link
Copy Markdown
Member Author

@codex review — playwright-build produces docs/ once; shards PLAYWRIGHT_SERVE_ONLY and http-server it. Yarn install remains per-shard (specs import app modules).

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: e011dd9abf

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

Shards only need @playwright/test (browsers already in the image)
and a handful of dep-free constant modules. npm install that one
package, serve docs with a zero-dep static server that still
returns 404.html for SPA routes.

CutPlane.spec imported waitForModelReady via tsconfig baseUrl;
switch it to a relative path so the runner does not need the
Share node_modules tree to resolve it.
@pablo-mayrgundter

Copy link
Copy Markdown
Member Author

@codex review — shards skip Share yarn install: npm install @playwright/test@1.56.1 only, serve docs with tools/playwright/serveDocs.mjs.

@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: be8613e7d4

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

Comment thread .github/workflows/test-flows.yml Outdated
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD is set on the image. Do not
# `yarn install` the Share tree — that was ~50s per shard.
- name: Install Playwright test runner
run: npm install --no-save --no-package-lock @playwright/test@1.56.1

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 Install Playwright outside the Share package

In a clean playwright-shard checkout, this command runs from the repository root, so npm processes the root package.json and installs the Share dependency graph in addition to Playwright; --no-save only prevents updating the manifest. The npm install documentation confirms that dependencies listed in package.json are installed by default. This repeats the large install on all four shards, defeating the intended speed/disk optimization and potentially consuming most of the new 15-minute timeout; install into an isolated empty prefix/directory and expose that runner to the repo instead.

Useful? React with 👍 / 👎.

npm install at the repo root still resolved ts-jest/babel-jest
peers and failed ERESOLVE. Put the runner in .pw-runner and
symlink node_modules so specs can import @playwright/test.
Drop the custom serveDocs.mjs and the map-stripping step.
Shards install @playwright/test@1.56.1 plus http-server in
.pw-runner and serve docs/ with npx http-server, same as
yarn test-flows-serve. The artifact is what yarn test-flows-build
left, so the suite tests that tree rather than a rewritten one.
Playwright's webServer cwd is the config directory (tools/), so
`npx http-server docs` would serve tools/docs. Serve-only sets cwd
to the built artifact and runs `npx http-server` there, with PORT
from env.
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