fix(build): biome 2.5.5 schema + siwe install + api node types — make main build green#305
Conversation
- biome.json: bump $schema 2.5.1 -> 2.5.5 to match installed @biomejs/biome@2.5.5 CLI (clears schema-mismatch) - renovate.json: collapse extends array to satisfy biome formatter (1 error) - apps/api/tsconfig.json: add "node" to types so node:crypto + siwe resolve (no Bun globals used) - order-book-do / websocket-hub-do: biome-ignore noUnusedPrivateClassMembers on the env field (CACHE KV binding reserved for Phase-0 WebSocket live-data reads); kept field + ctor assignment to avoid breaking DO constructors - queue-handler: rename unused chainId -> _chainId (signature kept for future per-chain CoinGecko mapping; no behavior change) siwe@3.0.0 confirmed installed (bun installs single-app deps per-app at apps/api/node_modules/siwe, same as hono/viem/effect); apps/api typecheck/test/build resolve it.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR stabilizes the main branch build by aligning Biome config with the installed version, tightening TypeScript node typings for the API app, and making small, targeted code tweaks to satisfy new lint rules and type checks without altering runtime behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughThe change updates lint annotations, marks an unused function parameter, enables Node.js TypeScript types, updates the Biome schema reference, and reformats Renovate presets. Runtime behavior is unchanged. ChangesLint and tooling alignment
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)apps/api/tsconfig.jsonTraceback (most recent call last): biome.jsonTraceback (most recent call last): renovate.jsonTraceback (most recent call last): 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 |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
fetchTokenPrice, since_chainIdis intentionally unused but expected to matter later, consider adding a brief TODO or comment about the planned per-chain CoinGecko mapping so future changes don’t accidentally drop the parameter or overlook the need for multi-chain support. - For the durable objects’
envfields, you might consider encapsulating the planned CACHE KV usage (e.g., via a dedicated method or minimal stub that referencesenv) instead of a barebiome-ignore, so the build intent is encoded directly in executable code rather than only in a linter suppression comment.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `fetchTokenPrice`, since `_chainId` is intentionally unused but expected to matter later, consider adding a brief TODO or comment about the planned per-chain CoinGecko mapping so future changes don’t accidentally drop the parameter or overlook the need for multi-chain support.
- For the durable objects’ `env` fields, you might consider encapsulating the planned CACHE KV usage (e.g., via a dedicated method or minimal stub that references `env`) instead of a bare `biome-ignore`, so the build intent is encoded directly in executable code rather than only in a linter suppression comment.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Summary
Stabilizes the merged
mainbuild (broken after 4 squash-merges) with build/config/type/import fixes only — no product-behavior changes.The 3 diagnosed failures → fixes
1. Dependency install —
siwesiwe@3.0.0exists and is the published latest (npm view siwe version→ 3.0.0); registry reachable (curl -sI https://registry.npmjs.org/siwe→ HTTP 200). The originalDNSResolveFailedwas transient.bun install(incl.--forcefor a canonical clean relink — 1589 packages).siwe@3.0.0is now installed and resolvable.apps/api/node_modules/siwe) — identical tohono/viem/effect, which also live inapps/api/node_modules, not the root. It is not root-hoisted; this is the canonical workspace layout.apps/apitypecheck/test/build all resolve and run it (proof of the functional gate).src/auth/siwe.ts(SiweMessage) is valid for v3 — no import change needed.2. Biome version mismatch + findings
biome.json`` bumped 2.5.1 → 2.5.5 to match installed@biomejs/biome@2.5.5(clears the schema-mismatch error).noUnusedVariablesis split into finer rules that default to warn. I fixed the code properly (did not downgrade rules):renovate.json: collapsed theextendsarray (formatter error → fixed).order-book-do.ts/websocket-hub-do.ts: added a precise// biome-ignore lint/correctness/noUnusedPrivateClassMemberson theenvfield — theCACHEKV binding is intentionally retained for Phase-0 WebSocket live-data reads. I deliberately did not runbiome check --write --unsafe, because its auto-removal would delete the field but leavethis.env = envin the constructor, breaking the build.queue-handler.ts: renamed unusedchainId→_chainId(signature kept for future per-chain CoinGecko mapping; caller passes positionally — no behavior change).bun run lint→ exit 0, 0 errors, 0 warnings.3. API typecheck
apps/api/tsconfig.json:"types": []→["node"](no Bun globals used) sonode:cryptoresolves. Thesiwemodule error resolved with the install.@types/node@^26already present.apps/apitsc --noEmit→ exit 0 (no Cloudflare/node global conflicts introduced).Verification matrix (all from repo root, branch
fix/foundation-green)bun install(siwe@3.0.0 resolvable)bun run typecheck(cd apps/api && bun run typecheck)(cd apps/web && bun run typecheck)bun run lint(0 errors / 0 warnings)bun run test(88 passed)(cd apps/api && bun run test)(10 passed)(cd apps/web && bun run build)(cd apps/api && bun run build)(wrangler dry-run)Constraints honored
No lint-rule downgrades, no
@ts-ignore/@ts-expect-error/as any, no runtime-behavior changes (build/config/type/import fixes + targeted unused-code handling only),.beads/,.claude/,packages/contracts/src/**untouched,bun.lockunchanged. Not merged.Summary by Sourcery
Stabilize the main branch by fixing build, lint, and type configuration issues without changing runtime behavior.
Bug Fixes:
Build:
Summary by CodeRabbit
Chores
Documentation