Commit History
-
[NOTICKET][AI] refactor(planner): R11 - single-source placeholder regex + name-checked data-access specs
Rifqi Hafizuddin +1: Claude Opus 4.8Comments are not a sync mechanism. Remove the two duplicated definitions on the agent side. - PLACEHOLDER_RE: defined once in planner/schemas.py (it's part of the ToolCall ${t<id>} placeholder convention); planner/validator.py and slow_path/task_runner.py now import it instead of each compiling their own copy "kept in sync" by comment. - planner/registry.py still holds local data-access spec BODIES (stub pending KM-465 #4) but derives/validates their NAMES against the canonical src.tools.data_access.DATA_ACCESS_TOOLS: _data_access_slice() raises at default_registry() if a tool is added/renamed/removed upstream, instead of drifting silently. Registry output unchanged (same 12 tools, same order). Tests: 51 passed (planner + slow_path); ruff clean; registry builds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>0f2b85e -
[NOTICKET][AI] Planner: drop parallelizable_with from Task
Rifqi Hafizuddin +1: Claude Opus 4.8Remove the unused parallelizable_with field and its validator check (5). TaskRunner derives parallelism from depends_on alone, so the field was redundant. Strips it from schema, validator, all few-shots (A-D), and the planner prompt. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>272a186
-
[KM-567][AI] Planner agent: fix PII leak + placeholder/retry robustness
Rifqi Hafizuddin +1: Claude Opus 4.8Review follow-ups on the Planner agent: - inputs.py: suppress a PII column's top_values when building CatalogSummary. Previously only sample_values were nulled, so a low-cardinality PII column's top_values (same class of data) could reach the planner prompt. Now both are suppressed. (Regression test added.) - validator.py: a ${tN} placeholder is now valid when its target is a transitive ancestor, not only a direct depends_on. Cycle detection moved ahead of the placeholder check so ancestors are well-defined on a DAG. This stops valid plans (target reached via an intermediate task) being rejected. - service.py: floor max_retries at 1 (mirrors QueryService) so a misconfigured value can't skip the LLM call entirely. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>6b3637d -
[KM-567][AI] Planner agent: validator + service
Rifqi Hafizuddin +1: Claude Opus 4.8- validator.py: PlannerValidator runs the 8 checks from §7.3 (tools in registry, catalog refs exist, DAG valid / no cycles, parallelism consistent, within task cap, checkable success_criteria, args valid, inline query_structured IR via the existing IRValidator). Raises PlannerValidationError with self-correctable messages. - service.py: PlannerService + plan_analysis(). LLM chain mirrors query/planner/service.py; validate-and-retry loop (max 3) mirrors QueryService. Takes the full Catalog, derives the PII-safe CatalogSummary for the prompt. Static plan only — no replanning. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>72306d0