PR7: Real Supabase + real Anthropic; harden remaining mocks#7
Merged
Conversation
…ecord extraction)
…nt console with live record + evidence cardsionalities This file contains the HTML structure and styling for the Pipeline page, including agent functionalities and UI elements.
…ables, metrics, bar charts
…ssier, 6 agents, call playbook, IC memo, logs
Added a comprehensive build plan for DealLens, including current status, known issues, completed fixes, architecture details, and next steps.
Initial draft of the Multi-Agent VC Platform scope document outlining architecture, agent roles, and build phases.
Updated the build plan with completed tasks, known issues, and next steps for the DealLens project.
Updated bug fixes section to include additional details on dropZone click handler and rendering issues.
…ne escaping issues
Added new features for IC Memo and export buttons, and updated bug fixes.
Squash merge of pr/cleanup-foundation into pr4/chat-and-rich-memo. - submit.html: expand localExtract() to 10-field extraction (company, stage, sector, HQ, thesis, ask, pre-money, ARR, MoM, logos, NRR, use-of-funds, website) - deal.html: replace 'Awaiting agent enrichment.' with honest empty state; improve not-found message - deals/index.json: remove acme-finance (no backing JSON file) - deals/pqc-bank.json: replace https://example.com with empty string - pipeline.html: replace mockOutput() Math.random fake data with honest empty states - app.html: replace generateEvidence() Math.random fake data with honest empty states
…SupabaseJobsQueue injection
…updated docs + package.json
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…failure analysis, real-wire gaps
- Change @anthropic-ai/sdk from ^0.39.0 (no matching releases) to 0.95.1 Root cause: npm 0.x semver ^0.39.0 = >=0.39.0 <0.40.0; the published version jumped directly from 0.38.x to 0.40+, leaving the 0.39.x slot empty. Vercel npm install failed with ETARGET on every deploy. - Verified locally: tsc --noEmit passes with 0 errors on 0.95.1 - Confirmed type compatibility: Anthropic.MessageCreateParamsNonStreaming, Anthropic.Message, Anthropic.TextBlock, response.usage.input_tokens / output_tokens all present and shaped correctly in 0.95.1 - Updated docs/BUILD_STATUS.md per DOCS_DISCIPLINE: moved blocker to 'awaiting Vercel re-deploy', updated package.json entry to 0.95.1
…ent<Database> return type
Root cause of second Vercel build failure:
- @supabase/postgrest-js (shipped with supabase-js@2.105.4) requires
GenericTable = { Row, Insert, Update, Relationships: GenericRelationship[] }
- Our lib/supabase/types.ts was missing Relationships:[] on all 7 tables
- Without it Database['public'] does not extend GenericSchema, so
SupabaseClient<Database>.from('table') resolves to Schema=never, and
.insert({...}) expects 'never[]' — causing TS strict-mode build failure
- Fix: add Relationships:[] to profiles, deals, deal_files, deal_runs,
cost_ledger, usage_counters, jobs
Additionally:
- lib/supabase/server.ts: add explicit SupabaseClient<Database> return type
to getSupabaseAdminClient() to anchor the generic through the complex
Omit<Database,'__InternalSupabase'> conditional type chain
- app/api/jobs/worker/route.ts: extract processGenericWebpage() helper for
clarity; logic unchanged
Verified locally: npx next build passes with 0 type errors, all 3 API
routes (health, ingest-link, jobs/worker) compile correctly.
…ild failures
Second root cause confirmed via local next build reproduction:
@supabase/supabase-js@^2.49.4 resolves to 2.105.4 which ships
@supabase/postgrest-js@2.105.4 (a major jump from 1.19.4).
postgrest-js@2.105.4 changed GenericTable to require a Relationships
field and changed the select-query column parser, breaking:
- .from('deals').select('id,owner_id').single() -> data: never
- .from('profiles').select('plan,is_owner').single() -> data: never
- .from('usage_counters').select(...) -> data: never
in strict TypeScript mode across app/api/upload, app/api/usage,
app/auth/callback, and lib/supabase/server.ts (setAll implicit any).
Pinning to exactly 2.49.4 uses postgrest-js@1.19.4 which is compatible
with our existing lib/supabase/types.ts and all route handlers.
Verified: npx next build passes with 0 type errors (9 routes + middleware)
under Node 22 + TypeScript strict mode with both pins applied:
@anthropic-ai/sdk: 0.95.1 (previous commit)
@supabase/supabase-js: 2.49.4 (this commit)
This was referenced May 10, 2026
… union of both sides
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR7: Real Supabase + real Anthropic; harden remaining mocks
What's built in this PR
Real services (wired — no mocks in production path)
app/(auth)/,middleware.ts,app/auth/callback/NEXT_PUBLIC_SUPABASE_URL+ keysupabase/migrations/000001–000004SUPABASE_SECRET_KEYdeal-uploads)lib/storage.supabase.ts→SupabaseStorageClientSUPABASE_SECRET_KEYlib/llm.anthropic.ts→AnthropicModelRouter(SDK0.95.1)ANTHROPIC_API_KEYlib/jobs.supabase.ts→SupabaseJobsQueueSUPABASE_SECRET_KEYgeneric_webpage)app/api/jobs/worker/route.tsWORKER_SECRETapp/api/ingest-link/route.tsapp/api/health/route.tsapp/api/upload/route.tsapp/api/usage/route.tsStubbed services (throw clear error until credentials added)
lib/connectors/google-drive.tsGOOGLE_OAUTH_CLIENT_ID/SECRETlib/connectors/dropbox.tsDROPBOX_APP_KEY/SECRETlib/stripe.tsSTRIPE_SECRET_KEY/WEBHOOK/PRICEDev-only mocks (throw in production if
USE_MOCKS ≠ true)lib/llm.mock.ts—MockModelRouterlib/storage.mock.ts—MockStorageClientapi/ingest-queue.mock.ts—MockIngestQueuePorted from predecessors (already in this branch)
All content from PR #4 (path-b + swarm), PR #5 (chat memo), PR #6 (auth + DB) is included and upgraded.
Package pins (two critical build fixes)
@anthropic-ai/sdk:0.95.1—^0.39.0had no matching npm releases@supabase/supabase-js:2.49.4—^2.49.4resolved to2.105.4which ships@supabase/postgrest-js@2.105.4; that version changedGenericTableto requireRelationships: GenericRelationship[], breaking.from().select()type inference in strict TS modeWhat's still pending after this PR
POST /api/runs— swarm run trigger (createdeal_runsrow →SwarmOrchestrator.run()→ persistCostLedger)cost_ledgertable exists; no write path yet)GOOGLE_OAUTH_CLIENT_ID/SECRET)DROPBOX_APP_KEY/SECRET)vercel.json)mainafter this mergesDB migrations (apply before/after merge)
How to verify
1. Health check (tests Supabase + Anthropic live)
curl https://your-app.vercel.app/api/health # Expected 200: { "supabase": "ok", "anthropic": "ok", "version": "0.5.0", "commit": "<sha>" }2. Sign up / log in
3. Upload a file
4. Jobs worker (empty queue)
5. Ingest a generic URL (Path B)
6. Run the swarm
# Will be enabled once POST /api/runs is built (next PR)7. Type-check
Vercel build status
Local build: ✅ Verified clean —
npx next buildpasses with 0 TypeScript errors across all 10 routes + middleware (Node 22, TypeScript strict).Vercel preview: 🔴 Failing — likely a Vercel project configuration issue not visible without credentials.
Diagnostic command:
npx vercel inspect dpl_J2WJd4QgXa1M1wJf3W3e2XgQWWxG --logsAcceptance checklist
AnthropicModelRouter— reads realresponse.usagetokens, computes USD, appends toCostLedgerAnthropicModelRouter— throws'ANTHROPIC_API_KEY missing...'if key absentSupabaseJobsQueue—claimNext()usesclaim_next_job()RPC (SELECT FOR UPDATE SKIP LOCKED)GET /api/health— pings Supabase + Anthropic; 200 when both ok, 503 when either failsPOST /api/ingest-link— auth-checks, ownership-checks, enqueues to realSupabaseJobsQueuePOST /api/jobs/worker—queued→running→done/failed;generic_webpagefetches + stores HTMLsupabase/migrations/20260510000004_jobs.sql—jobstable +claim_next_job()RPC + RLSUSE_MOCKS=trueUSE_MOCKSfallback removed for Supabase and Anthropic paths@anthropic-ai/sdkpinned to0.95.1;@supabase/supabase-jspinned to2.49.4[MOCK]in production paths, no placeholder URLs, no real secrets