Skip to content

fix(infra): use node --watch for alchemy dev on macOS 26#33

Merged
nathanialhenniges merged 2 commits into
mainfrom
fix/infra-dev-bun-macos26
May 16, 2026
Merged

fix(infra): use node --watch for alchemy dev on macOS 26#33
nathanialhenniges merged 2 commits into
mainfrom
fix/infra-dev-bun-macos26

Conversation

@nathanialhenniges

Copy link
Copy Markdown
Member

Summary

  • Bun 1.3.14 segfaults on macOS 26.4.1 in --watch mode — reproducible crash at 0x500010172, confirmed Bun bug
  • Alchemy detects bun.lock and spawns bun --watch alchemy.run.ts, triggering the crash every time
  • Node 24 has native TypeScript stripping (process.features.typescript === 'strip'), so node --watch alchemy.run.ts --dev works cleanly
  • Changed packages/infra dev script to use node --watch directly, bypassing alchemy's runtime detection
  • Also bumped alchemy 0.89.0 → 0.93.7 and updated all other minor/patch deps

Test plan

  • Run bun dev — all three services start (web :3001, server :3000, docs :3002) with no crash
  • Edit alchemy.run.ts — node --watch restarts cleanly
  • Deploy path unchanged (alchemy deploy / alchemy destroy scripts untouched)

🤖 Generated with Claude Code

nathanialhenniges and others added 2 commits May 15, 2026 15:15
Bun 1.3.14 segfaults on macOS 26 in --watch mode. alchemy detects
bun.lock and spawns `bun --watch`, triggering the crash.

Node 24 has native TypeScript stripping enabled by default, so
`node --watch alchemy.run.ts --dev` runs cleanly without Bun.

Also bumps alchemy 0.89.0 → 0.93.7.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- All minor/patch deps updated via bun update
- alchemy bumped 0.89.0 → 0.93.7
- wrangler compatibility_date updated to 2026-04-24

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@nathanialhenniges has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 24 minutes and 40 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 66d334fd-abf7-4bf8-8e08-e76d404ce7f2

📥 Commits

Reviewing files that changed from the base of the PR and between 066ca41 and 0f02e0a.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • apps/web/wrangler.jsonc
  • package.json
  • packages/infra/package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/infra-dev-bun-macos26

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 and usage tips.

@nathanialhenniges nathanialhenniges merged commit 325d8f6 into main May 16, 2026
2 of 3 checks passed
@nathanialhenniges nathanialhenniges deleted the fix/infra-dev-bun-macos26 branch May 16, 2026 04:35
nathanialhenniges added a commit that referenced this pull request May 16, 2026
The dev secret was introduced in #33 and re-surfaced when biome reformatted
the file in this PR. Replacing with an empty placeholder so the secret stops
shipping in git history going forward. The compromised value should be
rotated, and the local dev secret should be moved to `.dev.vars` (which
wrangler reads automatically and is gitignored).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
nathanialhenniges added a commit that referenced this pull request May 16, 2026
* fix(infra): use node --watch for alchemy dev on macOS 26

Bun 1.3.14 segfaults on macOS 26 in --watch mode. alchemy detects
bun.lock and spawns `bun --watch`, triggering the crash.

Node 24 has native TypeScript stripping enabled by default, so
`node --watch alchemy.run.ts --dev` runs cleanly without Bun.

Also bumps alchemy 0.89.0 → 0.93.7.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: dedupe shared helpers across web, api, ui, and validators

Audit pass to collapse genuinely duplicated code across the monorepo:

- cn() de-duped: apps/web/src/lib/utils.ts now re-exports from @linkden/ui
- hexToRgb de-duped: OG route imports the validated helper from
  @linkden/ui/color-contrast (no longer silently NaN on bad input)
- BlockType single-sourced: builder constants derive the union from
  @linkden/validators/blocks with a dev-mode coverage check
- VALID_SETTING_KEYS + settingKeySchema moved to @linkden/validators/settings
  so web clients can share the exhaustive key type
- isValidUrl in settings router now delegates to sanitizeUrl
- Unused FormField removed from @linkden/ui
- New ColorField component in apps/web/src/components/admin replaces three
  inline hex-input + color-swatch implementations (wallet-section,
  colors-section, wallet-builder-section)
- SOCIAL_CATEGORIES + SocialCategory type exported from @linkden/ui;
  admin/social/social-constants derives labels and icons from it
- New useSettingsForm hook encapsulates the dirty-save settings pattern
  (load via trpc.settings.getAll, mirror saved snapshot, persist via
  updateBulk, invalidate, toast); mapkit-section migrated as the first
  consumer

Net -181 lines. Vitest 96/96 pass. tsc -b clean for server; tsc --noEmit
clean for web, validators, and api.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: apply biome formatter

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* security: scrub committed BETTER_AUTH_SECRET from wrangler.jsonc

The dev secret was introduced in #33 and re-surfaced when biome reformatted
the file in this PR. Replacing with an empty placeholder so the secret stops
shipping in git history going forward. The compromised value should be
rotated, and the local dev secret should be moved to `.dev.vars` (which
wrangler reads automatically and is gitignored).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* security: untrack apps/web/wrangler.jsonc (already gitignored, alchemy-generated)

The file is listed in apps/web/.gitignore (line 62) because alchemy/open-next
generates it per developer. It was accidentally committed before the gitignore
rule landed, and that's how BETTER_AUTH_SECRET leaked into history.

Rotate the existing secret on Cloudflare (compromised since it lived in git):

  cd apps/web   && bunx wrangler secret put BETTER_AUTH_SECRET
  cd apps/server && bunx wrangler secret put BETTER_AUTH_SECRET

For local dev, put the same value in apps/web/.dev.vars (gitignored):

  BETTER_AUTH_SECRET="<new value>"

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(web): import cn from @linkden/ui/utils subpath, not the barrel

Re-exporting cn from "@linkden/ui" dragged the entire component barrel
(Tabs, Dialog, Tooltip, Toast, etc.) into every consumer of @/lib/utils.
During Next.js prerender, server components that import cn ended up
loading client-only Radix code, blowing up with
`TypeError: e.createContext is not a function` on /admin/account.

The granular "./utils" subpath only resolves packages/ui/src/utils.ts and
keeps the module graph clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant