Commit History
-
[KM-652] refactor(db): align analysis-family models to the dedorch schema
Rifqi Hafizuddin +1: Claude Opus 4.8Repoint our SQLAlchemy models to the Go-owned dedorch tables (Go owns migrations; we are consumer-only). Base tables already matched; only the analysis family differed. - analysis_states -> `analysis`: table rename; id/report_id -> Postgres uuid. - analysis_data_sources -> `data_sources`: richer shape (id, type, name, reference_id, bound_by, bound_at, metadata, created_at). binding_store reads `reference_id`; /analysis/create snapshots each source's type+name from the catalog (fail-open). `metadata` mapped as `source_metadata` (reserved name). - analysis_reports -> `reports`: flatten to title + content (rendered markdown) + generated_at + version; drop user_id/jsonb data. ReportStore writes title+content and rebuilds a minimal AnalysisReport on read (rendered_markdown = content; structured fields empty — markdown-only per the 2026-06-23 checkpoint). Deferred (pending lead): analysis_records has no dedorch table, so the report generator / record persistence / readiness flo…4f0ff12 -
[NOTICKET] fix supaya swagger bisa run
Rifqi Hafizuddin3786e3a
-
[KM-652] feat(analysis): GET /analysis/{id} + GET /analysis (read endpoints)
Rifqi Hafizuddin +1: Claude Opus 4.8The FE workspace + sidebar need to read analysis state back; only create existed. Add: - GET /analysis/{id} — full state (8 fields) + bound data_source_ids; 404 if absent - GET /analysis?user_id= — a user's analyses, most-recently-updated first (summary) Extract _serialize_state so create + detail share one payload shape. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>4c5cff8 -
[KM-652] feat(analysis): #10 data-source binding (analysis-owned join table)
Rifqi Hafizuddin +1: Claude Opus 4.8Persist which catalog sources an analysis is scoped to, and consume it: - New analysis_data_sources(analysis_id, source_id) join table (Option A: analysis-owned, leaves the 8-field state contract untouched). Written atomically with state + room in /analysis/create. - AnalysisDataSourceStore read seam. structured_flow scopes its catalog to the bound sources (chat_handler._scope_to_binding); the report's data appendix scopes _build_data_sources to them. Both fail-open: no binding / legacy room / read error -> whole catalog, so nothing breaks until the FE sends ids. - /analysis/create dedupes + returns data_source_ids. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>4c143c4
-
[KM-652] feat(orchestrator): analysis state + gate wiring + problem_statement skill
Rifqi Hafizuddin +1: Claude Opus 4.8Wire the gated analysis flow end-to-end. The gate is OFF by default (ENABLE_GATE) so live structured_flow is unchanged until the frontend creates analyses. - Analysis State: `analysis_states` table (shared id with `rooms` — analysis_id == room_id), `AnalysisStateStore` (get/create/update), `get_analysis_state` seam (fails closed to not-validated). 8-field contract: id, analysis_title, problem_statement, problem_validated, owner_id, report_id, created_at, updated_at. - POST /api/v1/analysis/create — creates Room + analysis_states atomically with a shared id; data-first check. - gate.py: rule keys on `problem_validated`; stub fixtures for build/test. - problem_statement skill: LLM drafts/refines, deterministic validator decides the pass, writes problem_statement + problem_validated to the store. - chat_handler: thread `analysis_id` (= room_id); apply gate before dispatch behind `enable_gate` (redirect structured_flow -> problem_statement until validated). - settings: ENABL…adcc635