Skip to content

feat(core): Frontmatter — lossless metadata⊕payload split; surfaces canonical-only-YAML finding - #9196

Merged
AceHack merged 1 commit into
mainfrom
otto/frontmatter-metadata-payload-split
Jul 2, 2026
Merged

feat(core): Frontmatter — lossless metadata⊕payload split; surfaces canonical-only-YAML finding#9196
AceHack merged 1 commit into
mainfrom
otto/frontmatter-metadata-payload-split

Conversation

@AceHack

@AceHack AceHack commented Jul 2, 2026

Copy link
Copy Markdown
Member

You (2026-07-02): cloud events/debezium envelopes … very similar to frontmatter, same kind of graph; either both … add [the delayed one] to our resume. KDL was the delayed half; this lands frontmatter (the sibling metadata⊕payload shape) and keeps KDL as the tracked next pickup.

A frontmatter document = a head between --- fences + a body → Object [ head; body ], head kept verbatim. So the split is a lossless bijection on any frontmatter (parse (render vt) = vt), and it rides the whole codec stack like any tree. tryMeta gives best-effort structured access.

Finding surfaced (recorded in the resume)

Our DynamicValue.fromYaml is a strict canonical parser — it rejects human YAML (title: Foo) as NonCanonical. So structured frontmatter meta (and human-YAML interop) is blocked on a lenient YAML parser — the same backlogged parser-combinator layer noted in RomDat's tokenizer seam. Frontmatter ships as the lossless split now; tryMeta is best-effort (canonical YAML only) until then. Honest boundary, not a silent partial.

Proofs (6/6)

lossless bijection (verbatim head); no-fence ⇔ empty-head; concrete literal parse; opening-fence-without-close → clean Error; best-effort tryMeta (canonical head parses, human head → clean Error); the split tree cross-verifies through parity-json / cbor / parity-asn1.

Resume

docs/trajectories/value-tree-codecs/RESUME.md — frontmatter split landed; canonical-only-YAML finding + lenient-YAML-parser need recorded; KDL still #1 next pickup (note: its value-tree mapping is a convention decision to make deliberately).

Generated with Claude Code

…anonical-only-YAML finding (shadow*)

Aaron 2026-07-02 (streamed): "cloud events/debezium envelopes … very similar to frontmatter,
same kind of graph … one graph, many surfaces"; "yes on next slice — either both … add
\[the delayed one\] to our resume." The delayed half was KDL; this lands frontmatter (the
sibling metadata⊕payload shape) and keeps KDL as the tracked next pickup.

A frontmatter document is a head between `---` fences + a body → the value tree
Object [ "head", String <verbatim head>; "body", String <body> ]. Kept as a VERBATIM string,
the split is a LOSSLESS bijection on ANY frontmatter (parse (render vt) = vt), and it rides
the whole ValueTreeCodec stack like any other tree. `tryMeta` gives best-effort structured
access to the head.

FINDING surfaced (recorded in the trajectory resume): our `DynamicValue.fromYaml` is a strict
CANONICAL parser — it rejects human-written YAML (`title: Foo`) as `NonCanonical`. So
structured frontmatter meta (and any human-YAML interop) is blocked on a LENIENT YAML parser
— the same backlogged parser-combinator layer noted in RomDat's tokenizer seam. Frontmatter
ships as the lossless split now; `tryMeta` is best-effort (canonical YAML only) until then.
Honest boundary, not a silent partial.

Proofs (tests/Tests.FSharp/Frontmatter.Tests.fs, 6/6): lossless bijection (head verbatim);
no-fence ⇔ empty-head; concrete literal parse; opening-fence-without-close → clean Error;
best-effort tryMeta (canonical head parses, human head → clean Error); the split tree
cross-verifies through parity-json / cbor / parity-asn1.

Resume updated: docs/trajectories/value-tree-codecs/RESUME.md — frontmatter split landed,
the canonical-only-YAML finding + lenient-YAML-parser need recorded, KDL still #1 next pickup
(with a note its value-tree mapping is a convention decision to make deliberately).

Anchors: the metadata⊕payload frame shared with EventEnvelope; the parser-combinator backlog
(lenient YAML); §8 of the codec-ports doctrine.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

