Repository navigation
v2: a declined export's payload is absent in all four bindings; batches.md's unconsumed and payload notes, measured - #620
Merged
Merged
Conversation
…es.md's unconsumed and payload notes, measured The library returns a non-NULL, zero-length out_export buffer for a declined export, so Go and Python reported a declined export as present-but-empty (measured on build 20261011.105019). Each binding now decides from the document's export_declined, never the buffer's length: the payload and the spans are absent whenever export_declined is non-empty. batches.md replaces the unverified unconsumed note with the measured answer and states the raw-ABI rule. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When
chs_preview_batchdeclines an asked-for export, the v2 library still returns a non-NULL, zero-lengthout_exportbuffer. Only the document'sexport_declinedtells declined from emitted-but-empty. The documented contract says a declined export's payload is absent; Go and Python returned an empty payload instead.measuredon the published v2 dev build20261011.105019, in Go and Python: a batch rejected by aCHECK, asked to exportJSONCompactEachRow, gave the raw bufferlen=0(non-NULL) and a payload of length 0 (GoPayload != nil, Pythonb""), withexport_declinedset. An accepted zero-row export gave the same empty payload withexport_declinedempty, so the two were indistinguishable by payload.inferredfrom the code, not run (TypeScript and Rust have no local build here): both passed the buffer through unchanged as well.Fix (identical in all four)
The payload and
spansare absent (Gonil, PythonNone, TypeScriptundefined, RustNone) whenever the document'sexport_declined(orexport_declined_b64) is non-empty, whatever the buffer. They are present, possibly empty, only for an export that ran. The decision never reads the buffer's length; the library buffer is freed as before.decode_batch.go(production path) anddecode.go(decodeBatchGeneric); the equivalence reference follows._decode.py. TypeScript:documents.ts. Rust:decode.rs.Tests
A unit test per binding, fed a declined document with a zero-length (and a non-empty) buffer, expecting absence, and an accepted zero-row export expecting present-and-empty. Go also adds two declined documents to the old-versus-new decoder equivalence set. No stub-level case: the ABI stub's batch documents are fixed and none declines an export with a zero-length buffer, so that needs a new stub variant, left out of this change.
Docs
docs/guides/batches.md: theunconsumednote for a malformed UUID now states the measured answer in place of "unverified", and the payload note states that bindings and raw-ABI callers decide "declined" fromexport_declined.docs/reference/bindings-v1.mdpayload row, and each binding's CHANGELOG (### Fixed).TypeScript and Rust run in CI only.
🤖 Generated with Claude Code