Skip to content

feat: add sqb review to build, test and compare a branch in a temporary schema - #1238

Merged
kvlonge merged 7 commits into
mainfrom
feat/sqb-review
Oct 23, 2026
Merged

kvlonge merged 7 commits into
mainfrom
feat/sqb-review

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Why

Before merging, a branch's changes need building against real data, testing and comparing with production. sqb test --since only covers unit tests; sqb diff needs both sides built by hand.

Changes

  • sqb review --since <ref> --against <target> plans the changed nodes plus downstream (--downstream critical|all|none, --select, which always adds changed ancestors); --dry-run stops there and lists hooks.
  • Builds every node into a run-owned lowercase schema (review_<utc>_<sha>_<run>) in one review database, after an append-only ownership marker; upstream is deferred to --against. The schema is always dropped; a failed drop exits 3.
  • Runs affected unit tests and audits, compares each built model and maps affected columns. Uncompared seeds, skipped builds and missing baselines are incomplete; Python nodes and their SQL readers are listed as not validated.
  • Text, Markdown or versioned JSON reports; exit 0/1/2/3, with usage errors exiting 3.
  • critical true model key, [review] config, optional render_drop_schema adapter method, and a janitor phase for leftover review schemas.
  • Docs for the command, config, model key, adapters and janitor.

Verification

  • DuckDB E2E: policies, --select (errors and added ancestors), dry run with hooks, findings, incomplete seeds, Python tasks, own-database nodes, usage errors, setup failures, Markdown failure, cleanup failure with janitor cleanup.
  • Rust unit tests for planning, naming, outcome, renderers and argv; Python tests for case folding.
  • make test and make check-ci pass.

Build every changed ancestor of a selected node, send every built node to the
review schema in one review database, name review schemas in lowercase, list
Python nodes and their SQL readers as not validated, report checks that never
ran as incomplete, exit 3 on usage errors, and document hooks.
@kvlonge
kvlonge enabled auto-merge (squash) October 23, 2026 15:56
@kvlonge
kvlonge merged commit 6cfb178 into main Oct 23, 2026
46 checks passed
@kvlonge
kvlonge deleted the feat/sqb-review branch October 23, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant