spec(0.10.0): §4 — a top_ngrams sequence is ngram_size consecutive records of one observation stream - #19
Merged
Conversation
…cords of one observation stream §4 sized the block by ngram_size and called it a sequence fingerprint without saying what a sequence is. One sentence under the example now says it: the template ids of ngram_size consecutive records of one observation stream, in observation order. What a producer treats as one stream stays its own. The probability paragraph drops the clause about a top_ngrams holding sequences of more than one length (added in this unreleased 0.10.0 line), which no conforming document can now hold, and reads n as ngram_size. No schema change; no released version's documents change validity. Co-Authored-By: Claude Opus 5.5 <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.
The problem
§4 sizes the
behaviorblock byngram_size("size of n-grams") and calls it a sequence fingerprint, but never says what asequenceis. A producer can therefore read it as any template-to-template relation it observes. The reference implementation did exactly that: atngram_size3 it put a second relation, a declared link between two records (a span's parent link), intotop_ngramsas a two-id sequence beside the log-order trigrams, and fed the same relation tobranching,dominant_pathandgraph_edge_count. A producer that does not parse such links computes different values for the same records, so the members stopped meaning the same thing across producers. The 0.10.0 draft then added a clause to the probability paragraph conditioning each length among its own, which made the mixed block look legal.The proposed change (diff against
SPEC.md§4)sequencecomment readsarray of ngram_size template_ids — see below.sequenceis the template ids ofngram_sizeconsecutive records of one observation stream, in observation order, so every entry oftop_ngramsholds exactlyngram_sizeids. What a producer treats as one observation stream (the whole window, or a narrower scope such as one trace) stays its own; the sentence names no scope on purpose.top_ngramsholding sequences of more than one length, which no conforming document can now hold, and reads n asngram_size. The conditional definition itself (p(last | first n − 1), before thetop_ngrams_sizecut) is unchanged.CHANGELOG.mdrecords it under 0.10.0 → Clarified.Classification, for the editor
Against every released version (0.9.0 and earlier) this changes no document's validity: those texts sized every n-gram by
ngram_sizeand never admitted a second length. Against the unreleased 0.10.0 draft it withdraws one clause that admitted two lengths, so it can be read as breaking by the letter of that draft; 0.10.0 has no tag and no Release, so no implementer relied on it. The changelog entry files it as Clarified; reclassifying it is the editor's call.Alternatives considered
branching,dominant_pathandgraph_edge_countmixed, and a flag in a closed object is itself a spec change.Migration impact
The reference implementation now carries declared links in a vendor extension under the document root's
extensions(§7), with its own diff member under theMetaLogDiffroot'sextensions, and itstop_ngramsholdsngram_size-long sequences only. No schema changed.conformance/metalog_validate.py --selftest: 31/31 fixtures pass on this branch.🤖 Generated with Claude Code