Skip to content

👷 Skip website prebuild remote fetches on cloud Claude Code#6852

Merged
dubzzz merged 1 commit into
mainfrom
claude/skip-prebuild-validation-vLyRH
Apr 13, 2026
Merged

👷 Skip website prebuild remote fetches on cloud Claude Code#6852
dubzzz merged 1 commit into
mainfrom
claude/skip-prebuild-validation-vLyRH

Conversation

@dubzzz

@dubzzz dubzzz commented Apr 13, 2026

Copy link
Copy Markdown
Owner

The website prebuild (optimize-images.mjs + sync:sponsors) downloads
avatars, out-sourced static assets and the sponsors SVG from GitHub. The
cloud-hosted Claude Code sandbox (claude.ai/code) blocks those outbound
calls, so the whole pnpm --filter website build aborts before
docusaurus build can even run — preventing MDX content from being
validated in that environment.

Gate every remote fetch on process.env.CLAUDE_CODE_REMOTE === 'true':
when set (cloud Claude Code only), write small placeholder files at the
expected output paths instead of calling the network. Local Claude Code
CLI, developer machines and CI are unaffected — CLAUDE_CODE_REMOTE is
not set there, so the original fetch-and-SHA1-verify path still runs
byte-for-byte. The local MDX validation in assessMissingSocialImage()
is preserved unchanged in both modes.

Also inline the former sync:sponsors bash one-liner into
optimize-images.mjs so a single env-var gate covers all remote fetching
and the build pipeline has one fewer hop.

https://claude.ai/code/session_01GfRHx2CMQy1iXJAS27HAyk

The `website` prebuild (`optimize-images.mjs` + `sync:sponsors`) downloads
avatars, out-sourced static assets and the sponsors SVG from GitHub. The
cloud-hosted Claude Code sandbox (claude.ai/code) blocks those outbound
calls, so the whole `pnpm --filter website build` aborts before
`docusaurus build` can even run — preventing MDX content from being
validated in that environment.

Gate every remote fetch on `process.env.CLAUDE_CODE_REMOTE === 'true'`:
when set (cloud Claude Code only), write small placeholder files at the
expected output paths instead of calling the network. Local Claude Code
CLI, developer machines and CI are unaffected — `CLAUDE_CODE_REMOTE` is
not set there, so the original fetch-and-SHA1-verify path still runs
byte-for-byte. The local MDX validation in `assessMissingSocialImage()`
is preserved unchanged in both modes.

Also inline the former `sync:sponsors` bash one-liner into
`optimize-images.mjs` so a single env-var gate covers all remote fetching
and the build pipeline has one fewer hop.

https://claude.ai/code/session_01GfRHx2CMQy1iXJAS27HAyk
@changeset-bot

changeset-bot Bot commented Apr 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 635994d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

👋 It looks like the PR template was not used for this pull request.

Please edit the PR description to use the template, or close this PR and open a new one that uses it.
Not using the template may result in your change not being reviewed.

The template includes:

  • A Description section
  • A Checklist section with items to verify before submitting

Thank you for your contribution! 🙏

@dubzzz
dubzzz enabled auto-merge (squash) April 13, 2026 20:48
@pkg-pr-new

pkg-pr-new Bot commented Apr 13, 2026

Copy link
Copy Markdown
@fast-check/ava

npm i https://pkg.pr.new/@fast-check/ava@6852

fast-check

npm i https://pkg.pr.new/fast-check@6852

@fast-check/jest

npm i https://pkg.pr.new/@fast-check/jest@6852

@fast-check/packaged

npm i https://pkg.pr.new/@fast-check/packaged@6852

@fast-check/poisoning

npm i https://pkg.pr.new/@fast-check/poisoning@6852

@fast-check/vitest

npm i https://pkg.pr.new/@fast-check/vitest@6852

@fast-check/worker

npm i https://pkg.pr.new/@fast-check/worker@6852

commit: 635994d

@dubzzz
dubzzz merged commit c399386 into main Apr 13, 2026
49 of 50 checks passed
@dubzzz
dubzzz deleted the claude/skip-prebuild-validation-vLyRH branch April 13, 2026 20:56
@codecov

codecov Bot commented Apr 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.86%. Comparing base (9621579) to head (635994d).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6852   +/-   ##
=======================================
  Coverage   94.86%   94.86%           
=======================================
  Files         209      209           
  Lines        5665     5665           
  Branches     1489     1488    -1     
=======================================
  Hits         5374     5374           
  Misses        283      283           
  Partials        8        8           
Flag Coverage Δ
tests 94.86% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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