Commit graph

4 commits

Author SHA1 Message Date
slothitude
24cde4cdec Audit fixes: response_model validation, error handling, dead code, input sanitisation
- Add response_model to all 8 route endpoints for runtime validation and
  correct Swagger docs
- Remove global KeyError handler (routes catch it explicitly)
- Add catch-all Exception handler with logging for 500 responses
- Remove dead code in service.py get_case_graph (unused bucket variable)
- Explicit graph_backend validation in cmd_serve (memory|neo4j, else exit)
- Sanitise comma-separated query params (strip whitespace, filter empty)
- Move HTTPException to top-level import in routes.py
- Remove unused imports (Depends in dependencies.py, all_persona_names)
- Fix deprecated asyncio.get_event_loop() in test fixture

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-30 12:17:55 +10:00
slothitude
792dbceab5 Fix serve command: handle outside asyncio.run() to avoid nested loop error
uvicorn manages its own event loop, so cmd_serve must not be called
inside asyncio.run(). Also deduplicate redundant VectorIndex branching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-30 12:12:09 +10:00
slothitude
6374aea0a2 Stage 9: add read-only FastAPI query API for juror RAG queries
8 GET endpoints under /api/v1 for health, personas, cases, vector search,
juror context, and hybrid search. Includes QueryService composing SubgraphQuery
+ VectorIndex + GraphDB, Pydantic response models, error handlers, and
`serve` CLI mode via uvicorn. 20 new tests, 190 total, zero regressions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-30 12:08:55 +10:00
slothitude
d77fe12cfc AuCourtIngest: complete 8-stage Australian legal case ingestion pipeline
Source layer (5 court sources), processing pipeline (parse/extract/chunk/embed/graph),
property graph with 8 node types, juror subgraph queries with 6 personas,
orchestrator with bootstrap/watch/backfill/audit/process modes, 170 tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-30 11:56:23 +10:00