1. ARR disambiguation: removed "revenue" from the ARR regex so that
"FY2025 revenue $1.4M" no longer shadows the explicit "ARR: $3.7M"
headline. Added an "arr is reported at" pattern as a secondary match.
2. Customer concentration: added pattern for "Top customer contributes X%"
(singular, no count after "top") and "X% of revenue/ARR [top/single]"
— the previous patterns required a digit ("top 3 customers") and missed
single-customer concentration statements.
3. Legal placeholder filter: the StrataIQ appendix had 30 boilerplate
"Due Diligence Section #N ... investigation area" sections whose word
"investigation" triggered the legal parser. Added a skip guard for
lines matching "this section contains additional" or "due diligence
section N".
4. Uploaded-pitch risk signal scan: the market competition scan now
includes raw doc_text so "Microsoft Copilot / OpenAI Enterprise /
Anthropic Team" in the document body triggers the heavy-competition
penalty …
fix: eliminate cross-company contamination in uploaded pitch evaluation
Root cause: three-layer bug caused StrataIQ uploads to be evaluated as NovaPay.
Layer 1 — pitch_loader.py: resolve_uploaded_pitch() searched only the public
MemoryGraph (missing uid-scoped incidents for authenticated users) and returned
a relative filename like pitch_INC-xxx.json that _load_pitch_file() would look
for in data/ — where it doesn't exist — then silently fall back to novapay_pitch.json.
Fix: check uid-scoped graph first, then public; return absolute path so the file
is always found regardless of which memory directory it lives in.
Layer 2 — api/main.py trigger_deal: when resolved_pitch was None (company name
lookup failed), sim_state.active_pitch_file was set to None, causing every
subsequent _load_pitch_file() call during the run to fall through to the NovaPay
default. Fix: only update active_pitch_file when resolved_pitch is not None.
Layer 3 — api/main.py mock-LLM: the /mock-llm endpoint ran in a fresh HTTP
request context where current_pitch_file ContextVar was neve…
fix: apply deep audit — 35+ bug fixes across backend, engine, and frontend
Root-caused the Windows connection failures from the client logs:
1. mcp-remote OAuth 404'd because the 401 from /mcp/ advertised only
`WWW-Authenticate: Bearer realm="FUSION MCP"` with no resource_metadata
pointer. Clients couldn't discover the auth server, so they guessed
wrong registration paths → 404. Now the 401 includes
resource_metadata="<base>/.well-known/oauth-protected-resource"
(derived from x-forwarded-* so it's correct on any deploy).
2. Newer clients try the path-aware well-known URL first
(/.well-known/oauth-protected-resource/mcp) which 404'd. Added that
variant plus /.well-known/oauth-authorization-server/mcp (and trailing
-slash forms) returning the same metadata.
3. mcp_proxy.py was silent on failure. Added stderr diagnostics (startup
banner, explicit 401/429/network messages, missing/malformed key
warning) that surface in Claude Desktop's MCP log — so the next setup
problem is self-explaining instead of a blank disconnect.
The pr…
feat: OAuth 2.0 MCP auth + one-click connect for all devices
Backend (api/oauth.py):
- /.well-known/oauth-authorization-server — MCP discovery endpoint
- /.well-known/oauth-protected-resource — resource metadata
- POST /oauth/register — dynamic client registration (PKCE S256)
- GET /oauth/authorize — redirects to frontend consent page
- POST /oauth/callback — verifies Firebase token, issues one-time code
- POST /oauth/token — exchanges code for fus_<uid> access token
The issued token is identical to the personal MCP key, so no changes to
the existing auth middleware or memory graph isolation are needed.
Frontend (pages/oauth.tsx):
- Clean consent page: Firebase Google sign-in → OAuth code → redirect
- Auto-completes if already signed in, works on all browsers/OS
Settings (SettingsView.tsx):
- New "Claude.ai ★ Best" tab: 3-step connect flow, copy URL + open claude.ai
One connection syncs to Claude Desktop, web, and mobile automatically
- Claude Desktop tab: switched to native url+headers format — works on
Windows/Mac/Linux identically, no…
Writes a timestamped record to /diagnostics/probe_tests so RTDB
connectivity can be verified end-to-end without triggering a full deal.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: surface RTDB failures in logs instead of silently swallowing them
- Add probe() to core/rtdb.py that makes a real network call at startup
- Wire probe() into lifespan so misconfig shows immediately in HF Space logs
- Replace bare `except Exception: pass` at all rtdb call sites with warning logs
- Fix misleading comment on _fdb.reference("/") — it does not validate the URL
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: harden multi-user isolation, auth persistence, and data safety
- broadcast authoritative weighted_score/verdict/confidence as structured
fields so the dashboard no longer depends on regex-scraping LLM text
(weighted risk now shows the moment the committee concludes)
- normalize guest sessions to the __public__ memory namespace so deals are
written and read from the same place — history + verdict survive refresh
- add strict pitch-deck signal gate to /upload-pitch: non-pitch documents
are rejected with a clear message instead of producing a bogus verdict
- report download: parse JSON-or-text errors; stop a later upload from
clobbering a past deal's pitch lookup
- doctrine: senior-partner reasoning discipline + locked verdict format
- fix missing import asyncio (latent NameError in chat WebSocket)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat: increase document upload limit to 10MB and fix frontend compilation
- core/auth.py: initialize_app now includes databaseURL from env — without
this, all firebase_admin.db.reference() calls raised ValueError and RTDB
was silently disabled even when FIREBASE_DATABASE_URL was set.
- api/main.py: on WebSocket connect, upsert user profile and write a
session_connected activity so the Firebase Console shows live users
the moment they open the dashboard (not just on deal trigger).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- api/v1.py: fix 15 endpoints where uid=None fell through to global
memory_graph (leaking last user's deal data). All unauthenticated
requests now use isolated __public__ namespace.
- api/main.py: same fix on WS endpoint; wire Firebase RTDB writes on
deal verdict, session start, and user profile upsert.
- core/rtdb.py: new module — durable per-user RTDB storage for deals,
chats, sessions, activity. Falls back silently without FIREBASE_DATABASE_URL.
- frontend/components/MemoryView.tsx: replace bare fetch() with apiFetch()
so history and deal detail calls carry the auth token — fixes History
page showing blank after isolation fix.
- frontend/lib/firebase.ts: add databaseURL to Firebase config.
- frontend/pages/index.tsx: mobile responsive — px-4/sm:px-8 on all
sections, tighter hero padding, smaller font on mobile, overflow-x-hidden.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix: user isolation (3 leaks) + MCP UI key-first redesign
Isolation fixes:
- /api/status: sim state now scoped to triggering user's uid only
- /system/settings: same uid guard, add request param
- /ws/chat: uid-gate event forwarding so User A's events don't reach User B
MCP UI:
- Key input box at top: enter once, verified live against MCP endpoint
- Key stored in localStorage — survives refresh
- All commands auto-populate with real key once verified
- Locked/blurred state when no key; unlocks on verify
- Simple English, one Copy button per client, no jargon
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
HF Space converts FastAPI's auto-redirect (307 /mcp → /mcp/) into an
http://internal-host URL that mcp-remote rejects with 421. Now we catch
/mcp ourselves and issue a 308 redirect to the correct public https:// URL
built from x-forwarded-host headers. mcp-remote follows it to /mcp/ which
the FastMCP mount handles normally.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat: one-click MCP connect + fix HF Space redirect that broke Claude Desktop
- api/main.py: redirect_slashes=False — /mcp now serves directly, no 307
redirect that caused Invalid Host header (421) on HF Space proxy
- api/v1.py: _mcp_transports() auto-detects public URL from x-forwarded-host
headers so it returns the correct HF Space URL, not localhost:8000
- IntegrationsView: true one-click deep links — Cursor (cursor:// protocol),
VS Code (vscode:mcp/install), Smithery button, Claude Desktop auto-install
script, Windsurf config, manual JSON; frontend ignores localhost URL fallback
- Auth: user isolation per uid on WebSocket + rate limiting on deal trigger
- Profile: Google photo + display name in sidebar, Firestore upsert on trigger
- firebase.ts: remove broken signInWithRedirect, throw POPUP_BLOCKED instead
- base_agent.py: exponential backoff reconnect in real Band mode
- apiFetch.ts: auto sign-out on 401 (expired token)
- ErrorBoundary: catches render errors so one bad component can't blank dashboard
- smithery.json: Smithery registry config for one…
fix: resolve user data isolation for both mock and real modes across all REST endpoints