Skip to content

sql epic #3047: CI gates, ClickHouse and Postgres dialect work, import and migrate - #4412

Merged
lex00 merged 66 commits into
mainfrom
epic/3047-sql
Oct 24, 2026
Merged

lex00 merged 66 commits into
mainfrom
epic/3047-sql

Conversation

@lex00

@lex00 lex00 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Lands the sql epic (#3047) work in one integration branch, epic/3047-sql. Each issue was built on its own branch, merged here and checked here; every issue gets a closing comment with its commits after this merges.

Issues

CI and gates (from #4287's gaps):

sql lexicon, ClickHouse:

sql lexicon, Postgres and coverage:

Workspace, import and translation:

Checked on this branch

  • npm run typecheck: clean.
  • just test with CHANT_UNIT_TEST_BUDGET_MS=0: 2031 files, 28246 tests passed, 0 failed. Under the default 5 s budget on a loaded machine, git-heavy workspace and lifecycle tests can exceed it; every such failure passes with the budget off.
  • Unit tests only. e2e tests were written where a Done-when asks for one and were not run: the S3Queue replace, the collector-on-emulator, the named-collection plan, migration replay, the Drizzle and drizzle-kit checks, SQL Server and Postgres-to-ClickHouse --validate, and the PostgresMigrationOp follow-ups.

Follow-ups filed

#4404 (P1), #4405, #4406, #4407, #4409.

lex00 added 30 commits October 23, 2026 18:17
…from trust.json at base (#4324)

identity.gates.<gate> takes quorum beside class. A run reads the entry at
base and its quorum replaces the Op's own approval.quorum, so a change can't
lower the quorum its own run needs. A gate whose entry sets none keeps the
Op's. gate-decision's identityGatesAt returns the quorum too.

A gate policy's principal.roles are the roles .chant/trust.json at base
gives an approver a seal proves, as the quorum rules read them. Roles
claimed with chant approve --role are recorded and trusted by nothing.
…unner key from the plan job, check overdue Ops in ci run (#4328)
…rum, and leave out everyone involved in a change (#4333)
# Conflicts:
#	packages/core/src/op/op-waves-run.ts
…in ClickHouseRebuildOp, StreamIngest composite (#4396)
…s and servers, and publications (#3911)

Four tags join the Postgres dialect: statistics, foreignDataWrapper,
foreignServer and publication. A wrapper, a server and a publication are the
database's (no schema); statistics are a schema's, on one table.

- Parser, entities, canonical form: statistics kinds as a set (all three is
  none), a publication's tables with column list and row filter, schemas and
  options at their defaults left out.
- Classifier: SQLPG303 alters a wrapper, a server or a publication in place
  (ALTER FOREIGN DATA WRAPPER, ALTER SERVER, ALTER PUBLICATION SET/ADD/DROP);
  statistics, a server's type or wrapper and FOR ALL TABLES are dropped and
  created (SQLPG300), refused while something depends on them (SQLPG301).
- Catalog reader: statistics through pg_get_statisticsobjdef, the rest from
  their catalog rows (column lists and schema members where the server has
  them). An option named like a credential is refused in a tag and left out
  of an import with a warning.
- Coverage table: four rows declared; user mapping and subscription refused
  with the reason (they carry credentials). The completeness test now also
  checks that a declared row names a real entity type and every entity type
  has a row.
- Unit tests: tags, classifier and statements, catalog reader, and declare,
  build, import, plan with no change. Live e2e written, not run.

Part of #3911
The operator tag takes CREATE OPERATOR, identified by its name and operand
types (NONE for a missing side). Its function and estimators compare by
qualified name, COMMUTATOR and NEGATOR as schema.symbol (bare means the
operator's own schema), HASHES and MERGES only when set. A change is a drop
and a create (SQLPG300), refused while an operator class, index or view
depends on it (SQLPG301). CREATE OPERATOR CLASS and FAMILY stay refused.

Part of #3911
lex00 added 5 commits October 23, 2026 21:12
# Conflicts:
#	CHANGELOG.md
#	docs/src/content/docs/reference/boundary.mdx
#	packages/core/src/lexicon.ts
#	packages/core/src/op/local-executor.ts
#	packages/core/src/workspace/checks.ts
#	packages/core/src/workspace/kinds.ts
#	packages/core/src/workspace/workspace-kinds.schema.json
…p-waves goldens keep pinned SHAs and outcome steps, ClickHouseExporter in BUILTIN_SPECS, the exporter test follows COLLECTOR_PIN (#4322, #4397)
…ejo rewrite, terraform example and ops sample
… reason codes, and the regenerated plan-previews table
…lickHouseExporter has a generated config at the pin (#4397)
@lex00
lex00 merged commit 97b03f5 into main Oct 24, 2026
9 checks passed
This was referenced Oct 24, 2026
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