cassis-cli 3.9.0__tar.gz → 4.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/PKG-INFO +54 -47
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/README.md +53 -46
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/api.py +76 -117
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/chats.py +42 -10
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/common.py +140 -6
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/eval.py +627 -385
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/guide.py +1 -1
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/issues.py +235 -230
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/main.py +17 -0
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/ontology.py +74 -41
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/ontology_design_guide.md +39 -16
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/schema.py +15 -7
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/status.py +3 -2
- cassis_cli-4.0.0/cassis_cli/tables.py +196 -0
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/pyproject.toml +1 -1
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/LICENSE +0 -0
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/NOTICE +0 -0
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/__init__.py +0 -0
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/auth.py +0 -0
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/credentials.py +0 -0
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/dbt.py +0 -0
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/projects.py +0 -0
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/schema_plan.py +0 -0
- {cassis_cli-3.9.0 → cassis_cli-4.0.0}/cassis_cli/verify.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cassis-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: Validate, test and evaluate your Cassis context from your terminal, then publish it
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -28,7 +28,7 @@ Description-Content-Type: text/markdown
|
|
|
28
28
|
Validate, test and evaluate your context from your terminal, then publish it. The same commands gate your pull requests in CI:
|
|
29
29
|
|
|
30
30
|
- `cassis context check` validates the context files in your repository with the exact same checks as the Cassis GitHub PR check (YAML parsing, round-trip, import validation), so you can gate merges in any CI system, not just GitHub. It then prints advisory **context quality warnings** for a tree that parsed: tables not assigned to any domain, joins/metrics pointing at unknown tables or columns, tables without a description, `enum_values` the column's type can't store (the same findings `context test` reports, without the agent run). In a checkout bound to a project (`project.yml`, `--project`, or `CASSIS_PROJECT_ID`), it also cross-checks the tree against the project's source schema: references to tables or columns the warehouse doesn't have print as **warnings** too, advisory only (the object may simply not be built or synced yet). Warnings never fail the check.
|
|
31
|
-
- `cassis schema pull`
|
|
31
|
+
- `cassis schema pull` is where a maintenance agent reads the source schema: it downloads the schema Cassis last observed (every table and column of the data source, the ones outside the context included) into `<base-path>/.schema.json`, a **gitignored** local snapshot (the command maintains the ignore entry). Its `schema_version.taken_at` is when Cassis observed the schema; `pulled_at` is when you downloaded it. Read or grep it before adding a table or a column instead of guessing names. The warehouse stays authoritative: re-run to refresh.
|
|
32
32
|
- `cassis context fmt` rewrites the context files in canonical form (think `black`/`gofmt` for your context), so hand or agent edits pass the round-trip check.
|
|
33
33
|
- `cassis context upload` uploads the context files to a Cassis project (full replace) and, by default, publishes them immediately as a new version, so a merge to your main branch can go live in one CI step. It runs from a git checkout whose context files are committed, and the published version records that commit, even when the upload changes nothing, so `cassis status` can tell whether a checkout matches what is live.
|
|
34
34
|
- `cassis context pull` downloads the project's unpublished context into your repository checkout (full sync: stale local context files are pruned), so you can start editing from the current state, or bootstrap a repo that isn't git-synced (e.g. Bitbucket). Pruning only deletes files that are tracked and unmodified in git (i.e. restorable with `git checkout`); untracked or locally modified files are kept and listed, and every deleted path is printed.
|
|
@@ -36,17 +36,19 @@ Validate, test and evaluate your context from your terminal, then publish it. Th
|
|
|
36
36
|
- The CLI identifies itself to the API (`User-Agent: cassis-cli/<version>`), and successful API responses advertise the newest published version. When you are behind, commands print a one-line upgrade notice on stderr (purely informational; output and exit codes are unchanged).
|
|
37
37
|
- `cassis eval run` runs the project's eval suite against your local context files (scored in-memory, nothing is pushed to Cassis) and prints per-question results, so you can test the changes on your git branch before merging.
|
|
38
38
|
- `cassis context test` runs individual questions through the text-to-SQL agent using your local context files, so you can check that a change actually works (e.g. a new column gets picked), where `eval run` only checks for regressions on existing eval cases.
|
|
39
|
-
- `cassis eval add
|
|
40
|
-
- `cassis eval run --repeat N` runs every case N times (2 to 5) on the same context and model and compares the attempts per case: which cases flipped, and whether a flip came from the agent writing different SQL or the judge ruling differently on the same SQL. `cassis eval show <run-id>` prints that comparison again. A repeat run measures noise: it opens no issue, is not the run shown before publishing, and exits 1 only when a case failed every attempt.
|
|
39
|
+
- `cassis eval cases add` adds a gold question/SQL case to the project's eval suite: after fixing a context issue, add the question users were failing on so `eval run` guards it from regressing. Cassis then runs the new case three times in the background, and `eval cases list` flags it if the attempts fail or disagree. When the fix is still in a pull request, pass `--pending-change`: the check waits for the next publication instead of failing on a context that lacks the change. `cassis context test -q "..." --save-case` does the same from a probe that succeeded on your checkout.
|
|
40
|
+
- `cassis eval run --repeat N` runs every case N times (2 to 5) on the same context and model and compares the attempts per case: which cases flipped, and whether a flip came from the agent writing different SQL or the judge ruling differently on the same SQL. `cassis eval runs show <run-id>` prints that comparison again. A repeat run measures noise: it opens no issue, is not the run shown before publishing, and exits 1 only when a case failed every attempt.
|
|
41
41
|
- Runs freeze their SQL dialect and query guidance. Runs with different source settings are kept separate when measuring noise; historical runs without those settings remain explicitly unknown.
|
|
42
|
-
- `cassis eval list
|
|
43
|
-
- `cassis eval runs` lists the project's recent eval runs, newest first (`--limit`, default 20; `--json` for the server's list): each run's id, status, the context it scored, where it came from (CLI, CI, scheduled, Evals page, ...), the model and how many results passed (attempts on a repeat run, and how much of the suite a change-scoped run covered), and for a run the spending protection did not start, why.
|
|
42
|
+
- `cassis eval cases list`, `cassis eval cases show` and `cassis eval cases delete` maintain the suite. `cases list` prints one line per case, the cases asking for attention first: its id, its health over the latest results (noisy, failing, passing, or changed across configurations) with how many passed, and its question, then what to do about a case that needs it, whether it waits for the change it guards, an unstable check after creation, and gold SQL references the context lacks. `cases show <id>` prints one case in full: question, gold SQL, expected answer, comparison rules, linked issues, and how it has behaved across runs (pass rate, whether repeated runs under one configuration disagree, divergences and timings, a repeat run counted as one run with its attempts, each result's error and the comparison rule that decided it). `cases delete` prunes one that is stale or wrong (e.g. its gold SQL encodes a definition the context has since changed).
|
|
43
|
+
- `cassis eval runs list` lists the project's recent eval runs, newest first (`--limit`, default 20; `--json` for the server's list): each run's id, status, the context it scored, where it came from (CLI, CI, scheduled, Evals page, ...), the model and how many results passed (attempts on a repeat run, and how much of the suite a change-scoped run covered), and for a run the spending protection did not start, why. `cassis eval runs show <run-id>` prints one run; `cassis eval runs watch <run-id>` waits for a running one (started with `--no-wait`, by CI or from the webapp) and ends with the output and exit code `eval run` gives it.
|
|
44
|
+
- Commands find the context directory from anywhere inside the checkout, the context directory included: they use the nearest `<base-path>/project.yml` above the current directory, never past the repository's root. `context pull`, `context fmt` and `schema apply`, which write and delete context files, use the directory they are run from.
|
|
44
45
|
- `cassis schema plan <ddl>` (or `--warehouse` on a project connected to a warehouse) previews what a schema update would change before anything is applied: the source schema diff, the context changes Cassis will make (every change on a table placed in the context, with everything a drop takes with it) and warnings, terraform-style. `cassis schema apply <ddl>` (or `--plan <id>`) writes the resulting context files into the local checkout, app untouched, for review with `git diff`. `cassis schema push <ddl> [--publish]` pushes the new schema and the local context to the app (`--yes` in CI). The file speaks only for the schemas it contains: pass `--complete` when it is the project's complete source schema so schemas absent from it are treated as dropped. With `--warehouse` the server introspects the connected warehouse instead of parsing a file; the plan is always whole-source. `cassis schema plan <ddl> --dry-run` is the prepare-ahead variant: the plan is computed synchronously and nothing is kept in Cassis (no plan to apply or resume, the current plan untouched), so the schema snapshot for a change still in a PR can be planned against safely; `--write-checkout` writes the context files it would produce into the checkout, to commit alongside the schema change.
|
|
45
46
|
- `cassis projects list` lists the projects your account can reach: id (what `--project` and `CASSIS_PROJECT_ID` take), name, published context version, and data-source dialect. A pipeline or agent can discover the project id from the terminal instead of fishing it out of a webapp URL.
|
|
46
47
|
- DDL imports describe one schema snapshot/export file, including ordinary and materialized views; they do not replay incremental migrations. Extraction diagnostics include object names and statement locations. If extraction is incomplete, `schema plan` and `--dry-run` show the extracted inventory and exit 1; `apply`, `push`, and `--write-checkout` cannot save that result. Unknown column types are warnings when all output names are known. Plans also show object-kind, view-definition, comment, and constraint changes. `--json` preserves structured diagnostics and the server-capped inventory.
|
|
47
48
|
|
|
48
49
|
- `cassis status` shows the project's published version (number, label, git commit), whether unpublished changes await publication, the git-sync binding, a schema plan waiting to be applied, and how your local git HEAD relates to the published commit (in sync / N commits ahead / diverged). `cassis status --watch` polls until the published commit matches your local HEAD (e.g. right after merging a PR whose CI publishes the context) instead of watching the GitHub Actions tab.
|
|
49
|
-
- `cassis issues` triages the issues Cassis raised on the project (what it found wrong while answering questions: a context gap, missing data) without leaving the checkout: `issues list` (filterable by status, impact, cause and context domain, and showing each issue's domain so you can work through one domain at a time; and each issue's reach, the chat answers that used its context tables in the last 30 days), `issues show <id>` for the diagnosis, suggested action, the occurrences
|
|
50
|
+
- `cassis issues` triages the issues Cassis raised on the project (what it found wrong while answering questions: a context gap, missing data) without leaving the checkout: `issues list` (filterable by status, impact, cause and context domain, and showing each issue's domain so you can work through one domain at a time; and each issue's reach, the chat answers that used its context tables in the last 30 days), `issues show <id>` for the diagnosis, suggested action, the fix proposal and its changes, the questions to guard with an eval case (with candidate SQL), its five newest occurrences (`--occurrences N` for more), its reach and evidence (removed from dbt, an AI review suggestion, user feedback, a failed eval, or the chat analysis) and the next step, `issues evidence <id> <occurrence-id>` for what the agent actually saw, and `issues resolve` / `dismiss` / `reopen` once you've acted on it (answering no at the `resolve` prompt says what to do instead). Resolving by hand starts the checks of the eval cases waiting for the issue. When the fix ships through a pull request, write the `Resolves <id>` line that `issues show` prints under `Next step` in the PR description instead: Cassis resolves the issue when the PR merges, and `issues show` then reports how it was closed and through which PR. Tables users asked for are not issues: see `cassis tables`.
|
|
51
|
+
- `cassis tables list` lists the warehouse tables users asked for that the context does not describe: one line per table, the most asked first, with a suggested domain (`--layer`, `--domain`, `--search`, `--offset` and `--limit` narrow and page it). `cassis tables dismiss <TABLE>...` records the tables the team will not add (`--undo` takes them back); a table you add leaves the list on its own once published.
|
|
50
52
|
- `cassis dbt push` sends your dbt project's artifacts (`target/manifest.json`, and `catalog.json` when present) to Cassis from the dbt project's CI, with the commit they were built from. Cassis checks the files, matches each dbt model, seed, snapshot and source to a table of the project's data source, and keeps the upload as the project's dbt baseline unless a newer one is already there. The command prints how many relations matched and how many tests they declare. Cassis compares the upload with the previous baseline and saves findings about the context the merged change puts in doubt for grouping and issue curation. The command distinguishes findings awaiting curation from published issues, printing the source observation for pending findings and links for published issues. Nothing the agent answers with changes.
|
|
51
53
|
- `cassis dbt check` runs the same comparison on a pull request, before the change merges: it uploads the PR's artifacts (after `dbt compile` on the production target), compares them with the baseline, and prints the context tables, columns, joins and metrics the change puts in doubt, with why it matters and the context change to make. Each finding also says its **reach**, how many chat answers used its context tables in the last 30 days, and within each section the most-reached objects print first, the order the Review page will show them in. Findings are advisory: nothing is filed, the baseline doesn't move, and the check exits 0 with or without findings.
|
|
52
54
|
- `cassis verify` runs the full local gate in one verb (`context fmt --check`, `context check`, `eval run`), stopping at the first failure. One command in a checkout ("is this change safe to merge?"), one job in CI. `--no-eval` skips the eval suite.
|
|
@@ -137,7 +139,7 @@ Interactive users can follow [Sign in](#sign-in). For automation:
|
|
|
137
139
|
|
|
138
140
|
1. Create an API key in Cassis under **Organization settings → API keys** (keys start with `sk-k6-`).
|
|
139
141
|
2. Store it as a CI secret and expose it as `CASSIS_API_KEY`.
|
|
140
|
-
3. For `pull`, `upload`, `schema pull`, `eval run`, `context test`, the `eval`
|
|
142
|
+
3. For `pull`, `upload`, `schema pull`, `eval run`, `context test`, the `eval cases` and `eval runs` commands, and the `issues` commands: the project ID (UUID) is taken from `<base-path>/project.yml` in the checkout (written by `pull` and by publishing), so once a repo is pulled you don't need to pass it. To override, or before the first pull, set `CASSIS_PROJECT_ID` or pass `--project` (find the UUID with `cassis projects list`, or in the project's URL). `context check` uses the same resolution but treats it as optional: unbound checkouts get the project-less validation (no schema reference warnings).
|
|
141
143
|
|
|
142
144
|
## Usage
|
|
143
145
|
|
|
@@ -176,7 +178,7 @@ cassis eval run --project ...
|
|
|
176
178
|
# Run against an existing Cassis context branch, or the unpublished context:
|
|
177
179
|
cassis eval run --project ... --branch feature-x
|
|
178
180
|
|
|
179
|
-
# Run only specific cases (repeatable), e.g. prove a fresh add
|
|
181
|
+
# Run only specific cases (repeatable), e.g. prove a fresh `eval cases add` in seconds:
|
|
180
182
|
cassis eval run --project ... --case 019f0000-0000-7000-8000-0000000000ca
|
|
181
183
|
|
|
182
184
|
# Start the run and return immediately (poll in the webapp):
|
|
@@ -202,37 +204,40 @@ cassis context test --project ... -q "How much was refunded last month?" -q "Net
|
|
|
202
204
|
cassis context test --project ... -q "Net revenue in Q1?" --save-case
|
|
203
205
|
|
|
204
206
|
# Add a gold case to the eval suite (rejected if the exact question already exists):
|
|
205
|
-
cassis eval add
|
|
207
|
+
cassis eval cases add --project ... -q "How much was refunded last month?" \
|
|
206
208
|
--gold-sql "SELECT SUM(refunded_cents) / 100.0 FROM public.orders WHERE ..."
|
|
207
209
|
|
|
208
210
|
# Multi-line gold SQL: read it from a file instead (no shell quoting pitfalls):
|
|
209
|
-
cassis eval add
|
|
211
|
+
cassis eval cases add --project ... -q "How much was refunded last month?" \
|
|
210
212
|
--gold-sql-file refunds.sql
|
|
211
213
|
|
|
212
214
|
# A question the context must decline needs no gold SQL:
|
|
213
|
-
cassis eval add
|
|
214
|
-
|
|
215
|
-
#
|
|
216
|
-
#
|
|
217
|
-
# --
|
|
218
|
-
#
|
|
219
|
-
|
|
220
|
-
cassis eval
|
|
221
|
-
cassis eval
|
|
222
|
-
cassis eval delete
|
|
215
|
+
cassis eval cases add --project ... -q "Why did customers ask for refunds?" --expect cannot-answer
|
|
216
|
+
|
|
217
|
+
# Triage the suite: the cases asking for attention first, each with its health, what
|
|
218
|
+
# to do, its newest verdicts, where its noise is, why it failed and its open issues
|
|
219
|
+
# (--attention or --label noisy to narrow it; --json prints the compact rows). Then
|
|
220
|
+
# print the few to investigate in full (up to 20 per call, 10 newest results each),
|
|
221
|
+
# and prune one. Every command taking an id takes several (--json prints an array):
|
|
222
|
+
cassis eval cases list --attention
|
|
223
|
+
cassis eval cases show 019f0000-0000-7000-8000-0000000000ca 019f0000-0000-7000-8000-0000000000cb
|
|
224
|
+
cassis eval cases delete 019f0000-0000-7000-8000-0000000000ca
|
|
225
|
+
cassis eval runs list # the latest runs: status, context, origin, model, passes
|
|
223
226
|
|
|
224
227
|
# Run the suite 3 times to see which cases flip, and why; print it again later:
|
|
225
228
|
cassis eval run --repeat 3
|
|
226
229
|
|
|
227
|
-
# Preview conservative change selection without model calls (--base
|
|
228
|
-
#
|
|
230
|
+
# Preview conservative change selection without model calls (--base v43 picks the
|
|
231
|
+
# published version to compare against: v43, 43 or its id; it needs --changed). It lists the
|
|
229
232
|
# selected cases and counts the skipped ones per reason; --verbose lists every one:
|
|
230
233
|
cassis eval run --changed --dry-run
|
|
231
234
|
# Run the selection; incomplete dependencies always run. The summary says how much
|
|
232
235
|
# of the suite ran ("3/3 passed · 3 of 15 cases (affected by a context change)"):
|
|
233
236
|
cassis eval run --changed
|
|
234
|
-
# Print a run by id: its results and verdict, or how a repeat run's attempts compare
|
|
235
|
-
|
|
237
|
+
# Print a run by id: its results and verdict, or how a repeat run's attempts compare;
|
|
238
|
+
# or wait for one still running and end with its exit code:
|
|
239
|
+
cassis eval runs show 019f0000-0000-7000-8000-00000000aaaa
|
|
240
|
+
cassis eval runs watch 019f0000-0000-7000-8000-00000000aaaa
|
|
236
241
|
|
|
237
242
|
# Pull the source schema into <base-path>/.schema.json (gitignored local snapshot):
|
|
238
243
|
cassis schema pull
|
|
@@ -256,20 +261,20 @@ cassis issues show 019f0000-0000-7000-8000-0000000000e1
|
|
|
256
261
|
# Work one context domain at a time (nested domains included):
|
|
257
262
|
cassis issues list --domain sales
|
|
258
263
|
# The warehouse tables users asked for that the context does not describe, the most asked first:
|
|
259
|
-
cassis
|
|
260
|
-
cassis
|
|
261
|
-
cassis
|
|
262
|
-
#
|
|
263
|
-
cassis
|
|
264
|
+
cassis tables list
|
|
265
|
+
cassis tables list --layer modeled
|
|
266
|
+
cassis tables list --domain finance --offset 50
|
|
267
|
+
# Tables the team will not add (--undo restores them):
|
|
268
|
+
cassis tables dismiss CORE.PAYMENTS RAW.SESSION
|
|
264
269
|
|
|
265
270
|
# Issues are shared with the project; source evidence respects conversation access.
|
|
266
|
-
# Read what the agent saw for
|
|
271
|
+
# Read what the agent saw for readable occurrences (ids from `issues show`; several at once):
|
|
267
272
|
cassis issues evidence 019f0000-0000-7000-8000-0000000000e1 019f0000-0000-7000-8000-0000000000c1
|
|
268
273
|
|
|
269
274
|
# Close the loop once the fix is published (or reopen). When the fix ships in a pull
|
|
270
275
|
# request, put `Resolves <id>` in its description instead and the merge closes the issue:
|
|
271
276
|
cassis issues resolve 019f0000-0000-7000-8000-0000000000e1 --published
|
|
272
|
-
cassis issues dismiss 019f0000-0000-7000-8000-0000000000e1 --reason
|
|
277
|
+
cassis issues dismiss 019f0000-0000-7000-8000-0000000000e1 019f0000-0000-7000-8000-0000000000e2 --reason duplicate
|
|
273
278
|
cassis issues reopen 019f0000-0000-7000-8000-0000000000e1
|
|
274
279
|
|
|
275
280
|
# Published version vs local checkout (add --watch to poll until your merge is published):
|
|
@@ -298,15 +303,17 @@ Configuration (flags take precedence over env vars):
|
|
|
298
303
|
| `--api-key` | `CASSIS_API_KEY` | saved login when no key is set |
|
|
299
304
|
| `--api-url` | `CASSIS_API_URL` | `https://app.getcassis.com` |
|
|
300
305
|
| `--base-path` | `CASSIS_BASE_PATH` | `cassis`, must match the project's git-sync "Path" setting |
|
|
301
|
-
| `--project` (check, pull, upload, schema pull, eval run, eval
|
|
306
|
+
| `--project` (check, pull, upload, schema pull, eval run, eval cases, eval runs, test, issues, dbt push, dbt check) | `CASSIS_PROJECT_ID` | the id in `<base-path>/project.yml` (required before the first pull; `check` alone falls back to the project-less validation when unbound) |
|
|
302
307
|
|
|
303
308
|
`cassis eval run` also accepts `--case <id>` (repeatable; run only the named
|
|
304
|
-
cases, ids from `eval list
|
|
309
|
+
cases, ids from `eval cases list` or `eval cases add`), `--label` (run label in the Evals page; defaults
|
|
305
310
|
to the branch name from the CI environment or the local git checkout; rejected
|
|
306
311
|
with `--branch`, whose runs are labelled with the branch name), `--verbose` (with `--changed`: list every
|
|
307
312
|
skipped case instead of a count per reason), `--wait/--no-wait`, `--poll-interval` (5 s),
|
|
308
313
|
`--timeout` (30 min; the run keeps going server-side if the CLI stops waiting),
|
|
309
|
-
and Ctrl-C cancels the run (exit 130).
|
|
314
|
+
and Ctrl-C cancels the run (exit 130). While it waits it shows the run's progress
|
|
315
|
+
(`Running · 12/41 cases · 9 passed · 3 failed · 2m10s`), rewritten in place on a
|
|
316
|
+
terminal and logged at most every 30 seconds otherwise. It prints a deep link to the run's page
|
|
310
317
|
in the Evals UI; `--app-url` / `CASSIS_APP_URL` overrides the link's base URL
|
|
311
318
|
when the webapp is not served from the API host (defaults to `--api-url`).
|
|
312
319
|
|
|
@@ -345,11 +352,11 @@ A domain without `owners` inherits its nearest parent's, and the root domain's (
|
|
|
345
352
|
|
|
346
353
|
| Code | Meaning |
|
|
347
354
|
| ---- | ------------------------------------------------------------------------------ |
|
|
348
|
-
| 0 | Context is valid (check) / pulled (pull) / uploaded (upload) / eval run completed with no regression: every case passed, already failed on the base run, or is pending the change it guards (eval run) / every probe completed (test, whatever its outcome; probes are informational, don't gate CI on them) / dbt upload accepted, or kept behind a newer one (dbt push) / dbt upload checked, with or without findings (dbt check) |
|
|
349
|
-
| 1 | Validation failed (check: findings printed; upload: nothing imported; eval run: invalid tree or a regression, a case whose answer fails now
|
|
355
|
+
| 0 | Context is valid (check) / pulled (pull) / uploaded (upload) / eval run completed with no regression: every case passed, already failed on the base run, was already noisy (verdicts differing on identical inputs), or is pending the change it guards (eval run, eval runs watch) / every probe completed (test, whatever its outcome; probes are informational, don't gate CI on them) / dbt upload accepted, or kept behind a newer one (dbt push) / dbt upload checked, with or without findings (dbt check) |
|
|
356
|
+
| 1 | Validation failed (check: findings printed; upload: nothing imported; eval run, eval runs watch: invalid tree or a regression, a case whose answer fails now, passed on the base run and was not already noisy; test: invalid tree or a probe failed; eval cases add: duplicate question or gold SQL that does not run; eval cases delete, show: no such case in the project; eval runs show, watch: no such run in the project; issues: no such issue or occurrence in the project; schema plan/apply: extraction is incomplete, the plan failed (unparseable or truncated DDL), is stale or expired, the apply failed, or the project won't accept it (a plan is being applied, a DDL was given for a warehouse-connected project, or --warehouse for a DDL-only one); dbt push: the upload was refused or rejected (a file is invalid, too large or from an unsupported dbt version, or no relation matches the project's data source); dbt check: the upload was refused or rejected (an invalid file, or no baseline yet: run `cassis dbt push` first)) |
|
|
350
357
|
| 2 | Usage error (missing credentials or project, no context directory, unreadable file, tree over the size limits, `eval run --branch` naming a context branch the project does not have, `eval run --base` naming a published version the project does not have or given without `--changed`, `eval run --dry-run --case` naming no current case, `upload` or `schema push` outside a git checkout or with uncommitted context files, `dbt push` or `dbt check` without a manifest.json, outside a git checkout without `--commit`, or with an artifact over the size limits) |
|
|
351
|
-
| 3 | Transport/API error (unreachable API, invalid key, inaccessible project, unexpected response, a server
|
|
352
|
-
| 4 | `eval run` reached no verdict: the run failed or was cancelled on Cassis's side, or the cases that did not pass errored instead of failing (agent, judge or warehouse errors, a broken gold SQL). Nothing says the context regressed: rerun, or read the errors |
|
|
358
|
+
| 3 | Transport/API error (unreachable API, invalid key, inaccessible project, unexpected response, a server that requires a newer cassis-cli), another eval run already active, out of credits, `--timeout` reached, or Cassis failed on its side while processing a dbt upload (`dbt push` / `dbt check`: nothing to fix in the upload, push again) |
|
|
359
|
+
| 4 | `eval run` or `eval runs watch` reached no verdict: the run failed or was cancelled on Cassis's side, or the cases that did not pass errored instead of failing (agent, judge or warehouse errors, a broken gold SQL). Nothing says the context regressed: rerun, or read the errors |
|
|
353
360
|
|
|
354
361
|
Commands that send the local tree (`check`, `fmt`, `upload`, `eval run`, `test`) accept up to
|
|
355
362
|
20,000 context files / 100 MB total (path + content bytes), sized for a context of
|
|
@@ -504,7 +511,7 @@ or authentication errors.
|
|
|
504
511
|
|
|
505
512
|
### Result comparison expectations
|
|
506
513
|
|
|
507
|
-
`cassis eval add
|
|
514
|
+
`cassis eval cases add` and `cassis eval cases replace` take `--compare`. Its
|
|
508
515
|
default rules are a 1% numeric tolerance with rounding, any row order, columns
|
|
509
516
|
paired by value, and an empty result rejected. Each word changes one rule, and
|
|
510
517
|
words combine with commas: `exact` (numbers match exactly, for counts and
|
|
@@ -513,19 +520,19 @@ and `allow-empty` (an empty result is a valid answer). `--compare ordered,exact`
|
|
|
513
520
|
checks a ranking of counts; `--compare default` goes back to the default rules.
|
|
514
521
|
|
|
515
522
|
On replacement, an omitted `--compare` keeps the case's settings. Changing settings creates a new
|
|
516
|
-
case; historical results retain the rules they were scored with. `
|
|
523
|
+
case; historical results retain the rules they were scored with. `cases show`
|
|
517
524
|
and `run` show explicit rules. On metadata-only sources, result comparison is
|
|
518
|
-
marked unapplied and the SQL judge remains in use: `add
|
|
519
|
-
|
|
525
|
+
marked unapplied and the SQL judge remains in use: `cases add` and `cases replace`
|
|
526
|
+
warn when a case sets rules there, since the question text
|
|
520
527
|
must carry anything that matters (ranked, each once, ...).
|
|
521
528
|
|
|
522
529
|
### Case health
|
|
523
530
|
|
|
524
|
-
Review suite quality without spending credits with `cassis eval
|
|
525
|
-
|
|
526
|
-
The
|
|
531
|
+
Review suite quality without spending credits with `cassis eval cases list`: the
|
|
532
|
+
cases needing review come first, each with its labels and recommendation.
|
|
533
|
+
The health reads the latest 50 results per case. Unchanged-context verdict transitions
|
|
527
534
|
are descriptive; model and configuration changes can also explain them. Cases are
|
|
528
535
|
never removed automatically: review the recommendation, then replace or delete the case.
|
|
529
536
|
|
|
530
|
-
Repeated failures that agree on category and dependency evidence can create linked issues. `cassis eval
|
|
537
|
+
Repeated failures that agree on category and dependency evidence can create linked issues. `cassis eval cases show <case-id>` lists those issues; `cassis issues show <issue-id>` lists supporting eval cases. Dropping or replacing a case detaches its active evidence. An issue supported by other cases or conversations stays open; an issue with no remaining evidence is dismissed, not marked fixed. Diagnostic repeats do not create issues themselves.
|
|
531
538
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Validate, test and evaluate your context from your terminal, then publish it. The same commands gate your pull requests in CI:
|
|
4
4
|
|
|
5
5
|
- `cassis context check` validates the context files in your repository with the exact same checks as the Cassis GitHub PR check (YAML parsing, round-trip, import validation), so you can gate merges in any CI system, not just GitHub. It then prints advisory **context quality warnings** for a tree that parsed: tables not assigned to any domain, joins/metrics pointing at unknown tables or columns, tables without a description, `enum_values` the column's type can't store (the same findings `context test` reports, without the agent run). In a checkout bound to a project (`project.yml`, `--project`, or `CASSIS_PROJECT_ID`), it also cross-checks the tree against the project's source schema: references to tables or columns the warehouse doesn't have print as **warnings** too, advisory only (the object may simply not be built or synced yet). Warnings never fail the check.
|
|
6
|
-
- `cassis schema pull`
|
|
6
|
+
- `cassis schema pull` is where a maintenance agent reads the source schema: it downloads the schema Cassis last observed (every table and column of the data source, the ones outside the context included) into `<base-path>/.schema.json`, a **gitignored** local snapshot (the command maintains the ignore entry). Its `schema_version.taken_at` is when Cassis observed the schema; `pulled_at` is when you downloaded it. Read or grep it before adding a table or a column instead of guessing names. The warehouse stays authoritative: re-run to refresh.
|
|
7
7
|
- `cassis context fmt` rewrites the context files in canonical form (think `black`/`gofmt` for your context), so hand or agent edits pass the round-trip check.
|
|
8
8
|
- `cassis context upload` uploads the context files to a Cassis project (full replace) and, by default, publishes them immediately as a new version, so a merge to your main branch can go live in one CI step. It runs from a git checkout whose context files are committed, and the published version records that commit, even when the upload changes nothing, so `cassis status` can tell whether a checkout matches what is live.
|
|
9
9
|
- `cassis context pull` downloads the project's unpublished context into your repository checkout (full sync: stale local context files are pruned), so you can start editing from the current state, or bootstrap a repo that isn't git-synced (e.g. Bitbucket). Pruning only deletes files that are tracked and unmodified in git (i.e. restorable with `git checkout`); untracked or locally modified files are kept and listed, and every deleted path is printed.
|
|
@@ -11,17 +11,19 @@ Validate, test and evaluate your context from your terminal, then publish it. Th
|
|
|
11
11
|
- The CLI identifies itself to the API (`User-Agent: cassis-cli/<version>`), and successful API responses advertise the newest published version. When you are behind, commands print a one-line upgrade notice on stderr (purely informational; output and exit codes are unchanged).
|
|
12
12
|
- `cassis eval run` runs the project's eval suite against your local context files (scored in-memory, nothing is pushed to Cassis) and prints per-question results, so you can test the changes on your git branch before merging.
|
|
13
13
|
- `cassis context test` runs individual questions through the text-to-SQL agent using your local context files, so you can check that a change actually works (e.g. a new column gets picked), where `eval run` only checks for regressions on existing eval cases.
|
|
14
|
-
- `cassis eval add
|
|
15
|
-
- `cassis eval run --repeat N` runs every case N times (2 to 5) on the same context and model and compares the attempts per case: which cases flipped, and whether a flip came from the agent writing different SQL or the judge ruling differently on the same SQL. `cassis eval show <run-id>` prints that comparison again. A repeat run measures noise: it opens no issue, is not the run shown before publishing, and exits 1 only when a case failed every attempt.
|
|
14
|
+
- `cassis eval cases add` adds a gold question/SQL case to the project's eval suite: after fixing a context issue, add the question users were failing on so `eval run` guards it from regressing. Cassis then runs the new case three times in the background, and `eval cases list` flags it if the attempts fail or disagree. When the fix is still in a pull request, pass `--pending-change`: the check waits for the next publication instead of failing on a context that lacks the change. `cassis context test -q "..." --save-case` does the same from a probe that succeeded on your checkout.
|
|
15
|
+
- `cassis eval run --repeat N` runs every case N times (2 to 5) on the same context and model and compares the attempts per case: which cases flipped, and whether a flip came from the agent writing different SQL or the judge ruling differently on the same SQL. `cassis eval runs show <run-id>` prints that comparison again. A repeat run measures noise: it opens no issue, is not the run shown before publishing, and exits 1 only when a case failed every attempt.
|
|
16
16
|
- Runs freeze their SQL dialect and query guidance. Runs with different source settings are kept separate when measuring noise; historical runs without those settings remain explicitly unknown.
|
|
17
|
-
- `cassis eval list
|
|
18
|
-
- `cassis eval runs` lists the project's recent eval runs, newest first (`--limit`, default 20; `--json` for the server's list): each run's id, status, the context it scored, where it came from (CLI, CI, scheduled, Evals page, ...), the model and how many results passed (attempts on a repeat run, and how much of the suite a change-scoped run covered), and for a run the spending protection did not start, why.
|
|
17
|
+
- `cassis eval cases list`, `cassis eval cases show` and `cassis eval cases delete` maintain the suite. `cases list` prints one line per case, the cases asking for attention first: its id, its health over the latest results (noisy, failing, passing, or changed across configurations) with how many passed, and its question, then what to do about a case that needs it, whether it waits for the change it guards, an unstable check after creation, and gold SQL references the context lacks. `cases show <id>` prints one case in full: question, gold SQL, expected answer, comparison rules, linked issues, and how it has behaved across runs (pass rate, whether repeated runs under one configuration disagree, divergences and timings, a repeat run counted as one run with its attempts, each result's error and the comparison rule that decided it). `cases delete` prunes one that is stale or wrong (e.g. its gold SQL encodes a definition the context has since changed).
|
|
18
|
+
- `cassis eval runs list` lists the project's recent eval runs, newest first (`--limit`, default 20; `--json` for the server's list): each run's id, status, the context it scored, where it came from (CLI, CI, scheduled, Evals page, ...), the model and how many results passed (attempts on a repeat run, and how much of the suite a change-scoped run covered), and for a run the spending protection did not start, why. `cassis eval runs show <run-id>` prints one run; `cassis eval runs watch <run-id>` waits for a running one (started with `--no-wait`, by CI or from the webapp) and ends with the output and exit code `eval run` gives it.
|
|
19
|
+
- Commands find the context directory from anywhere inside the checkout, the context directory included: they use the nearest `<base-path>/project.yml` above the current directory, never past the repository's root. `context pull`, `context fmt` and `schema apply`, which write and delete context files, use the directory they are run from.
|
|
19
20
|
- `cassis schema plan <ddl>` (or `--warehouse` on a project connected to a warehouse) previews what a schema update would change before anything is applied: the source schema diff, the context changes Cassis will make (every change on a table placed in the context, with everything a drop takes with it) and warnings, terraform-style. `cassis schema apply <ddl>` (or `--plan <id>`) writes the resulting context files into the local checkout, app untouched, for review with `git diff`. `cassis schema push <ddl> [--publish]` pushes the new schema and the local context to the app (`--yes` in CI). The file speaks only for the schemas it contains: pass `--complete` when it is the project's complete source schema so schemas absent from it are treated as dropped. With `--warehouse` the server introspects the connected warehouse instead of parsing a file; the plan is always whole-source. `cassis schema plan <ddl> --dry-run` is the prepare-ahead variant: the plan is computed synchronously and nothing is kept in Cassis (no plan to apply or resume, the current plan untouched), so the schema snapshot for a change still in a PR can be planned against safely; `--write-checkout` writes the context files it would produce into the checkout, to commit alongside the schema change.
|
|
20
21
|
- `cassis projects list` lists the projects your account can reach: id (what `--project` and `CASSIS_PROJECT_ID` take), name, published context version, and data-source dialect. A pipeline or agent can discover the project id from the terminal instead of fishing it out of a webapp URL.
|
|
21
22
|
- DDL imports describe one schema snapshot/export file, including ordinary and materialized views; they do not replay incremental migrations. Extraction diagnostics include object names and statement locations. If extraction is incomplete, `schema plan` and `--dry-run` show the extracted inventory and exit 1; `apply`, `push`, and `--write-checkout` cannot save that result. Unknown column types are warnings when all output names are known. Plans also show object-kind, view-definition, comment, and constraint changes. `--json` preserves structured diagnostics and the server-capped inventory.
|
|
22
23
|
|
|
23
24
|
- `cassis status` shows the project's published version (number, label, git commit), whether unpublished changes await publication, the git-sync binding, a schema plan waiting to be applied, and how your local git HEAD relates to the published commit (in sync / N commits ahead / diverged). `cassis status --watch` polls until the published commit matches your local HEAD (e.g. right after merging a PR whose CI publishes the context) instead of watching the GitHub Actions tab.
|
|
24
|
-
- `cassis issues` triages the issues Cassis raised on the project (what it found wrong while answering questions: a context gap, missing data) without leaving the checkout: `issues list` (filterable by status, impact, cause and context domain, and showing each issue's domain so you can work through one domain at a time; and each issue's reach, the chat answers that used its context tables in the last 30 days), `issues show <id>` for the diagnosis, suggested action, the occurrences
|
|
25
|
+
- `cassis issues` triages the issues Cassis raised on the project (what it found wrong while answering questions: a context gap, missing data) without leaving the checkout: `issues list` (filterable by status, impact, cause and context domain, and showing each issue's domain so you can work through one domain at a time; and each issue's reach, the chat answers that used its context tables in the last 30 days), `issues show <id>` for the diagnosis, suggested action, the fix proposal and its changes, the questions to guard with an eval case (with candidate SQL), its five newest occurrences (`--occurrences N` for more), its reach and evidence (removed from dbt, an AI review suggestion, user feedback, a failed eval, or the chat analysis) and the next step, `issues evidence <id> <occurrence-id>` for what the agent actually saw, and `issues resolve` / `dismiss` / `reopen` once you've acted on it (answering no at the `resolve` prompt says what to do instead). Resolving by hand starts the checks of the eval cases waiting for the issue. When the fix ships through a pull request, write the `Resolves <id>` line that `issues show` prints under `Next step` in the PR description instead: Cassis resolves the issue when the PR merges, and `issues show` then reports how it was closed and through which PR. Tables users asked for are not issues: see `cassis tables`.
|
|
26
|
+
- `cassis tables list` lists the warehouse tables users asked for that the context does not describe: one line per table, the most asked first, with a suggested domain (`--layer`, `--domain`, `--search`, `--offset` and `--limit` narrow and page it). `cassis tables dismiss <TABLE>...` records the tables the team will not add (`--undo` takes them back); a table you add leaves the list on its own once published.
|
|
25
27
|
- `cassis dbt push` sends your dbt project's artifacts (`target/manifest.json`, and `catalog.json` when present) to Cassis from the dbt project's CI, with the commit they were built from. Cassis checks the files, matches each dbt model, seed, snapshot and source to a table of the project's data source, and keeps the upload as the project's dbt baseline unless a newer one is already there. The command prints how many relations matched and how many tests they declare. Cassis compares the upload with the previous baseline and saves findings about the context the merged change puts in doubt for grouping and issue curation. The command distinguishes findings awaiting curation from published issues, printing the source observation for pending findings and links for published issues. Nothing the agent answers with changes.
|
|
26
28
|
- `cassis dbt check` runs the same comparison on a pull request, before the change merges: it uploads the PR's artifacts (after `dbt compile` on the production target), compares them with the baseline, and prints the context tables, columns, joins and metrics the change puts in doubt, with why it matters and the context change to make. Each finding also says its **reach**, how many chat answers used its context tables in the last 30 days, and within each section the most-reached objects print first, the order the Review page will show them in. Findings are advisory: nothing is filed, the baseline doesn't move, and the check exits 0 with or without findings.
|
|
27
29
|
- `cassis verify` runs the full local gate in one verb (`context fmt --check`, `context check`, `eval run`), stopping at the first failure. One command in a checkout ("is this change safe to merge?"), one job in CI. `--no-eval` skips the eval suite.
|
|
@@ -112,7 +114,7 @@ Interactive users can follow [Sign in](#sign-in). For automation:
|
|
|
112
114
|
|
|
113
115
|
1. Create an API key in Cassis under **Organization settings → API keys** (keys start with `sk-k6-`).
|
|
114
116
|
2. Store it as a CI secret and expose it as `CASSIS_API_KEY`.
|
|
115
|
-
3. For `pull`, `upload`, `schema pull`, `eval run`, `context test`, the `eval`
|
|
117
|
+
3. For `pull`, `upload`, `schema pull`, `eval run`, `context test`, the `eval cases` and `eval runs` commands, and the `issues` commands: the project ID (UUID) is taken from `<base-path>/project.yml` in the checkout (written by `pull` and by publishing), so once a repo is pulled you don't need to pass it. To override, or before the first pull, set `CASSIS_PROJECT_ID` or pass `--project` (find the UUID with `cassis projects list`, or in the project's URL). `context check` uses the same resolution but treats it as optional: unbound checkouts get the project-less validation (no schema reference warnings).
|
|
116
118
|
|
|
117
119
|
## Usage
|
|
118
120
|
|
|
@@ -151,7 +153,7 @@ cassis eval run --project ...
|
|
|
151
153
|
# Run against an existing Cassis context branch, or the unpublished context:
|
|
152
154
|
cassis eval run --project ... --branch feature-x
|
|
153
155
|
|
|
154
|
-
# Run only specific cases (repeatable), e.g. prove a fresh add
|
|
156
|
+
# Run only specific cases (repeatable), e.g. prove a fresh `eval cases add` in seconds:
|
|
155
157
|
cassis eval run --project ... --case 019f0000-0000-7000-8000-0000000000ca
|
|
156
158
|
|
|
157
159
|
# Start the run and return immediately (poll in the webapp):
|
|
@@ -177,37 +179,40 @@ cassis context test --project ... -q "How much was refunded last month?" -q "Net
|
|
|
177
179
|
cassis context test --project ... -q "Net revenue in Q1?" --save-case
|
|
178
180
|
|
|
179
181
|
# Add a gold case to the eval suite (rejected if the exact question already exists):
|
|
180
|
-
cassis eval add
|
|
182
|
+
cassis eval cases add --project ... -q "How much was refunded last month?" \
|
|
181
183
|
--gold-sql "SELECT SUM(refunded_cents) / 100.0 FROM public.orders WHERE ..."
|
|
182
184
|
|
|
183
185
|
# Multi-line gold SQL: read it from a file instead (no shell quoting pitfalls):
|
|
184
|
-
cassis eval add
|
|
186
|
+
cassis eval cases add --project ... -q "How much was refunded last month?" \
|
|
185
187
|
--gold-sql-file refunds.sql
|
|
186
188
|
|
|
187
189
|
# A question the context must decline needs no gold SQL:
|
|
188
|
-
cassis eval add
|
|
189
|
-
|
|
190
|
-
#
|
|
191
|
-
#
|
|
192
|
-
# --
|
|
193
|
-
#
|
|
194
|
-
|
|
195
|
-
cassis eval
|
|
196
|
-
cassis eval
|
|
197
|
-
cassis eval delete
|
|
190
|
+
cassis eval cases add --project ... -q "Why did customers ask for refunds?" --expect cannot-answer
|
|
191
|
+
|
|
192
|
+
# Triage the suite: the cases asking for attention first, each with its health, what
|
|
193
|
+
# to do, its newest verdicts, where its noise is, why it failed and its open issues
|
|
194
|
+
# (--attention or --label noisy to narrow it; --json prints the compact rows). Then
|
|
195
|
+
# print the few to investigate in full (up to 20 per call, 10 newest results each),
|
|
196
|
+
# and prune one. Every command taking an id takes several (--json prints an array):
|
|
197
|
+
cassis eval cases list --attention
|
|
198
|
+
cassis eval cases show 019f0000-0000-7000-8000-0000000000ca 019f0000-0000-7000-8000-0000000000cb
|
|
199
|
+
cassis eval cases delete 019f0000-0000-7000-8000-0000000000ca
|
|
200
|
+
cassis eval runs list # the latest runs: status, context, origin, model, passes
|
|
198
201
|
|
|
199
202
|
# Run the suite 3 times to see which cases flip, and why; print it again later:
|
|
200
203
|
cassis eval run --repeat 3
|
|
201
204
|
|
|
202
|
-
# Preview conservative change selection without model calls (--base
|
|
203
|
-
#
|
|
205
|
+
# Preview conservative change selection without model calls (--base v43 picks the
|
|
206
|
+
# published version to compare against: v43, 43 or its id; it needs --changed). It lists the
|
|
204
207
|
# selected cases and counts the skipped ones per reason; --verbose lists every one:
|
|
205
208
|
cassis eval run --changed --dry-run
|
|
206
209
|
# Run the selection; incomplete dependencies always run. The summary says how much
|
|
207
210
|
# of the suite ran ("3/3 passed · 3 of 15 cases (affected by a context change)"):
|
|
208
211
|
cassis eval run --changed
|
|
209
|
-
# Print a run by id: its results and verdict, or how a repeat run's attempts compare
|
|
210
|
-
|
|
212
|
+
# Print a run by id: its results and verdict, or how a repeat run's attempts compare;
|
|
213
|
+
# or wait for one still running and end with its exit code:
|
|
214
|
+
cassis eval runs show 019f0000-0000-7000-8000-00000000aaaa
|
|
215
|
+
cassis eval runs watch 019f0000-0000-7000-8000-00000000aaaa
|
|
211
216
|
|
|
212
217
|
# Pull the source schema into <base-path>/.schema.json (gitignored local snapshot):
|
|
213
218
|
cassis schema pull
|
|
@@ -231,20 +236,20 @@ cassis issues show 019f0000-0000-7000-8000-0000000000e1
|
|
|
231
236
|
# Work one context domain at a time (nested domains included):
|
|
232
237
|
cassis issues list --domain sales
|
|
233
238
|
# The warehouse tables users asked for that the context does not describe, the most asked first:
|
|
234
|
-
cassis
|
|
235
|
-
cassis
|
|
236
|
-
cassis
|
|
237
|
-
#
|
|
238
|
-
cassis
|
|
239
|
+
cassis tables list
|
|
240
|
+
cassis tables list --layer modeled
|
|
241
|
+
cassis tables list --domain finance --offset 50
|
|
242
|
+
# Tables the team will not add (--undo restores them):
|
|
243
|
+
cassis tables dismiss CORE.PAYMENTS RAW.SESSION
|
|
239
244
|
|
|
240
245
|
# Issues are shared with the project; source evidence respects conversation access.
|
|
241
|
-
# Read what the agent saw for
|
|
246
|
+
# Read what the agent saw for readable occurrences (ids from `issues show`; several at once):
|
|
242
247
|
cassis issues evidence 019f0000-0000-7000-8000-0000000000e1 019f0000-0000-7000-8000-0000000000c1
|
|
243
248
|
|
|
244
249
|
# Close the loop once the fix is published (or reopen). When the fix ships in a pull
|
|
245
250
|
# request, put `Resolves <id>` in its description instead and the merge closes the issue:
|
|
246
251
|
cassis issues resolve 019f0000-0000-7000-8000-0000000000e1 --published
|
|
247
|
-
cassis issues dismiss 019f0000-0000-7000-8000-0000000000e1 --reason
|
|
252
|
+
cassis issues dismiss 019f0000-0000-7000-8000-0000000000e1 019f0000-0000-7000-8000-0000000000e2 --reason duplicate
|
|
248
253
|
cassis issues reopen 019f0000-0000-7000-8000-0000000000e1
|
|
249
254
|
|
|
250
255
|
# Published version vs local checkout (add --watch to poll until your merge is published):
|
|
@@ -273,15 +278,17 @@ Configuration (flags take precedence over env vars):
|
|
|
273
278
|
| `--api-key` | `CASSIS_API_KEY` | saved login when no key is set |
|
|
274
279
|
| `--api-url` | `CASSIS_API_URL` | `https://app.getcassis.com` |
|
|
275
280
|
| `--base-path` | `CASSIS_BASE_PATH` | `cassis`, must match the project's git-sync "Path" setting |
|
|
276
|
-
| `--project` (check, pull, upload, schema pull, eval run, eval
|
|
281
|
+
| `--project` (check, pull, upload, schema pull, eval run, eval cases, eval runs, test, issues, dbt push, dbt check) | `CASSIS_PROJECT_ID` | the id in `<base-path>/project.yml` (required before the first pull; `check` alone falls back to the project-less validation when unbound) |
|
|
277
282
|
|
|
278
283
|
`cassis eval run` also accepts `--case <id>` (repeatable; run only the named
|
|
279
|
-
cases, ids from `eval list
|
|
284
|
+
cases, ids from `eval cases list` or `eval cases add`), `--label` (run label in the Evals page; defaults
|
|
280
285
|
to the branch name from the CI environment or the local git checkout; rejected
|
|
281
286
|
with `--branch`, whose runs are labelled with the branch name), `--verbose` (with `--changed`: list every
|
|
282
287
|
skipped case instead of a count per reason), `--wait/--no-wait`, `--poll-interval` (5 s),
|
|
283
288
|
`--timeout` (30 min; the run keeps going server-side if the CLI stops waiting),
|
|
284
|
-
and Ctrl-C cancels the run (exit 130).
|
|
289
|
+
and Ctrl-C cancels the run (exit 130). While it waits it shows the run's progress
|
|
290
|
+
(`Running · 12/41 cases · 9 passed · 3 failed · 2m10s`), rewritten in place on a
|
|
291
|
+
terminal and logged at most every 30 seconds otherwise. It prints a deep link to the run's page
|
|
285
292
|
in the Evals UI; `--app-url` / `CASSIS_APP_URL` overrides the link's base URL
|
|
286
293
|
when the webapp is not served from the API host (defaults to `--api-url`).
|
|
287
294
|
|
|
@@ -320,11 +327,11 @@ A domain without `owners` inherits its nearest parent's, and the root domain's (
|
|
|
320
327
|
|
|
321
328
|
| Code | Meaning |
|
|
322
329
|
| ---- | ------------------------------------------------------------------------------ |
|
|
323
|
-
| 0 | Context is valid (check) / pulled (pull) / uploaded (upload) / eval run completed with no regression: every case passed, already failed on the base run, or is pending the change it guards (eval run) / every probe completed (test, whatever its outcome; probes are informational, don't gate CI on them) / dbt upload accepted, or kept behind a newer one (dbt push) / dbt upload checked, with or without findings (dbt check) |
|
|
324
|
-
| 1 | Validation failed (check: findings printed; upload: nothing imported; eval run: invalid tree or a regression, a case whose answer fails now
|
|
330
|
+
| 0 | Context is valid (check) / pulled (pull) / uploaded (upload) / eval run completed with no regression: every case passed, already failed on the base run, was already noisy (verdicts differing on identical inputs), or is pending the change it guards (eval run, eval runs watch) / every probe completed (test, whatever its outcome; probes are informational, don't gate CI on them) / dbt upload accepted, or kept behind a newer one (dbt push) / dbt upload checked, with or without findings (dbt check) |
|
|
331
|
+
| 1 | Validation failed (check: findings printed; upload: nothing imported; eval run, eval runs watch: invalid tree or a regression, a case whose answer fails now, passed on the base run and was not already noisy; test: invalid tree or a probe failed; eval cases add: duplicate question or gold SQL that does not run; eval cases delete, show: no such case in the project; eval runs show, watch: no such run in the project; issues: no such issue or occurrence in the project; schema plan/apply: extraction is incomplete, the plan failed (unparseable or truncated DDL), is stale or expired, the apply failed, or the project won't accept it (a plan is being applied, a DDL was given for a warehouse-connected project, or --warehouse for a DDL-only one); dbt push: the upload was refused or rejected (a file is invalid, too large or from an unsupported dbt version, or no relation matches the project's data source); dbt check: the upload was refused or rejected (an invalid file, or no baseline yet: run `cassis dbt push` first)) |
|
|
325
332
|
| 2 | Usage error (missing credentials or project, no context directory, unreadable file, tree over the size limits, `eval run --branch` naming a context branch the project does not have, `eval run --base` naming a published version the project does not have or given without `--changed`, `eval run --dry-run --case` naming no current case, `upload` or `schema push` outside a git checkout or with uncommitted context files, `dbt push` or `dbt check` without a manifest.json, outside a git checkout without `--commit`, or with an artifact over the size limits) |
|
|
326
|
-
| 3 | Transport/API error (unreachable API, invalid key, inaccessible project, unexpected response, a server
|
|
327
|
-
| 4 | `eval run` reached no verdict: the run failed or was cancelled on Cassis's side, or the cases that did not pass errored instead of failing (agent, judge or warehouse errors, a broken gold SQL). Nothing says the context regressed: rerun, or read the errors |
|
|
333
|
+
| 3 | Transport/API error (unreachable API, invalid key, inaccessible project, unexpected response, a server that requires a newer cassis-cli), another eval run already active, out of credits, `--timeout` reached, or Cassis failed on its side while processing a dbt upload (`dbt push` / `dbt check`: nothing to fix in the upload, push again) |
|
|
334
|
+
| 4 | `eval run` or `eval runs watch` reached no verdict: the run failed or was cancelled on Cassis's side, or the cases that did not pass errored instead of failing (agent, judge or warehouse errors, a broken gold SQL). Nothing says the context regressed: rerun, or read the errors |
|
|
328
335
|
|
|
329
336
|
Commands that send the local tree (`check`, `fmt`, `upload`, `eval run`, `test`) accept up to
|
|
330
337
|
20,000 context files / 100 MB total (path + content bytes), sized for a context of
|
|
@@ -479,7 +486,7 @@ or authentication errors.
|
|
|
479
486
|
|
|
480
487
|
### Result comparison expectations
|
|
481
488
|
|
|
482
|
-
`cassis eval add
|
|
489
|
+
`cassis eval cases add` and `cassis eval cases replace` take `--compare`. Its
|
|
483
490
|
default rules are a 1% numeric tolerance with rounding, any row order, columns
|
|
484
491
|
paired by value, and an empty result rejected. Each word changes one rule, and
|
|
485
492
|
words combine with commas: `exact` (numbers match exactly, for counts and
|
|
@@ -488,18 +495,18 @@ and `allow-empty` (an empty result is a valid answer). `--compare ordered,exact`
|
|
|
488
495
|
checks a ranking of counts; `--compare default` goes back to the default rules.
|
|
489
496
|
|
|
490
497
|
On replacement, an omitted `--compare` keeps the case's settings. Changing settings creates a new
|
|
491
|
-
case; historical results retain the rules they were scored with. `
|
|
498
|
+
case; historical results retain the rules they were scored with. `cases show`
|
|
492
499
|
and `run` show explicit rules. On metadata-only sources, result comparison is
|
|
493
|
-
marked unapplied and the SQL judge remains in use: `add
|
|
494
|
-
|
|
500
|
+
marked unapplied and the SQL judge remains in use: `cases add` and `cases replace`
|
|
501
|
+
warn when a case sets rules there, since the question text
|
|
495
502
|
must carry anything that matters (ranked, each once, ...).
|
|
496
503
|
|
|
497
504
|
### Case health
|
|
498
505
|
|
|
499
|
-
Review suite quality without spending credits with `cassis eval
|
|
500
|
-
|
|
501
|
-
The
|
|
506
|
+
Review suite quality without spending credits with `cassis eval cases list`: the
|
|
507
|
+
cases needing review come first, each with its labels and recommendation.
|
|
508
|
+
The health reads the latest 50 results per case. Unchanged-context verdict transitions
|
|
502
509
|
are descriptive; model and configuration changes can also explain them. Cases are
|
|
503
510
|
never removed automatically: review the recommendation, then replace or delete the case.
|
|
504
511
|
|
|
505
|
-
Repeated failures that agree on category and dependency evidence can create linked issues. `cassis eval
|
|
512
|
+
Repeated failures that agree on category and dependency evidence can create linked issues. `cassis eval cases show <case-id>` lists those issues; `cassis issues show <issue-id>` lists supporting eval cases. Dropping or replacing a case detaches its active evidence. An issue supported by other cases or conversations stays open; an issue with no remaining evidence is dismissed, not marked fixed. Diagnostic repeats do not create issues themselves.
|