ktx/packages/cli/test/context
Andrey Avtomonov 8a50601582
fix(cli): make connection-not-configured errors actionable and expected (#301)
The MCP sql_execution/sl_query tools and the `ktx sql` CLI threw a plain Error naming no valid connection ids when an agent passed an unconfigured connectionId (or omitted it with multiple connections). The message reached the agent verbatim but gave it nothing to correct with, so it re-guessed for days, and each correct caller-driven rejection filed in PostHog Error Tracking as a ktx fault (issue 019eb10c, 8 occurrences on one install).

Add a shared resolver (resolveConfiguredConnection / resolveRequiredConnectionId) that throws KtxExpectedError listing the configured connections, and route the three SQL-execution call sites through it. Expected-error classification keeps these out of Error Tracking while the actionable message lets agents self-correct.
2026-06-15 14:38:44 +02:00
..
connections fix(cli): make connection-not-configured errors actionable and expected (#301) 2026-06-15 14:38:44 +02:00
core fix(git): disable gpg signing for ktx's own commits (#299) 2026-06-15 14:02:26 +02:00
daemon test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
index-sync fix: read semantic sources safely (#284) 2026-06-10 14:06:13 +02:00
ingest fix(ingest): verify repair outcomes and reject dangling join targets (#292) 2026-06-11 14:39:51 +02:00
llm refactor: enforce ktx naming and AGENTS.md compliance sweep (#289) 2026-06-11 13:49:45 +02:00
mcp fix(cli): make connection-not-configured errors actionable and expected (#301) 2026-06-15 14:38:44 +02:00
memory refactor: enforce ktx naming and AGENTS.md compliance sweep (#289) 2026-06-11 13:49:45 +02:00
project fix(cli): survive ktx.yaml version skew and derive repo ownership from disk (#293) 2026-06-11 22:10:47 +02:00
prompts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
scan refactor: enforce ktx naming and AGENTS.md compliance sweep (#289) 2026-06-11 13:49:45 +02:00
search fix: read semantic sources safely (#284) 2026-06-10 14:06:13 +02:00
skills test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
sl fix(cli): make connection-not-configured errors actionable and expected (#301) 2026-06-15 14:38:44 +02:00
sql-analysis fix: read semantic sources safely (#284) 2026-06-10 14:06:13 +02:00
test refactor: enforce ktx naming and AGENTS.md compliance sweep (#289) 2026-06-11 13:49:45 +02:00
tools test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
wiki feat(cli): shell completion for commands, flags, and entity names (#244) 2026-05-31 23:44:33 +02:00