Skip to content

v2 spec: the pre-init refusal (precision) and chs_preview_row reads exactly one row (prose, fp unchanged) - #622

Merged
EricAndrechek merged 3 commits into
v2from
v2-spec-teardown-fix
Oct 11, 2026
Merged

EricAndrechek merged 3 commits into
v2from
v2-spec-teardown-fix

Conversation

@EricAndrechek

@EricAndrechek EricAndrechek commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Two prose statements in the v2 spec, made before the artifact producer pins the header:

  1. Teardown (a precision fix to v2 spec: a declined export's out_export is NULL; calls before chs_initialize refuse (prose, fp unchanged) #621): the pre-init refusal excepts chs_initialize alone (chs_shutdown returns void, so it was never among the chs_status calls); and after chs_shutdown has run, every such call refuses the same way (CHS_INVALID_ARGUMENT, ClickHouse code 0, a message saying chs_shutdown has run).
  2. chs_preview_row reads the whole body, which holds exactly one row (the producer's requirement for its next library build): the body is read with chs_preview_batch's reader; a malformed tail or trailing content the reader does not skip is rejected with the reader's own code, as a server's INSERT rejects it, while what the reader skips (a trailing newline) is fine; zero rows or more than one is CHS_INVALID_ARGUMENT, naming the call, with chs_preview_batch the call for many rows; and the row document equals the single row of chs_preview_batch's document for the same body. Published builds up to and including 20261011.105019 answer from the first row and ignore the rest.

Prose only (spec/abi-v2/docs.md, regenerated include/v2/chtypes.h and docs/reference/abi-v2.md). Both statuses are already in chs_preview_row's may_return. Measured: gen.py --major 2 --check passes, the fingerprint is unchanged (d60a681e…), and the header sha256 is b2d9b8290ffc311a57f91998495ae0588a0f93eeb6bb8b3efc5efb549f089315. markdownlint, dprint, lint-spelling, lint-cited-paths and lint-public pass.

🤖 Generated with Claude Code

EricAndrechek and others added 2 commits October 11, 2026 12:00
…after chs_shutdown

A precision fix to #621's Teardown sentence, before the producer pins it:
chs_shutdown returns void, so it was never among the chs_status calls the
sentence excepted, and after chs_shutdown has run every such call refuses the
same way (CHS_INVALID_ARGUMENT, code 0, a message saying chs_shutdown has run).
Prose only; the fingerprint is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e row

The producer's requirement, stated in the spec before its next library build:
chs_preview_row reads all of body with chs_preview_batch's reader; a
malformed tail or trailing content the reader does not skip is rejected with
the reader's own code, as a server's INSERT rejects it; zero rows or more than
one is CHS_INVALID_ARGUMENT naming the call (chs_preview_batch answers many
rows); and the row document equals the single row of chs_preview_batch's
document for the same body. Both statuses are already in may_return, so the
fingerprint is unchanged; prose only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@EricAndrechek EricAndrechek changed the title v2 spec: the pre-init refusal excepts chs_initialize alone, and covers calls after chs_shutdown (prose) v2 spec: the pre-init refusal (precision) and chs_preview_row reads exactly one row (prose, fp unchanged) Oct 11, 2026
@EricAndrechek
EricAndrechek merged commit 437ee13 into v2 Oct 11, 2026
54 checks passed
@EricAndrechek
EricAndrechek deleted the v2-spec-teardown-fix branch October 11, 2026 16:32
EricAndrechek added a commit that referenced this pull request Oct 11, 2026
The next dev release: a declined export's payload is absent in all four
bindings, decided from export_declined (#620); the v2 spec states NULL
out_export on a declined export, the pre-init and post-shutdown refusals, and
chs_preview_row's exactly-one-row rule (#621, #622; prose, the fingerprint is
unchanged); the filter enforcement gate lifted again for 11 pairs and a
CREATE-level divergence registered (#617); a test-timing fix and failure text
in the stub census (#618). It pairs with artifact build 20261011.105019 at
fingerprint d60a681e. The same eight files as the 2.0.0-dev.7 bump.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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