Commit History
-
[NOTICKET] slow path: don't re-trim a payload the tool already bounded (A30 follow-up)
Rifqi Hafizuddin +1: Claude Opus 5Sofhia's a2089edb caps analyze_anomaly's sample at source (200 -> 50) and reports `anomalies_total` / `anomalies_shown` beside it. That is the right layer for it: my A30 cap protects what reaches the LLM, hers protects what gets persisted to results_snapshot and traced to Langfuse, where the 50k blob was still landing whole. But the two stacked badly. Her cap alone brings the padb payload to 1,180 tokens -- already sane. My generic list trim then cut it to 691 and left anomalies_shown: 36 beside a list of 20 rows + "… (+16 more)" The count is recoverable from the marker, and `anomalies_total` was exact throughout, so nothing was ever wrong -- but a narrative reads straight past that, and "a number in the payload that disagrees with the payload" is the exact class of bug this round has been chasing. Fixed at my end, not hers: `_bound` now leaves a value alone below _MIN_TRIM_CHARS (8,000). The bound exists to stop floods, not to second-guess a tool that already bounded itself …7ffe004
-
[NOTICKET] fix(planner/slow path): checkable criteria in Indonesian, bound meta too
Rifqi Hafizuddin +1: Claude Opus 5BUG 7 -- check 7 only spoke English, on a majority-Indonesian product. _CHECKABLE_TOKENS was ("rate", "count", "match", "produced", "above", "below", "equal"). The planner writes success_criteria in the language of the question, so an Indonesian criterion could not pass except by luck. Every Indonesian turn in the dry-run burned a retry here, and one degenerated past that: told "not checkable" twice, the model dropped `success_criteria` AND `expected_output` altogether and the turn died. The field-dropping looked like a schema bug (Bug 5) but this was upstream of it -- Bug 5's fix caught the fall, this removes the push. Added the Indonesian equivalents. Parity, not loosening: each mirrors an English token already trusted ("menghasilkan" = "produced", "jumlah"/"baris" = "count", "minimal"/"lebih"/"kurang" = "above"/"below"), so a criterion that fails in English still fails in Indonesian. Pinned by a test asserting a vague criterion is refused in BOTH languages. BUG 8 -- `meta` was st…a6c79c9 -
[NOTICKET] fix(slow path): retry malformed plans, bound stats in the assembler prompt
Rifqi Hafizuddin +1: Claude Opus 5Two bugs the 2026-09-17 dry-run surfaced, both found by running the thing rather than by reading it. BUG 5 -- a malformed plan crashed the turn instead of being retried. Structured output came back with task t1 missing `expected_output` and `success_criteria`. That fails inside `chain.ainvoke` -- pydantic, before PlannerValidator ever runs -- and the call sat OUTSIDE the try. So this one failure mode skipped the retry loop every other planner mistake gets, propagated raw, and reached the user as their literal answer: ERROR: Analysis failed: 2 validation errors for TaskList tasks.0.expected_output Field required A dropped field is exactly as retryable as a bad column_id. The call now sits inside the loop, and the pydantic message names the missing field, so it is fed back compacted (`loc: msg`, no docs URLs) and the next attempt is told what to fix. On exhaustion the caller gets a PlannerError, never a raw pydantic dump. BUG 6 -- `stats` outputs were rendered to the assemb…7a89a2b -
[NOTICKET] tools: quality blocks for forecast + ab_test, forecast backtest, CK7 fix
Rifqi Hafizuddin +1: Claude Opus 5Extends the reserved `quality` convention to the tools where it means something, and fixes a CK7 message that was wrong for half its inputs. analyze_forecast -- the substantial one. It reported NO accuracy at all, so "how accurate is it?" had no answer. Now backtests: hold out the last h periods (bounded by a quarter of the series and by the fitting floor), refit, and score with MASE -- mean absolute error over the naive "next = last" error on the training span. MASE is scale-free (Hyndman & Koehler 2006) and, unlike MAPE, neither explodes near zero nor punishes over-prediction asymmetrically. Both fits run in ONE run_fit call, so a forecast still costs one thread hop and one timeout. A series too short to hold anything out, or one that never moves, ships UNVALIDATED -- also weak, with the two causes reported as distinct reasons rather than one wrong one. analyze_ab_test -- free and exact: the statistical verdict IS the quality verdict. A gap the test cannot separate from noise is we…2082eba
-
[NOTICKET] feat(tools): analyze_importance + analyze_cluster (unregistered) + CK7
Rifqi Hafizuddin +1: Claude Opus 5A8 and A10. Both files are INERT on purpose: not in _DISPATCH, not in either registry list. registry.py and invoker.py are the two files every tool addition touches, so they stay single-owner until Sofhia makes the call -- the DEFERRED mechanism means an unregistered tool costs nothing. analyze_importance -- rank what explains a target. Standardised coefficients, NOT permutation importance. For a linear model the coefficient IS the importance and comes free with the fit; permutation re-scores once per feature, which is the E4 latency tall pole, and buys nothing here. Ridge for a numeric target, Logistic for a categorical one, auto-detected. Leakage-safe: the scaler is fitted on the TRAIN split only, so no test statistic reaches the fit -- the thing R-3 and the survey literature both single out. analyze_cluster -- discover groups nobody named yet. KMeans with k chosen by silhouette over 2..8, every candidate score returned. Scatter plots two REAL columns rather than PC…9a29ca3 -
[NOTICKET] feat(slow-path): per-step SSE progress, bilingual (A22)
Rifqi Hafizuddin +1: Claude Opus 5A structured_flow turn took ~12s behind three stage pings -- "Planning", "Running N steps", "Composing". Past Miller's ~10s attention threshold what a waiting user needs is evidence that something is happening, not a faster answer, so the TaskRunner now announces each wave BEFORE running it. A 4-task plan emits ~6 status events, not 3. New src/agents/slow_path/progress.py holds the labels: - BILINGUAL. The three existing stage pings were English-only on a product whose traffic and eval set are majority Indonesian; they follow reply_language now, the same "id" if reply_language == "Indonesian" test refusals.py uses. - A bounded activity vocabulary keyed by tool ("retrieving data" / "mengambil data"), NOT the task's objective. Plan internals are deliberately English, so using objective as status text would show English prose to an Indonesian user. - Unknown tools fall back to "analysing" / "menganalisis", so the six tools still to land (DEV_PLAN 0.9) produce s…06aecc8
-
/feat knowledge management (#20)
- [NOTICKET] docs: knowledge pipeline test integration — context, audited task checklist, DEV_PLAN §0.8 (8e69dc6c638509f4dd7b6775d520fb4aa4efbd3e) - [NOTICKET] docs: knowledge pipeline — reframe kex as prototype, not port target (7cce5ffc9ab88791ac139dbef8e88e124a3d049e) - [NOTICKET] feat(eval): knowledge-extraction gold set, scorer + frozen prototype baseline (60cf4a885ef31a8aa64916f5a70ac5a0e8062c5f) - [NOTICKET] chore: add missing planner and readiness eval results (bd6659b3bf523597e4482b04ab1fcff5e1284d25) - [NOTICKET] feat(knowledge_extraction): free stages — models, seam adapter, filters, cluster, ranking (024c30abd1189119d33508eded334fe5a3ed5011) - [NOTICKET] fix(knowledge_extraction): move runner into the package; fix two ranking defects (72605ff6876a7936ab685d417c766ce820f6214b) - [NOTICKET] feat(knowledge_extraction): span filter — E1 recall 0.8537, matches the frozen baseline (3a016343398753cf730d50548c0e92ff47c6716c) - [NOTICKET] feat(knowledge_extraction): paid extraction …b68816f
-
/fix planner count and report (#19)
- /fix planner count question (11de970ff65be9b4f81f773cfb355d3dc57358d7) - [noticket] fix report bug where some answered analysis isnt included in report summary answers (8dec1825cf803ad28f4ff0400b9c373250a7d90a) - [NOTICKET] fix: split report floor from report body; scope analysis reads by user_id (fd4865b20dfc46782706be9aab318f909b9903c3) - [NOTICKET] docs: sync report floor/body + security posture; add review remediation tracker (fc5200c994441ec505ea7a82469da577afe170a5) - [NOTICKET] test: planner eval harness (rule-compliance, --selfcheck/--rescore) (4292522aa3fa3a7af8f933307334cb7e5eb0b377) - [NOTICKET] eval: repair readiness harness; commit intent/help/readiness baselines (08a0a4ad5eacc6c90df22fab5be69f2d33579f29) - [NOTICKET] fix: compiler parity — F-17 fabricated column, F-18 LIKE nulls, F-25 empty in/not_in (8f736f90f1958960a83847d332b45b13fa346168) - [NOTICKET] feat: bound catalog render + blob read; scope charts/traceability; mark degraded seams (0cb7d53cb6f7f7e7b687dd6d9c27…f282b15
-
/fix change model to gpt 5.4 mini (#17)
- [NOTICKET] chore: rename LLM env quad __4o -> __54m (GPT-5.4-mini) (790ef0c7aaac6e76eb01b0ef9a3398ff4249416d)d65c41d -
fix/ check and new chart tool (#16)
- check: table-level column drill + drop misleading "name a table" hint (ef0c7b1c5aa49a244b02f1b5eea15cc77dcf2bcb) - [KM-715] charts: render_chart tool + message_charts store + GET /api/v1/charts + planner viz slice (87cfcf884d923ee4bcd722e0e4ef4d90d7eaedca) - [KM-715] checkpoint: S1a deterministic quality checkpoint between runner and assembler (f3c8de34dc19a573031b67fd4f48dcfbadcdfed8) - [KM-715] docs: sync REPO_STATUS/DEV_PLAN + land SPINE_V2_PLAN (W1/W2 done) (434eacbf2ac8324188ebe5e32775dbc9d2a3f49a) - planner: value-handoff (${tN.col} → list) for tabular lookup/anti-join (54070ac1407b751000e49dfe7f102a2be5ab1ff8) - [KM-715] charts: GET /charts by message_id only + tri-state status marker (b8d15761addf4d499c9631df64e7693aa1d61fa2) - [KM-715] report: embed charts as plotly EDA fences; render_chart counts toward the floor (89db8be6b6f11e86ad0776d2ee07f2306e3b6079) - [KM-715] docs: contract + status deltas for the charts lead-review round (96347ee7c55a4eb39a906409ec214463e25c5e35) - …5a60e93
-
/fix help and tools analyze (#14)
- [KM-711] Retire /report slash command; report is Generate-button only (f7f7b172da0dc16adac0a7555f6d34a704cc2050) - fix(analyze_trend): handle value_column == date_column (count events per period) (55e3327f7b2e21a954b317e143f46bcea8b5ada7) - [KM-711] Docs: drop /report from list_skills catalog examples (0772863b296e2ed3e2d559df05e98540764e58b0) - fix(planner): reject inlined table-ref as analyze_* data (Pattern A) (776fae3c7c6e3d3a07c22bef10898f6b1c33c701) - fix(analyze_aggregate): reject non-string group_by (CASE/binning) keys (b40fa76e2fa68572dad0d8532e07076207095d6b) - fix(planner): reply-language for infeasible_reason + answer-only-asked rule (4d89d7d93938e41892979cd20e5ccf0c97441dac) Co-authored-by: Sofhia Az-Zahra <sofhiaazzhr@users.noreply.huggingface.co>17e31c6
-
/fix planner and report (#13)
- [KM-644] planner: infeasible plan outcome + entity-ranking few-shots (089b69d9b6111e813307c6afbd3e7613bb823f9d) - [KM-644] harden query path: grouped-select rule, int-date trends, sample decode, trace guard (74ad5261736bda0bd72bccdb41565ea67313993a) - [KM-703] add analyze_merge tool: two-table combine (analytics.combine) (8abf635532366d670367557a3ffa03d42371d831) - [KM-567] planner support for analyze_merge: data_right guard + two-retrieve merge few-shot (a029a843247e6ea4d3c79a4e2c1b7571ba4cda69) - [KM-644] report v2: BQ answers, unresolved/excluded sections, evidence tables + curation/readiness endpoints (4ceb058d85c5a2a289443b9411d2b345027fa226) - [NOTICKET] refactor: mint message_id as UUID to mirror analyses_messages id shape (4253733b6b8db0449a82442a915c732ddd55f528) - [KM-644] report: drop Notes/Unresolved/Method sections from rendered markdown (compact report) (eef6de811a139402c79fd74ad4adfc00cf7aff01) - /edit md file (8198cc188ff05a2798ae2056b90b6e56e1bea87b) Co-authored-by…49b0848
-
/fix validator and report (#10)
- /fix report: remove record_id hash citations, EDA (for future tool) change to data source, transform to mdx-safe (b1b101730ccf5628e43e80f2ad654f78fbed5207) - [NOTICKET] fix(planner): repair near-miss catalog ids in QueryIR before validation (aacd4d13def258a9815761aecbd7b246a8dae9fc) - /fix report: group findings by analysis, dedup, code-span-safe MDX escaping (029b48894e9f79af6c0d81c00a2d811a982f87ae) - [NOTICKET] fix(tools): log swallowed analytics tool errors in AnalyticsToolInvoker (93d9381b2a5f5efe058c913fe0b793ce994a9097) - fix(planner): harden plan validation to reduce retry thrash on structured questions (1619dd3c0fa74825010c7af6d4b375e3b9404847) - [NOTICKET] fix(tools): coerce numeric-string columns before analyze_* compute (6bda333866a1a8ccf1b3fe6fcee7a8e1832f28d7) - fix(planner): correct top-N guidance — in-query ranking IS supported (99aa4141aed8241a625d290fb170f74192a6d831) - feat(guardrails): add input guard, out_of_scope intent, and refusal handling (0bbc27bc40ba20e7a8e…0e5fdb5
-
feat/Analysis State & Report Rework (#4)
- [NOTICKET] Add project repo documentation (ade9c0c635b1bb6f171a3f4e710e6d0f9bae28f3) - [KM-674] feat(report): adapt report generator to objective + business_questions (9bd8ec51fdcd5057b5e8ba6b219a7d9dce945144) - [NOTICKET] Add revision plan md file (e0384e1dc600b2496f96cbba152e616d65650f07) - chore(docs): tidy root markdown — archive stale docs, delete superseded ones (4835fb85915bd69079fb43d7c602774d514e02ae) - [KM-652] refactor: remove problem_statement skill + problem_validated gate (057e0b24b56dd697603d183f508cb1e8a87268fd) - [KM-678] feat(tools): trim FE slash menu to /help + /report (fed17ccc98ec523088c482673132763826f86701) - [NOTICKET] docs: sync DEV_PLAN status (#8/#9/#20) (e936cfafdfde1385fe16bd7e3796e7d46c193197) - [KM-679] fix(help): drop problem_statement refs after KM-652 (0bec4725db572d492634ced6a80ef6e65d075edc) - [KM-680] feat(report): show author display name (users.fullname) (9bccc122878fbdbae0ac1bd0b4316f5ea8af658c) - [NOTICKET] docs: add API_ENDPOINTS.md (FE surf…0e02a0f
-
feat/Knowledge & Data Tools (#3)
- [KM-641] refactor(tools): trim analytics registry to 4 active tools (66e2e4df66f1abf7eaa7e442d9900d428696ece4) - [NOTICKET] docs: add checkpoint plan for 2026-06-17 sync (8c1bb63ebdee02f9db0da9fc2b2269823b0a7688) - [KM-642] refactor(tools): rename data-access tools to data/knowledge naming (c38c0c29d3e6b245f67d03f2c35e451900e1abdb) - [KM-643] feat(tools): merge data sources into data_check + add knowledge_check (4bd5f1efdc560a64092cc8df672a7990fa949b59) - [NOTICKET] docs: record KM-642/643 in checkpoint plan + PROGRESS (4c57588b90fe0cac8d0d4d22cfe5701fc9eb52dd) - [NOTICKET] fix(chat): scope response cache by user_id + drop TTL to 1h (R5) (b701e95d300c7d2480a3608b2d4da6dfe102b19a) - [NOTICKET] feat(slow-path): persist AnalysisRecord via PostgresAnalysisStore (09f845188226dd01633cf74525caa569e4a7d37a) - [NOTICKET] Adopt verb-first skill naming (2d6406def7ed45edd1226e96645ba2a5cdbfa3d0) - [NOTICKET] docs: sync checkpoint plan — verb-first tool names + report-as-API (3b399f84d73b0d98bd99…0721bb4
-
feat/Planner Agent (#2)
- [KM-567][AI] Planner agent: contracts, schemas, inputs, registry (be96601ad46c00e8e789768dd6e89c2db827bde4) - [KM-567][AI] Planner agent: prompt + few-shot examples (83ba6b1743370145454d9315224eeb7b2d12ac18) - [KM-567][AI] Planner agent: validator + service (72306d0ce92c76d60117a20c701c7f8185bcfeef) - [KM-567] docs: record Phase 3 Planner agent in PROGRESS.md (ba2fa8892392028c8d13646c09d1155bbf34e703) - [KM-567][AI] Planner agent: fix PII leak + placeholder/retry robustness (6b3637dda097f16cd98d4b9ad6094fdaed6d1346) - [KM-624] Implement Compute Functions Tools (78c598c22d2f2a14229a83c3f43fa98c5d520ae7) - [KM-624][AI] Planner: realign stub registry + examples to composite analyze_* tools (93a24dabf48d8121e981cc470c835cb10badb62a) - [KM-624] docs: record tool taxonomy + ownership revision in PROGRESS (f3461142542f6216aff23b30a1321dfb4654afdc) - [KM-626][AI] Slow-path agent: seam contracts + TaskRunner (ac310de551d0888ccfef31e981e22d88f54c6a38) - [KM-626][AI] Slow-path agent: Assembler…81e5fe7