feat: own the index and log entry format in one model - #25
Merged
Conversation
This was referenced Aug 18, 2026
chrishiguto
force-pushed
the
feature/15-index-log-model
branch
from
August 19, 2026 14:03
0d281b4 to
804553a
Compare
leoafarias
force-pushed
the
feature/15-index-log-model
branch
from
August 21, 2026 16:11
fa2486d to
148fb81
Compare
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.
Why
Rules, prepared writes, and MCP writes must not carry competing copies of the
index.mdandlog.mdentry grammar.What
Adds
OkfIndexDocumentandOkfLogDocumentas the shared parser/emitter owner. The index generator and fixed Spec rules consume that model while bundles continue to retain reserved files as raw text.Writable models canonicalize entry text, preserve the intended index order, sort log date groups newest-first, and refuse states that cannot round-trip—including CR/LF-bearing links. Parse results retain malformed input for rule reporting and cannot be converted into writable documents while issues or unsupported frontmatter remain.
Reviewer's guide
Start with
lib/src/index_log.dart, thenlib/src/index_generator.dart,lib/src/spec_rules/context.dart, andlib/src/spec_rules/reserved_rules.dart. This is cleanly restacked on the merged graph query work.Testing
dart pub publish --dry-runreports zero warnings.Links
Part of #15.
BundleChangeSetconsumption lands in #27.