Skip to content

Main - #74

Merged
jasandroidx merged 2 commits into
ravenstackfrom
main
Sep 22, 2026
Merged

Main#74
jasandroidx merged 2 commits into
ravenstackfrom
main

Conversation

@jasandroidx

Copy link
Copy Markdown
Owner

No description provided.

…as broken

Checked the Vercel connector for prj_XXsLqd1UVmhtJtqi1wY5NCra6wuX: the only
two production deployments both errored, and every preview/production build
has zero environment variables configured. Two separate causes, both real
bugs in the dependency graph, neither introduced by anything in this session
before now.

1. firebase was declared only in the ROOT package.json, never in ui-v2's own.
   bun's workspace install hoists it into the shared node_modules, so
   `import "firebase/app"` in src/lib/drive/google-auth.ts resolves locally
   by accident. Vercel builds ui-v2 as its own project root and runs a plain
   `npm install` scoped to ui-v2/package.json alone, which never had a reason
   to fetch firebase at all -- hence "Rolldown failed to resolve import
   firebase/app" on every CLI deploy attempt.

2. ui-v2/package.json pinned @google/genai to ^0.2.0, an early release whose
   API predates the multimodal config shape ai.ts actually calls
   (GenerateContentConfig.imageConfig) -- this is also the exact cause of the
   two "pre-existing" typecheck errors reported after the ravenstack merge.
   Bumped to ^2.18.0, matching what this session's earlier work already
   verified compiles clean against the same calling pattern.

Verified, not assumed: reproduced Vercel's exact failure mode with a fresh
`npm install` in an isolated copy of ui-v2 alone (no workspace hoisting) --
524 packages, firebase genuinely present this time -- then ran the same
`vite build` Vercel runs. It succeeds, and firebase.mjs / firebase__auth.mjs
are present in the built server function. tsc is now clean with zero errors,
down from the 2 pre-existing ones.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017zDdoQMyjeCxVgcR6QsrGd
The operator wants the Gemini key gone entirely -- not degraded-to, gone.
complete() (the shared entry point for Oracle, Forge, the Round Table,
Sentinel, Mechanic's inline form, hall dialogue, and portrait lore) now calls
completeOllama and nothing else. No key check, no fallback branch. Deleted
completeGemini outright -- it had no remaining caller once the fallback was
removed, and leaving it defined but dead would have been misleading.

diagnoseMechanicWorkbench called Gemini directly with a googleSearch
grounding tool that has no local equivalent. Routed it through the same
local-only complete(), dropped the tool, and told Valerie's own system prompt
plainly that she has no live search anymore and must say so rather than
invent a part number, a spec, or a source link -- matching the "never invent
citations" rule this app already enforces everywhere else. sources /
groundingSearchQueries stay in the return shape as empty arrays so
mechanic-workbench.tsx's optional rendering of that section degrades to
nothing rather than needing a matching change.

generatePortraitImage is the one function still allowed to touch Gemini:
pixel-art image synthesis has no local model in this stack. It now fails
fast and says exactly that when no key is configured, instead of burning
through several doomed Nano Banana / Imagen network round trips first.

That exposed a real coupling bug: commissionPortrait hard-failed the ENTIRE
portrait commission -- discarding lore that had already generated
successfully via local Ollama -- whenever the image step failed. Since image
generation now always fails without a key, this would have made the whole
Grand Gallery feature permanently broken. Decoupled it: the lore-only path
now succeeds, with an imageNote explaining why there is no image. Fixed the
same assumption client-side in portrait-studio-modal.tsx (it independently
gated success on a non-empty imageUrl) and in gallery.tsx, which would have
rendered a broken <img src=""> for a lore-only portrait -- it now shows an
honest "Chronicled, unlit / No local image model" frame instead.

.env.example rewritten to state plainly that GEMINI_API_KEY is optional and
touches exactly one feature (portrait images), not the app.

Verified: tsc clean (0 errors), eslint clean, repo test suite 24/24, and the
same isolated-ui-v2 npm install + vite build used to verify the last fix
still succeeds. grep confirms getGenAI() has exactly one remaining call site,
inside generatePortraitImage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017zDdoQMyjeCxVgcR6QsrGd
@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
ravenstack-keep Error Error Sep 22, 2026 12:11am UTC

Request Review

@jasandroidx
jasandroidx merged commit 30ea659 into ravenstack Sep 22, 2026
1 of 5 checks passed
@jasandroidx
jasandroidx deleted the main branch September 22, 2026 04:14

This branch had an error being deployed

1 failed deployment
Production — 178ff004 Deployed Sep 21, 2026 by vercel[bot]
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.

2 participants