Repository navigation
fix(deps): lift the @swc/core pin to 1.16.21, matching WeMeditateWeb - #412
Conversation
The playground held @swc/core at 1.16.2 because every later release died on the Workers build image with ERR_SWC_NATIVE_CACHE (#401): its addon refuses a cache directory with an ancestor another user can write, and the image fails that rule for both ~/.cache and /tmp. Upstream has not moved, so the pin had no exit (#405). Route B from #405 lifts it, set in the repo rather than the dashboard: ladle:build now sets SWC_NATIVE_BINDING_CACHE_SKIP_SECURITY_CHECK=1 when WORKERS_CI is set, which Workers Builds injects and nothing else does. Only the ancestor check goes; the payload integrity check stays on, and the check stays on locally and in CI. It has to be a script prefix: Ladle loads SWC before it reads any config file. GitHub's runners and macOS pass the check, so wrangler-config.test.ts pins the prefix. 1.16.21 is what WeMeditateWeb's playground resolves under the same prefix (sydevs/WeMeditateWeb#233), so the two Ladle builds share one compiler. Only the playground loads SWC, so no sahajatlas-web deploy rides on this. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | e21e1f4 | Nov 15 2026, 06:45 PM |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
This matches #405 and stops there: the override goes, one env prefix arrives, one test pins it, one doc paragraph is rewritten. No new file, helper, constant or dependency, so the ladder has nothing to walk. Route B takes SWC's own documented opt-out (swc-project/swc#12469) over hand-rolled code, and upstream's fallback (swc-project/swc#12500, shipped in 1.16.18) cannot replace it — it retries in the system temp directory, which this image refuses too. All three findings are about the prose, not the change.
Findings
should-fix—docs/rules/deployment.md:60cites WeMeditateWeb#233, the ticket, for a prefix that its PR #236 has not merged yet.should-fix—docs/rules/deployment.md:54leaves #405's route A unanswered and its decidingstatunrecorded.consider—scripts/wrangler-config.test.ts:158claims a wider measurement than #405 took.
What was checked
${WORKERS_CI:+1}holds. SWC enables the skip on the exact value1, so the empty expansion leaves the check on locally and in CI, as the body claims.Workers Builds: sahajatlas-designalready passed one21e1f4f— the body's unchecked box. That is the prefix working on 1.16.21 on the real image.- The lockfile diff is SWC entries only, as claimed.
@swc/coreresolves 1.16.21 through@vitejs/[email protected], its one dependent. scripts/wrangler-config.test.tsread whole: the new case joins thePACKAGE.scriptsassertions already indescribe('the targets'), so it has a home, and nothing else in the file wants the prefix.- No finding, but worth knowing: nothing pins 1.16.21 now. The next lockfile refresh floats to 1.16.22 or later, which the flag should cover and nobody has built.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The deployment rule named sydevs/WeMeditateWeb#233, the ticket, not #236, the PR that adds the prefix there. Nothing but this line couples the two repos, so a wrong number outlives the PR that introduced it. #236 is open, so the prefix is proposed there rather than in use. Their main already resolves @swc/core 1.16.21, so only the prefix clause was premature. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYcLZ56AdrFyykCbKQ
The paragraph ruled out ~/.cache and /tmp, the roots SWC picks by itself, and left #405's route A unanswered. A reader asking "why not point the cache at the checkout?" found nothing. The stat #405 recommended was never read, so this records the inference rather than a measurement: ~/.cache being refused puts the offending ancestor at or above $HOME, which a checkout under $HOME inherits. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYcLZ56AdrFyykCbKQ
"for every directory it tries" claimed more than #405 measured: the default cache root and /tmp, never a checkout-local one. The two sentences before the last one restated docs/rules/deployment.md. What remains is the reason the test exists — no other lane fails without the prefix, so nothing else catches its removal. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYcLZ56AdrFyykCbKQ
|
Three critic threads, all adopted. Pushed to
Lean gate green: lint, typecheck, 2081 tests. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
This lifts the
@swc/core1.16.2 pin from #401, taking route B from #405. Every SWC release since 1.16.12 fails on the Workers build image withERR_SWC_NATIVE_CACHE. The image fails SWC's cache-root ancestor check for both~/.cacheand/tmp, and upstream has not changed since.ladle:buildnow starts withSWC_NATIVE_BINDING_CACHE_SKIP_SECURITY_CHECK=${WORKERS_CI:+1}. That is1only on Workers Builds, which injectsWORKERS_CI. The check stays on locally and in CI. Only the ancestor check is skipped, and SWC still verifies the addon's payload..ladle/config.mjs.pnpm.overridesentry is removed, and the lockfile resolves@swc/core1.16.21. That is the version sydevs/WeMeditateWeb resolves, so the two playgrounds share one compiler. Only SWC entries change in the lockfile.scripts/wrangler-config.test.tspins the prefix. GitHub's runners and macOS pass the check, so nothing else would notice it being removed. I watched the new case fail before adding the prefix.docs/rules/deployment.mdis rewritten to match.Only the playground loads SWC, so no
sahajatlas-webdeploy depends on this. Companion PR: sydevs/WeMeditateWeb#236.Test plan
pnpm why @swc/corereports 1.16.21.pnpm ladle:buildpasses locally.pnpm test:run scripts/wrangler-config.test.tspasses, 23 of 23.Workers Builds: sahajatlas-designpasses on this PR, and its log shows noERR_SWC_NATIVE_CACHE.mainafter merge.🤖 Generated with Claude Code