Skip to content

v3.1.0 — duck_blocks 1.2: fragments, list-level validation, repair, conformance corpus

Choose a tag to compare

@teaguesterling teaguesterling released this 11 Sep 05:51
6c1c2e5

duck_blocks spec 1.2. The internal 6.x numbering is retired: 1.2 is the former 6.6 with the public label and no shape change (#30). The header records the renumbering in its honest history, marks every earlier entry as the internal line, and publishes SPEC_VERSION_SUPERSEDES = "6.6" so a consumer's major-equality check can tell a renumbering from a break. Next additive bump is 1.3, next breaking 2.0.

Fragments are legal input (issue #29). A list of blocks need not start at a document root. Implicit parents are defined in the header, once, for SQL, C++ and vendored copies alike: list_item -> list, caption -> figure, any inline -> plain; duck_block_implicit_parent(type, kind) reads that table.

List-level validation. duck_blocks_validate now reports rules over the whole list with field = 'list': element_order dense from 0 (L1), shallowest element at level 1 (L2), no level jumps (L3), required ancestors present (L4, L5).

duck_blocks_repair(blocks). The deterministic fixes for those rules, in order: wrap orphans in their implicit parent, rebase levels, collapse jumps, renumber. Idempotent; never changes an element's content, attributes or type, never removes one. The Pandoc exporter repairs a copy before writing, so a fragment exports as a valid document.

Conformance corpus (test/conformance/). Ten constructs with hand-written expected sequences; check_conformance_corpus.py reads each with every installed community producer and reports divergences with attribution. It found real ones on first run (markdown#59, markdown#60) that no repo's own suite could see.

DuckDB main (v2.0 line). duck_block_implicit_parent no longer uses BinaryExecutor::ExecuteWithNulls, which is gone on main (#31). NULL handling is pinned in a non-constant vector, because f(NULL) alone is constant-folded before the function runs.

Verified: v1.5.5 matrix green on #30 and #31; DuckDB-main canary green on all 21 legs, dispatched against the #31 branch before merge. Suite 1238 assertions. Tagged at 6c1c2e5.

Consumers: re-vendor the header against this tag's commit and record the sha in the copy's header comment. markdown (4245b44) and webbed (PR #151) are on 1.2; panduck re-vendoring.