Skip to content

Add startup configuration validation with clear warnings for misconfigured environments #48

Description

@aadityat23

Section: Configuration & Environment

Problem
If HF_TOKEN is missing, the app currently degrades silently per-request rather than telling the operator at startup what's disabled and why.

Why this matters
A contributor spinning up the backend for the first time has no single place that tells them 'RAG is disabled because PINECONE_API_KEY is unset' or 'LLM inference is disabled because HF_TOKEN is missing' — they discover it only when a specific request fails.

Acceptance Criteria

  • On startup, the app logs a summary of which optional subsystems are enabled/disabled based on current configuration (RAG, Supabase history, LLM inference, Redis cache if added)

  • Missing-but-optional config produces a clear one-line warning, not silence

  • Missing-and-required config (if any) fails fast with a clear error rather than failing on the first request

  • Covered by a small startup test asserting the summary log is emitted

Files likely to modify

finverify-terminal/backend/app/main.py
finverify-terminal/backend/app/config.py

Skills required: Python, FastAPI lifecycle events

Estimated difficulty: 2/5

Estimated effort: 3-5 hours

Labels: backend, good first issue, dx

Dependencies: Centralize configuration into a single pydantic Settings module

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions