ktx/packages/cli/test/context/sl
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
..
tools fix: read semantic sources safely (#284) 2026-06-10 14:06:13 +02:00
description-normalization.test.ts fix(sl): stop baking drift-prone counts into overlay summaries (#270) 2026-06-08 15:58:12 +02:00
dictionary-search.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
local-query.test.ts fix(cli): make connection-not-configured errors actionable and expected (#301) 2026-06-15 14:38:44 +02:00
local-sl.test.ts fix: read semantic sources safely (#284) 2026-06-10 14:06:13 +02:00
pglite-sl-search-prototype.test.ts fix: read semantic sources safely (#284) 2026-06-10 14:06:13 +02:00
schemas.contract.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
semantic-layer.service.test.ts fix(ingest): verify repair outcomes and reject dangling join targets (#292) 2026-06-11 14:39:51 +02:00
sl-dictionary-profile.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
sl-search.service.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00
sl-source-seeding.test-utils.ts fix: read semantic sources safely (#284) 2026-06-10 14:06:13 +02:00
source-files.test.ts fix: read semantic sources safely (#284) 2026-06-10 14:06:13 +02:00
sqlite-sl-sources-index.test.ts test: split cli tests from source tree (#216) 2026-05-26 08:49:05 +02:00