Skip to content

spec(0.10.0): §13.1 — a branching_delta row exists only for a template with a branching entry in BOTH documents; a one-sided template has no row, never a zero entropy - #17

Merged
coderoast-dev merged 1 commit into
mainfrom
spec/branching-delta-two-sided
Oct 2, 2026
Merged

coderoast-dev merged 1 commit into
mainfrom
spec/branching-delta-two-sided

Conversation

@coderoast-dev

Copy link
Copy Markdown
Collaborator

What

SPEC.md §13.1 showed branching_delta in its example and the schema fixed a row's shape, but nothing said which templates get a row. This PR adds a paragraph after the §13.1 example:

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.

CHANGELOG.md records it under 0.10.0 (still unreleased) › Changed, and the 0.10.0 headline lists it among the breaking items.

Why

  • Zero is false in every case an absent entry can mean. §4.2 does not require branching for every node and lets a producer cap it, so an absent entry means "not observed in that window", "no outgoing edge" (an empty distribution, whose entropy is undefined, not 0) or "observed but not emitted / capped out". The reference producer wrote 0.0 for the missing side, 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.
  • The consumer half is stated too, because a consumer accepting documents from any producer must not rebuild the same false shift from a template's absence.
  • 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.

Change class

Breaking: a producer emitting one-sided rows becomes non-conformant. Under GOVERNANCE.md §2's 0.x rule (PR #15), the editor merges it with no rfc: issue. No schema change: the rule involves both input documents, which no keyword can see. conformance/metalog_validate.py --selftest: 31/31 fixtures pass.

The reference implementation (insight-metalog) adopts the rule in the same release. On its determinism digest the rule removes 45 of 48 branching_delta rows, every one comparing a template the other window never held in branching; the 3 two-sided rows stay.

🤖 Generated with Claude Code

…e with a behavior.branching entry in BOTH compared documents; a one-sided template has no row, never a zero entropy, and a consumer must not read one as zero

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderoast-dev
coderoast-dev merged commit 4c751d2 into main Oct 2, 2026
1 check 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