chore: harden setup scaffold (review fixes)#1
Conversation
- rpc route: correct the misleading "lazy db" comment — oRPC resolves context.db on every request, so DATABASE_URL is required even for DB-free procedures like health.check - README: document that DATABASE_URL must be set before `pnpm dev` - packages/api: drop unused @orpc/client dependency (sync lockfile) - ci: pin actions/checkout, pnpm/action-setup, actions/setup-node to commit SHAs (supply-chain hardening) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VN8mBbNBEg6wBYt9T5zD1e
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
セットアップブランチのレビューで見つけた点の修正です。scaffold(
3ab1221)をベースラインmainとし、本PRはその上のレビュー修正(eebd537)を載せます。変更点
apps/web/server/routes/rpc/[...].ts): 誤解を招く「lazy db」コメントを実態に修正。oRPC はリクエストごとにcontext.dbを解決するため、health.checkのような DB 非依存の手続きでもDATABASE_URLが必須。getter は生成を遅延するだけで、手続きごとに条件分岐するわけではない点を明記。pnpm devの前にDATABASE_URL(.env)が必須であることを明記。未設定だとトップページのhealth.checkが 500 になる挙動を補足。@orpc/client依存を削除(lockfile 同期済み)。.github/workflows/ci.yml):actions/checkout/pnpm/action-setup/actions/setup-nodeを commit SHA でピン留め(サプライチェーン対策、バージョンはコメントで追跡)。検証
ローカルで全ゲート緑を確認済み:
pnpm install --frozen-lockfile✅pnpm lint✅pnpm typecheck(3 パッケージ)✅pnpm build(Nitro サーバ生成)✅health.checkの挙動(DATABASE_URL有無での 200/500)を実機確認🤖 Generated with Claude Code