Skip to content

fix: keep auth scaffold cold before install#223

Merged
zbeyens merged 1 commit into
mainfrom
codex/fix-auth-cli-cold-start
Apr 17, 2026
Merged

fix: keep auth scaffold cold before install#223
zbeyens merged 1 commit into
mainfrom
codex/fix-auth-cli-cold-start

Conversation

@zbeyens
Copy link
Copy Markdown
Member

@zbeyens zbeyens commented Apr 17, 2026

Summary

  • keep first-pass add auth on a static managed schema fallback when auth.ts does not exist yet
  • avoid loading the Better Auth-backed fallback planner before better-auth is installed
  • add regression coverage for the cold-start planner path and update the related learning + changeset

Why

Published kitcn add auth could fail in a fresh app before scaffold with Cannot find package 'better-auth'. The planner was still reaching for Better Auth runtime code too early.

Verification

  • bun test packages/kitcn/src/cli/registry/items/auth/reconcile-auth-schema.test.ts packages/kitcn/src/cli/registry/items/auth/auth-item.test.ts
  • bun lint:fix
  • bun typecheck
  • bun --cwd packages/kitcn build
  • packed tmp repro: install rebuilt kitcn-0.13.1.tgz into a fresh Start app and run node node_modules/kitcn/dist/cli.mjs add auth --yes

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 17, 2026

🦋 Changeset detected

Latest commit: 0f1bed4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
kitcn Patch
@kitcn/resend Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
better-convex Ready Ready Preview, Comment Apr 17, 2026 7:51pm

Request Review

@zbeyens zbeyens merged commit 97a50ec into main Apr 17, 2026
3 checks passed
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