From fd11fa89f963aeb5b88e79f11dd6e97df2a544df Mon Sep 17 00:00:00 2001 From: Emmanuel Prunet Date: Fri, 2 Oct 2026 18:04:58 +0200 Subject: [PATCH] =?UTF-8?q?spec(0.10.0):=20=C2=A713.1=20=E2=80=94=20a=20br?= =?UTF-8?q?anching=5Fdelta=20row=20exists=20only=20for=20a=20template=20wi?= =?UTF-8?q?th=20a=20behavior.branching=20entry=20in=20BOTH=20compared=20do?= =?UTF-8?q?cuments;=20a=20one-sided=20template=20has=20no=20row,=20never?= =?UTF-8?q?=20a=20zero=20entropy,=20and=20a=20consumer=20must=20not=20read?= =?UTF-8?q?=20one=20as=20zero?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 25 +++++++++++++++++++++++-- SPEC.md | 8 ++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3b1959..b76b617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,8 +37,10 @@ The spec follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). on `MetaLogDiff`, a rewritten §13.2 clause, a `diff_version` rule (§13.1.1) that a producer stamping an older value now violates, and a definition of `window.start` and `window.end` (§2.2) that a producer writing its own bounds there now violates, -and a definition of `behavior.top_ngrams[].probability` (§4) that a producer writing a -joint probability at `ngram_size` above 2 now violates. +a definition of `behavior.top_ngrams[].probability` (§4) that a producer writing a +joint probability at `ngram_size` above 2 now violates, and a rule on which templates get a +`branching_delta` row (§13.1) that a producer emitting one for a template branching on one +side only now violates. It also adds one optional member (`withheld_signals`, §13.2.2), which is additive on its own. MINOR bump: MAJOR stays `0`, so §6's *"the MAJOR field of `metalog_version` must equal the MAJOR of the spec"* is @@ -133,6 +135,25 @@ proposed; any of them that is taken lands as an editor change recorded here. non-conformant — and editor-merged under [`GOVERNANCE.md`](GOVERNANCE.md) §2's 0.x rule. No schema changed: the field was, and stays, a number in [0, 1]. +- **§13.1 — a `branching_delta` row exists only for a template with a `behavior.branching` + entry in BOTH compared documents.** The example showed the member and the schema fixed a + row's shape, but nothing said which templates get a row. The reference producer emitted + one for a template present in EITHER document's `branching`, writing `0.0` for the side + without an entry, so a template appearing with three equally likely successors reported + `previous_entropy_bits: 0.0, delta_bits: 1.58`: a shift from a value no window observed. + §4.2 makes the absence ambiguous on its own terms — an absent entry can mean the template + was not observed, had no outgoing edge (an empty distribution, whose entropy is undefined), + or was observed but not emitted or capped out — so zero is false in all three cases. A new + paragraph after the §13.1 example states the rule for producers and its mirror for + consumers: a missing row, or a template absent from one side's `branching`, is never an + entropy of zero. The array's vacuity (§13.2.1) is unchanged: it is emitted only when one of + the remaining rows moved, and unmoved rows survive beside the moved ones. **Breaking** — a + producer emitting one-sided rows becomes non-conformant — and editor-merged under + [`GOVERNANCE.md`](GOVERNANCE.md) §2's 0.x rule. No schema changed: the rule involves both + input documents, which no keyword can see. The reference implementation (insight-metalog) + adopts it in the same release; on its determinism corpus the rule removes 45 of 48 rows, + every one comparing a template the other window never held in `branching`. + ### Added - **§13.2.1 — `x-metalog-vacuous`, a per-property vacuity declaration.** The witness diff --git a/SPEC.md b/SPEC.md index 6fa9b69..f3c2212 100644 --- a/SPEC.md +++ b/SPEC.md @@ -1522,6 +1522,14 @@ not directly comparable. } ``` +**`branching_delta` rows.** A producer **MUST** emit a `branching_delta` row only for a +`template_id` that has a `behavior.branching` entry in BOTH compared documents. A template +with an entry on one side only has no row: an absent entry is not reported, never zero +entropy (§4.2 does not require an entry for every node, and lets a producer cap the block). +A consumer **MUST NOT** read a missing row, or a template absent from one side's +`branching`, as an entropy of zero. The rule involves both input documents, which no schema +keyword can see, so it is a producer obligation stated here and not a schema constraint. + ### 13.1.1 `diff_version` — which version this is **`diff_version` is the version of THIS specification that the document