Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
| - name: Browser tests on a Modal GPU | ||
| run: bun run test:modal | ||
| env: | ||
| MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} | ||
| MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} |
There was a problem hiding this comment.
🔴 Fork pull requests fail browser CI
For fork pull requests, test:modal starts without Modal credentials. GitHub withholds repository secrets from fork pull_request jobs, so the browser job fails before running tests.
Learn more
The workflow starts the browser job for every pull request, including forks. GitHub withholds repository secrets from fork pull_request jobs, leaving both Modal token variables empty. Modal authentication then fails before it can create the GPU sandbox, and those pull requests get a failing CI check.
Example: A contributor opens a pull request from their fork. The check job can run, but the browser job receives empty MODAL_TOKEN_ID and MODAL_TOKEN_SECRET and cannot start the suite.
Recommended fix: Gate the Modal job on credentials being available or on an in-repository pull request, and decide how fork pull requests receive browser coverage without exposing credentials to untrusted code. Keep ordinary build and unit checks available to forks.
Was this helpful? React with 👍 or 👎 to provide feedback.
| // Eight workers keep the GPU busy; more contend for it and time out. | ||
| cpu: 8, | ||
| memoryMiB: 16384, | ||
| timeoutMs: 20 * 60_000, |
There was a problem hiding this comment.
🟡 Timed-out CI leaves GPU running
When the browser job reaches its 15-minute timeout, GitHub stops test:modal before its cleanup runs. The sandbox's timeoutMs is 20 minutes, leaving the GPU active after CI ends.
Learn more
The browser job has a 15-minute timeout at browser, but the sandbox is configured to live for 20 minutes. If provisioning or a browser test hangs until GitHub's timeout, the runner kills the process before the finally block can call sandbox.terminate(). Modal can keep the L4 sandbox active until its own timeout.
Example: A run hangs at minute 14. GitHub stops it at minute 15; the remote GPU sandbox can continue running until minute 20 even though no test result can be returned.
Recommended fix: Set the sandbox timeout below the job timeout with enough headroom for artifact collection and cleanup, so Modal ends the GPU session even if the runner is killed.
Was this helpful? React with 👍 or 👎 to provide feedback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each worker loads the editor once; a test opens its image as a new document, which the editor mounts afresh, instead of reloading the page. Tests that change the page itself, with routes, init scripts, a fake clock, or touch, keep a page of their own, and a failure drops the shared page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Change
Browser tests run on a Modal L4 GPU for every pull request.
bun run test:modal [file]runs the same suite from any machine without a GPU. Browser tests also share one editor page per worker instead of reloading it for each test.tests/modal.ts: starts a GPU sandbox, uploads the working tree, runsbun run test:browser --workers=8, streams the output, and brings backtest-results/on failure.package.jsonandbun.lock. A cached sandbox is ready in about 2 s.PLAYWRIGHT_CHANNEL. Local and macOS runs still usechromium.browserjob runs next tocheck, signed in with theMODAL_TOKEN_IDandMODAL_TOKEN_SECRETsecrets.openImageandopenPhotoreuse the loaded editor.isolated: routes, init scripts, a fake clock, or touch.choose: puts the pointer back on the select, so no tooltip left where the list was takes the test's next Escape.Stacked on #96, whose GPU-agnostic tests pass on NVIDIA.
Verification
browserjob, warm cachebun run check,bun run build, andbun run testpass.🤖 Generated with Claude Code