Spaces:
Sleeping
Sleeping
Commit History
-
0.6.5: Fault-tolerant startup + route guards + /api/status errors
If reference CSVs are missing, the pipeline fails to import, or gallery prewarm raises, the prior lifespan would crash uvicorn and HF would return a 502 with no diagnostic path. Now each of the three startup steps (pipeline build, gallery prime, metrics snapshot) is wrapped independently — failures are logged with full tracebacks and recorded to app.state.startup_errors. /api/status surfaces the error dict so the UI banner can show exactly which facet failed. Route guards: POST /api/code and POST /api/benchmark return 503 with a pointer to /api/status when the pipeline is None, instead of crashing on AttributeError. UI: ServerStatus interface gains optional startup_errors: Record<string, string>. Tests: test_api.py adds a positive assertion that /api/status reports "ok" with the local reference data. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>14a3550 -
Milestone 0.2.1: API + linker tests, real eval subcommands, SOAP headers
- tests/test_api.py — FastAPI integration tests via Starlette TestClient covering /api/healthz, /api/code, /api/gallery, /api/metrics, /api/reference/hcc, and input validation on empty notes. - tests/test_linker.py — coverage for ExactMatchLinker (aliases, exact descriptions, misses) and TFIDFLinker (alias preference, paraphrase retrieval, span-type filter). - eval_harness/cli.py subgroups + calibration: replace stubs with real implementations that reuse app.api.metrics.snapshot() so the CLI and the UI report from the same source. - Segmenter: accept SOAP-style single-letter headers (S / O / A / P). The existing multi-letter patterns take precedence when both would match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>867a3e1