From a70f17d06ae7f74127527c3facd9f619db54ef97 Mon Sep 17 00:00:00 2001 From: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com> Date: Sun, 2 Aug 2026 11:25:21 -0700 Subject: [PATCH] refactor: replace user-facing "connection" with "catalog" (keep wire contract) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "Connection" was overloaded in the user-facing surface: it named the attachable/queryable thing (`databases attach`, cross-source joins), duplicated the ingest "datasource" concept in stale comments, and even appeared as a `hotdata connections list` command that does not exist. A connection is a distinct server concept from a datasource, so the fix is to rename what users see to "catalog" (how it's already addressed in SQL: `.schema.table`, and via `--catalog`/`--alias`) — not to "datasource". Scope is user-facing only. The wire contract is untouched: `/connections/...` endpoints, the `connection_id`/`default_connection_id` JSON keys, the `data_refresh_connection` job-type value (still shown/typed in `jobs --job-type` because the server defines it), and `connection_string` credential keys all stay. Internal identifiers and private-fn rustdoc that say "connection" are left as-is (they track the wire concept). CLI (user-facing): - `databases attach`/`detach`: help, printed output, and the positional arg (`` -> ``); `create --attach` help; `fork` help. - `databases delete` arg help; `databases show` label `default_connection_id:` -> `catalog id:` (the `-o json` key is unchanged). - `indexes delete --catalog` help note; two `query` cross-catalog hints (one had pointed at the non-existent `hotdata connections list`). - Removed the deprecated hidden `ingest *-connection` aliases; corrected the ingest-client comments that called a datasource a "connection". Skills: - Renamed "connection" -> "catalog" throughout (attach, cross-catalog joins, data-model template); renamed the "Querying across connections" anchor to "-catalogs-" and updated all links. - Corrected the earlier connections->datasources mis-mapping: onboarding / model-building now discover queryable catalogs+tables (`databases list`, `tables list`), with ingest datasources as a separate optional step. --- skills/hotdata/SKILL.md | 33 ++++++------ .../hotdata/references/DATA_MODEL.template.md | 16 +++--- skills/hotdata/references/MODEL_BUILD.md | 29 ++++++----- skills/hotdata/references/WORKFLOWS.md | 31 ++++++----- skills/hotdata/subskills/analytics/SKILL.md | 6 +-- skills/hotdata/subskills/geospatial/SKILL.md | 2 +- skills/hotdata/subskills/search/SKILL.md | 6 +-- .../subskills/search/references/INDEXES.md | 10 ++-- src/client/ingest.rs | 16 +++--- src/commands/databases.rs | 52 +++++++++---------- src/commands/indexes.rs | 2 +- src/commands/ingest.rs | 4 -- src/commands/query.rs | 10 ++-- src/main.rs | 11 ++-- tests/databases_cli.rs | 8 +-- 15 files changed, 116 insertions(+), 120 deletions(-) diff --git a/skills/hotdata/SKILL.md b/skills/hotdata/SKILL.md index ee8b70f..515998c 100644 --- a/skills/hotdata/SKILL.md +++ b/skills/hotdata/SKILL.md @@ -59,7 +59,7 @@ A workspace's query worker scales to zero after inactivity. The **first** comman **Agents — list before show.** Run `hotdata context list` (optionally `--prefix DATAMODEL`) first; run `hotdata context show DATAMODEL` *only if* the stem is listed. A missing stem makes `show` exit 1 — normal for a fresh database, not a failure: don't retry in a loop or run speculative `show` in parallel with other tools. Proceed without context:DATAMODEL until one exists. -**context:DATAMODEL is the durable, shared store** — entities, keys, cross-connection joins, and the naming/query conventions the whole team relies on. Keep task-scoped exploration (scratch SQL, hypotheses, one-off join checks) in the conversation or local notes; **promote** to context:DATAMODEL only when findings should outlive the session and guide everyone — reconcile against `context show DATAMODEL` (if listed), write `./DATAMODEL.md`, then `hotdata context push DATAMODEL`. No need to update it after every ad-hoc query. What to write inside the document: [references/DATA_MODEL.template.md](references/DATA_MODEL.template.md) and [references/MODEL_BUILD.md](references/MODEL_BUILD.md). +**context:DATAMODEL is the durable, shared store** — entities, keys, cross-catalog joins, and the naming/query conventions the whole team relies on. Keep task-scoped exploration (scratch SQL, hypotheses, one-off join checks) in the conversation or local notes; **promote** to context:DATAMODEL only when findings should outlive the session and guide everyone — reconcile against `context show DATAMODEL` (if listed), write `./DATAMODEL.md`, then `hotdata context push DATAMODEL`. No need to update it after every ad-hoc query. What to write inside the document: [references/DATA_MODEL.template.md](references/DATA_MODEL.template.md) and [references/MODEL_BUILD.md](references/MODEL_BUILD.md). ## Multi-step workflows @@ -104,9 +104,9 @@ hotdata databases delete [--workspace-id ] hotdata databases run [--database ] [--name