Skip to content

DO NOT MERGE: 0.8.0 release line (--json and the CI drift gate) - #17

Merged
drycode merged 10 commits into
mainfrom
dy/ch-migrate-0.8
Nov 11, 2026
Merged

drycode merged 10 commits into
mainfrom
dy/ch-migrate-0.8

Conversation

@drycode

@drycode drycode commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

DO NOT MERGE. This draft is here for remote CI on the 0.8 release line. At release, main fast-forwards to the tagged commit, as 0.5 did. No merge button.

What 0.8.0 is

0.8.0 is 0.7.0 plus --json on status, history, lint and diff, and the GitHub Actions drift gate. Dan kept both under DRY-1542 on 2026-11-10. plan, rebuild_table and the journal waiter stay on dy/ch-migrate-1.0.

  • b679e13: --json with the published schemas, ported from 37aa615 (DRY-1244).
  • 552f562: the drift-gate example and its executable test, ported from 4f7f2a6 (DRY-1404). The README section on statement classification was dropped from this port, because that feature belongs to plan.
  • 618d690: the --json error-message test from 7833aaf.
  • b9a9375 and 3ce23b3: the bundled skill no longer claims that status refuses an old env.py, and it now covers --json.
  • 0d459d4: lint and diff are split into named steps. No behaviour change.
  • 6cf06cd: version 0.8.0, the CHANGELOG and the README upgrade note.

Without --json, output and exit codes are unchanged from 0.7, and there's no upgrade-env.

Evidence (local, at 6cf06cd)

  • Unit: 705 passed on each of Python 3.10–3.14.
  • Docker 26.3, integration and not cluster: 63 passed, 4 skipped (Cloud-only). integration and cluster: 16 passed.
  • ClickHouse Cloud, integration and not cluster: 55 passed, 12 skipped (STOP MERGES). integration and cloud: 4 of 4 passed. Cleanup verified: no it_* databases, users or roles remain.
  • The pinned action SHAs in docs/examples/github-actions-drift.yml resolve to their tags (checkout v7, setup-uv v10.2.0, upload-artifact v4.6.2), and actionlint passes.

Style gate

The gate was skipped with DRY_STYLE_GATE=skip. The remaining findings are cli.py's existing layout, where each click command sits above its own private helpers, and one 41-line integration scenario test ported from the 1.0 line. Reordering cli.py belongs in its own change. The length findings on lint, diff_cmd and IdempotencyRule.check are fixed in 0d459d4.

Solves: DRY-1789

🤖 Generated with Claude Code

Give automation stable status, history, lint and drift documents.
Keep diagnostics off stdout and distinguish drift from read failures.
Resolve applied ancestors and preserve explicit waiver reasons.

Ported from the held 1.0 line onto 0.7.0 for 0.8 (DRY-1542 kept
--json; plan is not part of it). The only conflict was status's
black-wrapped render_status call. uv.lock is re-locked from 0.7.0's
lock plus jsonschema rather than taken from the 1.0 line.

Solves: DRY-1244
Tests: 704 unit tests on Python 3.13 (686 on 0.7.0 plus 18 JSON)
(cherry picked from commit 37aa615)
Compare a committed environment snapshot without regenerating the
expected schema. Preserve JSON evidence before failing the job and
isolate temporary database credentials from artifacts and logs.

Ported from the held 1.0 line onto 0.7.0 for 0.8. The README and
CHANGELOG conflicts carried the statement-classification section
from the plan work, which 0.8 does not ship; only the drift-gate
parts are kept.

Solves: DRY-1404
Tests: test_drift_workflow (in sync, out-of-band change, actionlint)
(cherry picked from commit 4f7f2a6)
0.6 and 0.7 took 7833aaf's ui-marker output fix without its --json
test, because neither had --json. Restore it now that 0.8 does: an
old env.py refusal reaches a history --json caller as the plain
message in the error field, with exit 2.

Solves: DRY-1244
Tests: tests/test_cli_output.py (6 passed)
The bundled skill listed status among the commands that refuse an
old environment. Only up, down and history call the check; status is
a report and keeps running, as the README already says.

Solves: DRY-1542 doc follow-up (status and old env.py)
Tests: none (docs)
Agents that install the skill with `ch-migrate skill` read its
command table, so list --json on status, history, lint and diff and
give the JSON-mode exit codes there.

Solves: DRY-1244
Tests: none (docs)
Both commands were over the 30-line limit before --json, and the
JSON branches made them longer. lint now reads as config, scope, run
and report; diff as snapshot, local schema, live schema and compare.
Each JSON error path is unchanged, and the idempotency rule builds
its result in one line. No behaviour change.

Solves: python-style length findings on lint and diff_cmd
Tests: 705 unit; lint, diff, gate and JSON integration (12 passed)
0.8 is 0.7.0 plus --json on status, history, lint and diff, and the
CI drift gate (DRY-1542 kept both; plan, rebuild_table and the
journal waiter stay on the held 1.0 line). Without --json nothing
changes and there is no upgrade-env, so the CHANGELOG leads with
that. The drift gate's README and example now name 0.8.0 as the
first release with diff --json.

Solves: DRY-1405 (0.8 version and CHANGELOG)
Tests: 705 unit on 3.13; full suites run before the tag
The ported README said --json becomes a public interface at 1.0,
with breaking changes needing a major version. Whether the schemas
freeze at 1.0 is still open on DRY-1542, so say what the CHANGELOG
says: the format can change before 1.0, and schema_version tells a
caller which one it has.

Solves: DRY-1542 open question (what 1.0 promises)
Tests: none (docs)
snapshot writes a new timestamped directory every time, so a drift job
pinned to the first one keeps comparing against it after a reviewed
re-snapshot. Name each environment's snapshot (snapshots/dev), and
replace it in place on re-snapshot, so CH_MIGRATE_SNAPSHOT_DIR never
changes and review shows the schema change as a diff.

Solves: DRY-1789 README drift section for 0.8.0
Tests: tests/test_readme.py
Rename the table, column, dictionary, user and row-policy names in the
introspection, snapshot and MV-validation fixtures, the mv_validate
docstring and the snapshot --filter example to generic ones. Each test
checks the same parsing and validation as before.

Solves: DRY-1789 fixture names before 0.8.0
Tests: unit 705 passed; sdist and wheel built and searched
@drycode
drycode merged commit 57ffb8d into main Nov 11, 2026
8 checks passed
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