Skip to content

feat(renderer): implement shared template contract v2 — version, tags, asset_meta tokens (#244) - #299

Merged
drawmeanelephant merged 1 commit into
mainfrom
t3code/template-contract-v2
Aug 27, 2026
Merged

drawmeanelephant merged 1 commit into
mainfrom
t3code/template-contract-v2

Conversation

@drawmeanelephant

Copy link
Copy Markdown
Owner

Summary

Implements the shared template contract v2 end-to-end (#244): the template dialect now has a real $version$ token plus $subtitle$/$tags$/$asset_meta$ (and reserved $navigation$/$warnings$), on the new Oliver pin 6db830e (drawmeanelephant/oliver#126).

  • Adapter (rc-oliver-adapter.sh): wrap_meta is enriched with version (from bones/config/version via rk_load_version — the same single source --version and @HELP use) and subtitle/tags/asset_meta read from source frontmatter with yq --front-matter extract (subtitle sidecar-wins). oliver meta still emits exactly the seven S1 fields; the Oliver/yq provenance split is documented.
  • Harness (rc-test.sh): all three fake-oliver wrap fixtures mirror the extended token set; new S2-v2 assertions cover substitution, html-escaping, $if$ gating, absent-known → empty, unknown → verbatim, plus a real-binary v2 wrap probe.
  • Contract (oliver-contract.md v1.13): the v2 addendum is promoted into the stable template dialect section (11 metadata tokens + $assets_root$/$body$), with gating rules, provenance, and the pin move recorded.
  • setup.sh: OLIVER_PIN moved 06dd6406db830e with the bump rationale.

Validation

  • zig build test upstream — 460 tests green (oliver Update environment initialization and loading to serialize paths to YAML #126)
  • bash rotkeeper.sh render — 123 tombs, output current, with the v2 binary
  • bash rotkeeper.sh test — 3/3 layouts, S2-v2 assertions pass on all layouts, template goldens unchanged, contract/DIP/regression suites green (with the v2 binary)
  • bash -n + shellcheck (repo .shellcheckrc) on rc-oliver-adapter.sh, rc-test.sh, setup.sh
  • bash rotkeeper.sh status — output current

⚠️ CI dependency (important)

Rotekeeper CI installs Oliver from the upstream rolling builds release and verifies oliver --version reports exactly the pinned commit. The builds release only serves 6db830e after drawmeanelephant/oliver#126 merges (the binaries.yml workflow republishes on every push to main). Until then, this PR's CI test check will fail at the setup step — merge oliver#126 first, let the builds release republish (a few minutes), then this PR's CI goes green and it can merge.

Notes

…, asset_meta tokens (#244)

Lands the v2 template dialect end-to-end on the new oliver pin 6db830e
(oliver #126): wrap now interpolates the extended metadata tokens.

- Adapter (rc-oliver-adapter.sh): wrap_meta enriched with version (from
  bones/config/version) and yq-extracted subtitle/tags/asset_meta
  (subtitle sidecar-wins); oliver meta stays at the seven S1 fields.
- Harness (rc-test.sh): all three fake oliver wrap fixtures mirror the
  extended token set; new S2-v2 assertions cover substitution, escaping,
  $if$ gating, absent-known → empty, unknown → verbatim, plus a real-
  binary v2 wrap probe.
- Contract (oliver-contract.md v1.13): the v2 addendum is promoted into
  the stable template dialect section (11 metadata tokens + assets_root/
  body), with provenance and the pin move recorded.
- setup.sh: OLIVER_PIN moved 06dd640 → 6db830e.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drawmeanelephant
drawmeanelephant force-pushed the t3code/template-contract-v2 branch from a7e2769 to 49fa7cf Compare August 27, 2026 20:06
@drawmeanelephant
drawmeanelephant merged commit a25e1a2 into main Aug 27, 2026
3 checks passed
@drawmeanelephant
drawmeanelephant deleted the t3code/template-contract-v2 branch August 27, 2026 20:18
drawmeanelephant pushed a commit that referenced this pull request Sep 5, 2026
…#261)

The fixture predated the template contract v2 wave (#299/#300/#303):
heading depth topped out at h3 (a "Heading 4" section sat on ###),
and no v2 tokens were carried, so themes could pass evaluation
without exercising version/tags/asset_meta or the site-nav slot.

- Extend headings through true h1-h6 with distinct h5/h6 sections
- Add subtitle, tags, asset_meta frontmatter (serialized form verified
  through the real adapter: name — version — author — project — license)
- Add .textile/.cook cross-format link targets alongside .md and
  external (S3 rewrite to .html verified)
- Refresh the contract-check section: v2 tokens, v3 generic hook
  (#269, page_type consumer), site-nav placeholder (#244), reserved
  $warnings$, stale #258 reference corrected to landed
- Stays CommonMark-safe: no task lists, no footnotes, no raw HTML

Verified end-to-end: render through theme-brutal (v2 footer tokens),
theme-textpattern (<site-nav> filled from rotkeeper.yaml nav), and
theme-spooky-dark-xhtml under render_profile xhtml (xmllint-clean);
bash rotkeeper.sh test passes 3/3 layouts (5118s) on pin 3f05bac.
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