Affected Component
Backend API (FastAPI — apps/backend/)
Bug Description
While attempting to run the FastAPI backend locally, the application fails during startup with an ImportError related to metric aliases imported by the ingest route.
The backend does not start successfully, preventing contributors from accessing API endpoints, testing backend functionality, or using the development server.
The error occurs when apps/backend/routes/ingest.py imports INGEST_COUNTER and REASONING_TRIGGER_COUNTER from libs.observability.metrics.
Steps to Reproduce
- Clone the repository.
- Install project dependencies.
- Navigate to the backend directory:
- Start the FastAPI server:
uvicorn main:app --reload --port 8000
- Observe the startup failure and traceback in the terminal.
Expected Behavior
The backend should start successfully and launch the FastAPI application without import errors.
After startup, contributors should be able to access the API server and available endpoints (including development and documentation endpoints) normally.
Actual Behavior
The backend fails during startup and the FastAPI application is not launched.
Instead of starting the server, an ImportError is raised when importing metrics used by the ingest route:
ImportError: cannot import name 'INGEST_COUNTER' from 'libs.observability.metrics'
As a result, the backend cannot be started and API endpoints are unavailable.
Python Version
3.11
Operating System
macOS
Inference Device
CPU
Error Log / Traceback
Traceback (most recent call last):
File "/Users/.../apps/backend/routes/ingest.py", line 16, in <module>
from libs.observability.metrics import INGEST_COUNTER, REASONING_TRIGGER_COUNTER
ImportError: cannot import name 'INGEST_COUNTER' from 'libs.observability.metrics'
Screenshots or Recordings
Additional Context
The issue was encountered on a fresh local setup while attempting to verify backend functionality.
No custom configuration changes were made before reproducing the error. The failure occurs during application startup and prevents the FastAPI backend from launching, which also blocks access to API endpoints and local development workflows.
Checklist
Affected Component
Backend API (FastAPI — apps/backend/)
Bug Description
While attempting to run the FastAPI backend locally, the application fails during startup with an ImportError related to metric aliases imported by the ingest route.
The backend does not start successfully, preventing contributors from accessing API endpoints, testing backend functionality, or using the development server.
The error occurs when
apps/backend/routes/ingest.pyimportsINGEST_COUNTERandREASONING_TRIGGER_COUNTERfromlibs.observability.metrics.Steps to Reproduce
cd apps/backendExpected Behavior
The backend should start successfully and launch the FastAPI application without import errors.
After startup, contributors should be able to access the API server and available endpoints (including development and documentation endpoints) normally.
Actual Behavior
The backend fails during startup and the FastAPI application is not launched.
Instead of starting the server, an ImportError is raised when importing metrics used by the ingest route:
As a result, the backend cannot be started and API endpoints are unavailable.
Python Version
3.11
Operating System
macOS
Inference Device
CPU
Error Log / Traceback
Screenshots or Recordings
Additional Context
The issue was encountered on a fresh local setup while attempting to verify backend functionality.
No custom configuration changes were made before reproducing the error. The failure occurs during application startup and prevents the FastAPI backend from launching, which also blocks access to API endpoints and local development workflows.
Checklist
mainbranch.