Skip to content

fix: marketing site Vercel builds no longer die after ~100 deploys - #4975

Merged
t3dotgg merged 2 commits into
mainfrom
t3code/fix-vercel-tsgo-backups
Jul 30, 2026
Merged

fix: marketing site Vercel builds no longer die after ~100 deploys#4975
t3dotgg merged 2 commits into
mainfrom
t3code/fix-vercel-tsgo-backups

Conversation

@t3dotgg

@t3dotgg t3dotgg commented Jul 30, 2026

Copy link
Copy Markdown
Member

Problem

Vercel builds of the marketing site started failing in prepare with:

BackupRestoreError: Too many backup files exist (over 100). Please clean up old backups

effect-tsgo patch backs up the real tsgo binary to tsgo.original on every run, and if that name is taken it writes .original.1, .2, ... without ever cleaning up (confirmed the latest 0.24.3 has the same logic, so upgrading doesn't help). CI is fine because Blacksmith runners start fresh, but Vercel restores node_modules from build cache between deploys — so every deploy stacked one more backup until patch hard-failed at 101.

Solution

A tiny scripts/clean-tsgo-backups.mjs (node builtins only) deletes stale tsgo.original* backups, and prepare now runs it before effect-tsgo patch. Deleting them is safe: from the second patch onward the backup is just the previously-patched binary, and pnpm restores the pristine one whenever the package is re-materialized. Verified locally by simulating the cached-rebuild loop — steady state is one backup, no accumulation.

Note: the currently-wedged Vercel project still needs one "Redeploy without build cache" to clear the existing pile; this PR keeps it from re-accumulating.


Change authored by Claude Fable 5 via Claude Code.

🤖 Generated with Claude Code


Note

Low Risk
Changes only the prepare hook and a small cleanup script; no runtime app logic, auth, or data paths.

Overview
Vercel marketing builds were failing in prepare once effect-tsgo patch had created more than 100 tsgo.original* backups in cached node_modules.

scripts/clean-tsgo-backups.mjs removes matching backup files under @typescript/native-preview in the pnpm store (node builtins only), and prepare now runs it before effect-tsgo patch so backups do not accumulate across deploys. Existing wedged projects still need one redeploy without build cache to clear the current pile.

Reviewed by Cursor Bugbot for commit 555d375. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Delete stale tsgo backup files before each build to prevent Vercel deploy failures

Adds clean-tsgo-backups.mjs, a script that globs for tsgo backup binaries in node_modules and removes them with rmSync. The prepare script in package.json now runs this cleanup before effect-tsgo patch and vp config, preventing the accumulation of backup files that caused builds to fail after ~100 deploys.

Macroscope summarized 555d375.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6e3512b9-dcb6-4cea-8fe3-43a78a098198

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jul 30, 2026
Comment thread scripts/clean-tsgo-backups.mjs Outdated
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 30, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 555d375

This PR adds a build-time script to clean up stale tsgo backup files that accumulate in Vercel's cached node_modules. The script only runs during the prepare phase and has no runtime impact—it's a straightforward CI/CD maintenance fix.

You can customize Macroscope's approvability policy. Learn more.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@macroscopeapp
macroscopeapp Bot dismissed their stale review July 30, 2026 12:25

Dismissing prior approval to re-evaluate 555d375

@t3dotgg
t3dotgg merged commit 50871eb into main Jul 30, 2026
16 checks passed
@t3dotgg
t3dotgg deleted the t3code/fix-vercel-tsgo-backups branch July 30, 2026 12:31
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Jul 30, 2026
## What's Changed
* fix(mobile): support dragged images in the composer by @t3dotgg in pingdotgg/t3code#4953
* fix(mobile): stop long iOS threads from jumping while scrolling up by @t3dotgg in pingdotgg/t3code#4867
* fix(web): keep worktree default when switching a draft's machine by @t3dotgg in pingdotgg/t3code#4964
* perf(mobile): reconnect environments immediately on resume by @t3dotgg in pingdotgg/t3code#4878
* feat(web): pasting a huge screenshot now compresses it instead of erroring by @t3dotgg in pingdotgg/t3code#4967
* feat(web): regenerate thread titles from sidebar by @t3dotgg in pingdotgg/t3code#4810
* fix(web): show server update progress through reconnect by @t3dotgg in pingdotgg/t3code#4903
* feat(search): find threads by conversation content by @t3dotgg in pingdotgg/t3code#4959
* fix: marketing site Vercel builds no longer die after ~100 deploys by @t3dotgg in pingdotgg/t3code#4975


**Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260730.955...v0.0.32-nightly.20260730.956

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260730.956
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant