👷 Skip website prebuild remote fetches on cloud Claude Code#6852
Conversation
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
|
|
👋 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. The template includes:
Thank you for your contribution! 🙏 |
@fast-check/ava
fast-check
@fast-check/jest
@fast-check/packaged
@fast-check/poisoning
@fast-check/vitest
@fast-check/worker
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
The
websiteprebuild (optimize-images.mjs+sync:sponsors) downloadsavatars, 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 buildaborts beforedocusaurus buildcan even run — preventing MDX content from beingvalidated 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_REMOTEisnot 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:sponsorsbash one-liner intooptimize-images.mjsso a single env-var gate covers all remote fetchingand the build pipeline has one fewer hop.
https://claude.ai/code/session_01GfRHx2CMQy1iXJAS27HAyk