Let's pickup #1624
- User
Let's pickup #1624
Assistant
Now let's make the shared helper in
sql.py:Assistant
Now update
snowflake.pyto use the shared helper instead of its own copy:Assistant
Need to import the shared helper into snowflake.py.
Assistant
Now let's update
unity_catalog.py: add the Databricks reflection fold and expandSQL_PUSHDOWN_EXPECTATION_TYPES.Assistant
Now update the pushdown set and add the reflection-key fold + wire it into
_run_sql_checks:Assistant
Good, matches the Snowflake pattern (importing from the concrete dialect module). Let me fix the import path.
Assistant
Now wire
_fold_reflection_keyed_columnsinto_run_sql_checkswhererun_expectationsis called with the check list. Let me view that section again with current line numbers.Assistant
No more diagnostics reported — good. Now let's check the
expect_column_pair_values_to_be_in_set— was it previouslyis_allowedonly, not offered in editor but authorable via API/MCP. Let's checkcheck.py/ catalog service references forbandable/dataframe_onlycapability lookups that might reference UC-specific frame-batch lists elsewhere.Assistant
Pre-existing diagnostics unrelated to this change. Let's re-run the test.
Assistant
Now let's run the full UC test file to make sure nothing else broke, plus the Snowflake tests (I refactored the shared helper).
Assistant
All green. Now let's check
sql.py's own test file to make sure the new shared helper is tested, and search for atest_sql.py.Assistant
Good — those still pass (confirmed above via the full test_snowflake.py run). Now let's add equivalent tests for the UC-side
_reflection_key/_fold_reflection_keyed_columns, mirroring the Snowflake ones.Assistant
Matches exactly. Now let's find where in test_unity_catalog.py to add analogous tests, plus check current imports.
Assistant
Let's add
_fold_reflection_keyed_columnsand_reflection_keyto the import and add tests near the pushdown-partition test.Assistant
Now add the test functions right after
test_pushdown_allowlist_partitions_the_catalog.Assistant
Now let's run these new tests plus the pushdown group again.
Assistant
All 14 types are already exercised on both a pandas and SQLAlchemy batch in that shared catalog test. Now let's run mypy/ruff/black to make sure the code is clean before moving to live verification.
Assistant
These are pre-existing lint noise in the test file (unrelated). Let's re-run mypy.
Assistant
Now the full backend test suite for the datasources module and check_service/suite_io_service that reference these sets.
Assistant
All green. Now let's move to live-Databricks verification. First check the harness UC/Databricks credential and window script.
Assistant
The local stack (mirroring prod) is already running. Let's check the existing UC connection in local Postgres and whether the Databricks PAT / warehouse is reachable directly (no Azure wake needed since Databricks Free Edition SQL warehouses auto-resume on query).
Assistant
Good — imports work. Let's inspect the target table's schema first (read-only, no secrets involved yet beyond the connection test).
Assistant
Azure access is live. Let's find the Key Vault and the prod UC connection's config/secret name.
Assistant
That's fine for a throwaway script. Let's run it in the background since it may take up to 2 minutes.
Assistant
Code + tests are done and green. Live verification is blocked: the Databricks Free Edition workspace (
dbc-4492dde4-090c.cloud.databricks.com) is deactivated for inactivity — the warehouse-start call returnsdenyReason: INACTIVE(resource-gatekeeper), not a cold-start or auth issue (the PAT itself authenticates fine, 200 on the warehouse-info call). This is a Free Edition policy that only a browser login by the account owner can clear — no API/CLI path exists to reactivate it.Status:
SQL_PUSHDOWN_EXPECTATION_TYPESnow includes all 14 types from #1624, plusexpect_column_pair_values_to_be_in_sethandled correctly as an allowlist-only type in the partition test.- Added the Databricks-dialect reflection-casing fold for
expect_compound_columns_to_be_unique(shared the Snowflake #1616 logic intosql.pyrather than duplicating it), with unit tests proving the fold and mirroring the dialect's actualnormalize_namebehavior (verified against the installeddatabricks-sqlalchemypackage directly). - Full datasources + API test suite green (1154+ tests), ruff/black/mypy clean.
Blocked: live-Databricks-SQL verification per type (the #953/#1624 acceptance bar) can't run until the workspace is reactivated.
Assistant
Sounds good — log into
https://dbc-4492dde4-090c.cloud.databricks.comand let me know when you're in. I'll then re-run the live verification for all 14 pushdown types plus the uppercase-columncompound_columns_to_be_uniquecase.- User
Done
Assistant
Reactivated — warehouse start accepted (200). Let's poll until it's
RUNNING.Assistant
The warehouse is now
RUNNING. Let's discover the schema/table shapes to design realistic checks.Assistant
Now remove the redundant
date_dimre-run and fix the raw-trap section to use a valid 2-column list.Assistant
Live verification is complete and matches ground truth on every check. Let's finalize: run the full test suite once more, then branch/commit and follow the project's PR workflow (including
/code-review).Assistant
We're on
mainwith uncommitted changes. Let's branch off per the repo's convention.Assistant
Now let's run the full local verification battery before committing.
Assistant
Full backend suite green (97.15% coverage). Now lint/format/types/security for the changed files, then bandit + betterleaks per the standing pre-push discipline.
Assistant
Pre-existing noise, unrelated. Now
unity_catalog.py:Assistant
Now the test file's comments:
Assistant
Now the two test-function comments:
Assistant
Clean. Now let's check for CLAUDE.md mentioning bandit/betterleaks in the pre-push battery, and run those plus the full mypy sweep one more time.
Assistant
Commit is in. Now let's push and open the PR, then run the mandated
/code-review.Assistant
PR #1629 is open. Now the mandated
/code-review.Assistant
Still 2 review subagents running. I'll wait for them to finish rather than act early.
Assistant
Two review subagents still working. I'll wait for them to finish before acting on findings.
Assistant
Still running — I'll wait for the notification.
Assistant
Waiting on the remaining
/code-reviewsubagents to finish before compiling findings and fixing the confirmed clash-detection gap on PR #1629.Assistant
One more still running. I'll wait for it before fixing, in case it surfaces additional findings.
Assistant
Waiting on the last review subagent to finish before compiling and fixing.
Assistant
Now let's add the
_spec_columnshelper near_fold_reflection_keyed_columns.Assistant
Good — this looks correct. Now let's run the tests and add regression coverage for both fixes.
Assistant
Now let's verify these tests actually fail against the pre-fix code (mutation-check), then confirm they pass now, and add a regression test for the try/except isolation fix.
Assistant
Confirmed — both new tests fail against the pre-fix code for the right reason. Restore the fix.
Assistant
Let's mutation-verify by moving the fold back outside the try block temporarily.
Assistant
Confirmed — the test fails (propagates uncaught) when the fold is outside the try, and passes with it inside. Restore.
Assistant
Let's close the loop the reviewer flagged — live-verify that the sibling
column_listtypes (multicolumn_sum_to_equal,select_column_values_to_be_unique_within_record) genuinely don't need the reflection fold, by trying them with uppercase column names.Assistant
Warehouse is stopped (workspace still active though, since I already reactivated it). Let's start it and wait.
Assistant
I'll wait for the warehouse to come up, then run the sibling-type verification.
Assistant
Warehouse is running. Let's run the targeted casing test on the two sibling
column_listtypes.Assistant
Now let's add a short comment recording why only
compound_columns_to_be_uniqueneeds the fold.Assistant
Let's run the full verification battery once more before committing the fixes.
Assistant
All 5137 tests pass. Let's commit as a fixup per the project's in-review-PR convention.
Assistant
Now let's reply to the review thread that flagged the confirmed clash-detection bug and mark it resolved.
Assistant
Now update the Snapshot table's open PR/issue counts.
Assistant
Let's check the epic #1518 checklist for a #1624 entry to tick.
Assistant
No #1624 entry in the epic checklist (it was filed after the epic's checklist was written), so nothing to tick there. Let's commit the docs update.
Assistant
Let's check CI status on the PR.
Assistant
#1624 is done and PR #1629 is open — CI is running now, I'll let you know when it's green.
Summary:
- All 14 eligible UC expectation types now push down to Databricks SQL, joining
SQL_PUSHDOWN_EXPECTATION_TYPES. expect_compound_columns_to_be_uniquegot the Databricks-dialect reflection-casing fold (mirroring #1616's Snowflake fix), shared intosql.py.- Live-verified every type against the real Databricks warehouse —
unexpected_percentmatched independently-computed ground truth on every check, and confirmed the uppercase-column fold is load-bearing (raw GX KeyErrors without it). /code-reviewcaught a real bug: the index-column clash workaround only checked thecolumnkwarg, missing the newcolumn_A/column_B/column_list-keyed types. Fixed with a generalized_spec_columns()helper, regression tests added and mutation-verified against the pre-fix code.- Also fixed: the reflection fold now runs inside the SQL group's own try/except (was outside, risking an unhandled crash on a mixed suite). Live-verified the two sibling
column_listtypes don't need the same fold.
- All 14 eligible UC expectation types now push down to Databricks SQL, joining
Assistant
CI is now fully running (13 checks). I'll wait for them to finish and report back.
Assistant
Two checks passed so far — waiting on the rest.
Assistant
Backend lint, Bandit, and pip-audit all green. Still waiting on tests, type check, CodeQL, and the frontend/secret-scan checks.
Assistant
Backend type check, frontend lint, and secret scanning all passed. Still waiting on Backend tests, CodeQL (both), and the remaining frontend checks.
Assistant
Both CodeQL analyses green. Waiting on Backend tests, Frontend tests, and Playwright E2E.
Assistant
Backend tests failed in CI — let's see why.
Assistant
Now let's verify against my full-env conda mypy (representative of the
Backend — testsjob).Assistant
Full-env
mypy tests/passes now. Let's also check the minimal typecheck env (matchingBackend — type check/ pre-commit) to be sure.Assistant
Both environments pass now. Let's clean up the scratch venv and commit.
Assistant
All green locally. Let's commit the fix and push.
Assistant
Let's set up a fresh monitor for this new push's CI run.
Assistant
Both monitors are now tracking the same run — let me stop the older duplicate.
Assistant
Fixed the mypy environment mismatch (
Backend — tests' full-deps mypy run needed what the minimalBackend — type checkrun treated as unused) and pushed. Waiting on the single remaining monitor for the full green.Assistant
Backend type check now green too. Waiting on Backend/Frontend tests and Playwright E2E.
Assistant
Still waiting on Backend tests, Frontend tests, Playwright E2E, and Python CodeQL.
Assistant
Both CodeQL checks green. Waiting on Backend tests, Frontend tests, and Playwright E2E.
Assistant
Frontend E2E and tests both green. Just waiting on Backend tests now.
Assistant
CI is all green (14/14), but merge is blocked — likely the unresolved review thread (per project history, this blocks merge even with green CI). Let me resolve it.
Assistant
I already replied to this thread explaining the fix — let's resolve it.
Assistant
CI is fully green and the review thread is resolved — PR #1629 is clean and mergeable.
Assistant
Merged and branch deleted. Let's verify and update
docs/progress.md's Snapshot counts.Assistant
Merged, and issue #1624 auto-closed. Let's switch back to
main, pull, and updatedocs/progress.md's snapshot.Assistant
53 open issues, 0 open PRs. Let's update the Snapshot table.
Assistant
That row already reads correctly (✅, merged PR link). Let's commit and push this docs update.
Assistant
Right — commits to
mainare blocked. Let's branch, commit, push, PR, and merge (docs-only, safe to fast-track).Assistant
Clean review, no findings. Let's check CI and merge.
Assistant
Let's monitor this small PR's CI to completion.
Assistant
Waiting on CI for the docs snapshot PR (#1630).
Assistant
8 checks passed. Waiting on Backend/Frontend tests, Playwright E2E, and CodeQL.
Assistant
Waiting on Backend/Frontend tests, Playwright E2E, and Python CodeQL.
Assistant
Still waiting on Backend/Frontend tests and Playwright E2E.
Assistant
Python CodeQL green. Waiting on Backend tests, Frontend tests, and Playwright E2E.
Assistant
Playwright E2E green. Waiting on Backend and Frontend tests.
Assistant
Frontend tests green. Just Backend tests left.
Assistant
All 14 checks green on PR #1630. Merging.
Assistant
#1624 is fully closed out: 0 open PRs, main is up to date, docs reflect the final state.
Done: All 14 eligible UC expectation types now push down to Databricks SQL. Live-verified against the real Databricks warehouse (every
unexpected_percentmatched independently-computed ground truth);expect_compound_columns_to_be_uniquegot a reflection-casing fold mirroring the Snowflake fix./code-reviewcaught and fixed a real bug (index-column clash detection missed the newcolumn_A/column_B/column_list-keyed types) plus a CI-only mypy environment mismatch. PR #1629 merged, docs snapshot updated in follow-up PR #1630.- User
What is the current code to comment ratio per module [frontend, backend, Infra]
Assistant
cloc installed. Let's define the three module scopes and run it.
Assistant
That's vendored
.terraform/provider cache (gitignored, not real repo content). Let's exclude it and recompute infra properly.Assistant
Ran
clocacross the three trees (excluding vendored/generated content —.terraform/provider cache,pnpm-lock.yaml,__pycache__, build/dist).Module Language(s) counted Code lines Comment lines Comment : Code ratio Backend Python (app + tests + alembic) 88,339 17,238 0.195 Frontend TypeScript/TSX, JS, CSS, HTML 33,070 4,110 0.124 Infra Terraform (HCL) + GitHub workflows (YAML) + infra scripts (Python) 3,809 795 0.209 Backend sits right at the project's own
<0.2standing bar from the #1536 prose-trim pass; frontend is noticeably leaner (0.124); infra runs slightly over 0.2 — Terraform/YAML tend to carry more inline rationale comments than app code, so that's not necessarily a violation of the same bar (that bar was scoped to backend/tests/alembic/frontend per the memory, not infra).