AgencySignature-v1:
  persona: otto
  actor: zeta-otto
  surface: src/core
  topology: shadow-clone
  intent: frontmatter-lossless-metadata-payload-split-verbatim-head-rides-codec-stack-trymeta-best-effort-surfaces-canonical-only-yaml-finding
  authorization: aaron-explicit-either-both-add-delayed-to-resume-frontmatter-on-resume-2026-07-02
  uncertainty: low
  measure: frontmatter-lossless-split-parse-render-bijection-verbatim-head-no-fence-empty-head-concrete-parse-clean-error-trymeta-canonical-only-honest-boundary-crossverify-6-tests-canonical-yaml-finding-recorded
  delta-u: frontmatter-metadata-payload-split-landed-lossless-rides-codec-stack-canonical-only-yaml-limitation-surfaced-lenient-yaml-parser-need-recorded-kdl-still-next
  seed: S4
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@AceHack
AceHack merged commit f452957 into main Jul 2, 2026
32 checks passed
@AceHack
AceHack deleted the otto/frontmatter-metadata-payload-split branch July 2, 2026 20:36
AceHack added a commit that referenced this pull request Jul 2, 2026
…decs → ZetaParse Grammar IR (shadow*) (#9199)

Aaron 2026-07-02: "we have some small parser combinator foundation already … our zetaid is a
tiny parser generator … bits, a bit parser/generator … the ANTLR stuff is likely just some
docs/research/persona conversation … LARGE scope: compile to/from our IR and most other ANTLR
grammars using our parser generators and the open free ANTLR grammars; small changes to
existing ANTLR grammars is fine."

Take-the-existing-into-consideration synthesis (no new code). Discovered + connected the three
rungs of ONE spec→IR→generated-parser ladder that already partly exists:
  • rung 1 BUILT — Core.FSharp.ZetaId: spec (zeta-id-v1-layout.yaml) → GeneratedBitLayout →
    bit parser/generator (the proven-in-miniature seed Aaron named);
  • rung 2 BUILT (this session) — the value-tree codecs (#9185#9196) over DynamicValue;
  • rung 3 DESIGNED, not built — ZetaParse (Amara, zetaparse-lr-glr-…-2026-05-21): ingest
    ANTLR .g4 / Yacc / Tree-sitter / .zg → Zeta Grammar IR → LR/GLR parser (6 langs), consuming
    antlr/grammars-v4 (MIT/BSD; ANTLR survey by Lior, 2026-06-13). Don't RUN ANTLR — ingest it.

The synthesis subsumes two prior findings: the lenient-YAML need (frontmatter #9196) and the
general-KDL reader (the delayed fork) are both just grammars ingested to the Grammar IR — not
bespoke hand-parsers. The anti-reinvention principle is the TOSEC/MAME one (#9184): grammars-v4
is the license-clean corpus; build on it.

Records the ladder + next moves (Grammar IR as a DynamicValue schema; .g4 ingester; LR/GLR
backend) as rung-3 scope to steer with Aaron — LARGE, design-heavy, already designed.

  docs/research/2026-07-02-parser-generator-foundation-ladder-zetaid-bits-to-value-tree-codecs-to-zetaparse-grammar-ir-antlr.md
  docs/trajectories/value-tree-codecs/RESUME.md (ladder framing; KDL/lenient-YAML subsumed)

Anchors: ZetaParse (Amara), ANTLR survey (Lior), ZetaId; Knuth (LR), Tomita (GLR), Parr
(ANTLR), tree-sitter, Bison; antlr/grammars-v4 (MIT/BSD); only-the-irreducible-generate-the-rest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

AgencySignature-v1:
  persona: otto
  actor: zeta-otto
  surface: docs/research
  topology: shadow-clone
  intent: parser-generator-ladder-synthesis-zetaid-bit-codec-value-tree-codecs-zetaparse-grammar-ir-antlr-ingest-take-existing-into-consideration
  authorization: aaron-explicit-take-existing-parser-combinator-foundation-into-consideration-large-scope-compile-to-from-ir-antlr-grammars-2026-07-02
  uncertainty: low
  measure: discovered-zetaid-bit-parser-generator-and-zetaparse-antlr-survey-design-docs-connected-three-rung-ladder-spec-to-generated-parser-kdl-lenient-yaml-subsumed-as-grammar-ingest-grammars-v4-mit-bsd-corpus-no-code
  delta-u: parser-generator-foundation-scoped-on-existing-zetaid-seed-and-zetaparse-design-not-reinvented-codecs-are-rung-2-of-one-ladder-antlr-grammars-v4-is-the-corpus
  seed: S4
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