ADI576 Cursor commited on
Commit
9b38d2f
·
1 Parent(s): 6b21561

fix(health): register route on health() not helper

Browse files

Decorator was on _frontend_build_sha(), causing 500 on /health and breaking HF sanity checks.

Co-authored-by: Cursor <cursoragent@cursor.com>

Files changed (1) hide show
  1. backend/main.py +1 -1
backend/main.py CHANGED
@@ -179,7 +179,6 @@ def _ensure_session(email: str, session_id: str | None, input_mode: str, summary
179
  return create_session(email, input_mode, summary)
180
 
181
 
182
- @app.get("/health", response_model=HealthResponse)
183
  def _frontend_build_sha() -> str:
184
  sha_path = Path(__file__).resolve().parent.parent / "static" / ".build-sha"
185
  try:
@@ -188,6 +187,7 @@ def _frontend_build_sha() -> str:
188
  return "unknown"
189
 
190
 
 
191
  def health() -> HealthResponse:
192
  key = os.getenv("ARMORIQ_API_KEY", "")
193
  config_path = Path(__file__).parent / "armoriq.yaml"
 
179
  return create_session(email, input_mode, summary)
180
 
181
 
 
182
  def _frontend_build_sha() -> str:
183
  sha_path = Path(__file__).resolve().parent.parent / "static" / ".build-sha"
184
  try:
 
187
  return "unknown"
188
 
189
 
190
+ @app.get("/health", response_model=HealthResponse)
191
  def health() -> HealthResponse:
192
  key = os.getenv("ARMORIQ_API_KEY", "")
193
  config_path = Path(__file__).parent / "armoriq.yaml"