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
-
[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
-
[KM-644] feat(report): button-triggered report generator + API
Rifqi Hafizuddin +1: Claude Opus 4.8A dedicated report service (not a chat skill/agent): reads a session's persisted AnalysisRecords + Problem Statement, makes ONE LLM call (the executive summary only), assembles everything else verbatim from records (INV-4), renders markdown, and persists an immutable versioned artifact. - src/agents/report/: schemas (AnalysisReport, DataSourceRef, ReportFinding + AttributedNote with plural record_ids, ProblemStatement stub), errors, ReportGenerator (deterministic assembly + 1 LLM call w/ fallback on failure), ReportStore (per-analysis advisory-lock versioning; unique(analysis_id,version)). - analysis_reports table (jsonb, one immutable row per version) + init_db register. - API: POST /report (generate), GET /report/{analysis_id} (list versions), GET /report/{analysis_id}/{version} (fetch); models/api/report.py; main.py wiring. - prompt: config/prompts/report_summary.md (synthesis-only exec summary). - record hygiene: Assembler caps raw retrieve_data table rows (kind="table") i…1570c5d -
[NOTICKET] feat(slow-path): persist AnalysisRecord via PostgresAnalysisStore
Rifqi Hafizuddin +1: Claude Opus 4.8Groundwork for generate_report - the slow path now persists a real, citable record that the report (next) renders from. Contract gaps (schemas.py): - stage: CrispStage added to TaskResult + TaskSummary, populated at all 3 TaskResult build sites (task_runner) + copied in assembler._build_record, so the report can group its method appendix by CRISP-DM phase. - AnalysisRecord gained identity: record_id (auto uuid), analysis_id/user_id (optional; stamped at persist time). Persistence: - PostgresAnalysisStore (store.py): save() never-throw idempotent upsert + list_for_analysis() oldest-first (the report render order). NullAnalysisStore kept for tests. AnalysisStore Protocol gained list_for_analysis. - analysis_records jsonb table (models.py), indexed by analysis_id + user_id; registered in init_db, created by create_all on startup (no migration). - chat_handler default store -> PostgresAnalysisStore; user_id stamped at save. Open: analysis_id is NULL until the Analysis State …09f8451
-
[KM-582][DED][AI] Fix Retrieval in Agentic Service
ticket: https://bukittechnology.atlassian.net/browse/KM-582 fix: replace LangChain ORM retrieval with raw SQL and fix pgvector collection name - Rewrite DocumentRetriever.retrieve() using raw SQL cosine/manhattan queries instead of LangChain PGVector ORM, bypassing asyncpg type-mapping issues (id String vs UUID column, jsonb_path_match binding quirks) - Fix _COLLECTION_NAME from "document_embeddings" to "documents" to match the collection name set by the Golang ingestion service - Fix collection_name in vector_store.py to match consistently - Fix Redis chat cache to store {response, sources} dict so cached replies also populate message_sources table - Add cache management endpoints: DELETE /chat/cache, /chat/cache/room/{id}, /retrieval/cache/{user_id} - Invalidate retrieval cache automatically after document processing - Update intent_router prompt: route topical/knowledge questions to unstructured even without explicit document mention; prefer unstructured when ambiguous…61c746f
-
fix build error in importing packages langchain_postgres
0e9263a -
Fix schema table langchain_pg_embedding
079dea0
-
feat/Catalog Retrieval System (#1)
- initial commit (8557a2045ca2c0873e07efdf6227064b83e4a1e5) - initial structure (efc0c0a8b2444014cbe74f04617c3c974d9915be) - [KM-553] initialize shared contract (f31f6731692b0199d8cb5c5d29dffa466d6d4ca0) - [KM-553] migrate retrieval layer and remove obsolete rag/tools modules (df220ea47c96eb8a1efa07c6eebef4604fc308d6) - [NOTICKET] catalog enricher + structured pipeline + on_db_registered (77ea82d29d86400c5ed30ac154be8df6a7e897eb) - Merge commit 'refs/pr/1' of https://huggingface.co/spaces/DataEyond/Agentic-Service-Data-Eyond-Catalog into pr/1 (0ae8717c7efce2cda14fe4b8caecd774459b1f6e) - [NOTICKET] SqlCompiler (Postgres) + DbExecutor (212dad360714508c1aa607995039e6818fa40f78) - Merge commit 'refs/pr/1' of https://huggingface.co/spaces/DataEyond/Agentic-Service-Data-Eyond-Catalog into pr/1 (faf8a4f6d7e06ccf1ce84c2e7f4990c79f27f843) - TabularIntrospector + on_tabular_uploaded trigger + 31 tests (ca425208969b72a20ed76f86ef0faa1a0e912339) - [KM 556] add columns field to QueryResult + update…6bff5d9
-
Merge dev_new to main (improve retriever and add querying) (#13)
- [noticket] add gitignore (c87f27f458854787102eebc110b178c2572ef8a6) - [NOTICKET]: add document pipeline, simplify document API (fb871f3d7db9c5a9c95a012761c4180a432e7e4b) - [NOTICKET]: update folder document_pipelines after pipelines (a4cf97ab3890e35831c0043a1d411c17d84f374b) - [NOTICKET][DB] refactor code to new repo (7f3bb9782bb9b6ace69e6be35377c12757a2f81d) - [KM-441] add mean and median (9b5933420821187e73bb72a896e28d7adf6d6137) - [NOTICKET] new metadata format for cleaner code (6b590d94c398ac4966a0e376f2809aa52c5ba022) - update document (5a69e0eecf80dd807565dbc369374e41450c37fc) - delete duplicate file (3848d7b262745b758069e3ab8089437ced42a45f) - edit document for new pipeline (425e021053c4de65e2598b0f5554b7c1044a904c) - [NOTICKET]: add CSV and XLSX file type (31920c3bc6f9faf9e07095a02fc1faf08adc246e) - [DB] fix/rename db_pipeline.py (d913315c356d741cc7a5a5b1f8e36ba41397f2ab) - [NOTICKET][DB] menyesuaikan format struktur db_pipeline sesuai dengan file lain (e13a9017e0f7fd26ef9b8a…52999bc
-
[KM-436][KM-437] add and modify for database and document pipeline (#3)
- [noticket] add gitignore (c87f27f458854787102eebc110b178c2572ef8a6) - [NOTICKET]: add document pipeline, simplify document API (fb871f3d7db9c5a9c95a012761c4180a432e7e4b) - [NOTICKET]: update folder document_pipelines after pipelines (a4cf97ab3890e35831c0043a1d411c17d84f374b) - [NOTICKET][DB] refactor code to new repo (7f3bb9782bb9b6ace69e6be35377c12757a2f81d) - [KM-441] add mean and median (9b5933420821187e73bb72a896e28d7adf6d6137) - [NOTICKET] new metadata format for cleaner code (6b590d94c398ac4966a0e376f2809aa52c5ba022) - update document (5a69e0eecf80dd807565dbc369374e41450c37fc) - delete duplicate file (3848d7b262745b758069e3ab8089437ced42a45f) - edit document for new pipeline (425e021053c4de65e2598b0f5554b7c1044a904c) - [NOTICKET]: add CSV and XLSX file type (31920c3bc6f9faf9e07095a02fc1faf08adc246e) - [DB] fix/rename db_pipeline.py (d913315c356d741cc7a5a5b1f8e36ba41397f2ab) - [NOTICKET][DB] menyesuaikan format struktur db_pipeline sesuai dengan file lain (e13a9017e0f7fd26ef9b8a…2ba0613
-
[KM-467] [DED][AI] Orchestration Agent - Init
- https://bukittechnology.atlassian.net/browse/KM-467027123c