From 6ebc015faa1e8227996f9dee2d4a4e415c86063f Mon Sep 17 00:00:00 2001 From: Beau Boorman Date: Fri, 28 Aug 2026 13:40:51 -0500 Subject: [PATCH 1/2] test(fixtures): extend theme-eval fixture to full contract v2 surface (#261) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ( 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. --- .../scripts/tests/fixtures/theme-eval/eval.md | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/bones/scripts/tests/fixtures/theme-eval/eval.md b/bones/scripts/tests/fixtures/theme-eval/eval.md index eb0f0e7f..fa9e6549 100644 --- a/bones/scripts/tests/fixtures/theme-eval/eval.md +++ b/bones/scripts/tests/fixtures/theme-eval/eval.md @@ -1,17 +1,29 @@ --- title: "Theme Evaluation Fixture — Longform & Primitives Stress Test" -description: "Headings H1–H4, tables, code, blockquotes, lists, warnings, metadata — CommonMark-safe" +description: "Headings H1–H6, tables, code, blockquotes, lists, warnings, metadata — CommonMark-safe" author: "Rotkeeper Fixture Harness" -date: "2026-08-24" +date: "2026-08-27" template: "theme-brutal.html" palette: "mac" +subtitle: "Every renderable primitive through every theme" +tags: + - fixture + - theme-eval + - template-contract-v2 +asset_meta: + name: "eval.md" + version: "0.7.0" + author: "Fixture Harness" + project: "Rotkeeper" + tracked: true + license: "All Rights Reserved" --- # Heading 1 — The Necropolis Reads This is a long paragraph designed to test measure and vertical rhythm at roughly sixty to seventy-five characters per line. Rotkeeper's reading-first themes must keep line length constrained, spacing even, and contrast legible whether the palette is phosphor green on black, macOS Terminal graphite, or PowerShell blue. The same body will render through every theme in the gallery, and the fixture lives beside `oliver-smoke` under `bones/scripts/tests/fixtures/theme-eval/`. -A second paragraph with **strong emphasis**, *emphasis*, `inline code`, and a [relative link](my-first-page.md) plus an [external link](https://example.com) ensures link rewriting, escaping, and inline parsing remain correct deposit. Escapable characters: `& < > " '` must be escaped in titles and descriptions but not in `$body$`. +A second paragraph with **strong emphasis**, *emphasis*, `inline code`, and a [relative link](my-first-page.md) plus an [external link](https://example.com) ensures link rewriting, escaping, and inline parsing remain correct deposit. Cross-format sources rewrite too: a [textile link](docs/textile-guide.textile) and a [cooklang link](../recipes/gravediggers-pie.cook) must both land on `.html`. Escapable characters: `& < > " '` must be escaped in titles and descriptions but not in `$body$`. ## Heading 2 — Lists, Quotes, and Structure @@ -41,7 +53,7 @@ Ordered, mixed depth: 2. Another nested 3. Step three -### Heading 4 — Blockquotes and Warnings +#### Heading 4 — Blockquotes and Warnings > Keep the dead quiet at night. A blockquote must not collapse vertical rhythm, and must remain readable on narrow viewports. Repeated to check margin stacking. @@ -51,6 +63,14 @@ Standard warning pattern (as used in docs): > **Note:** This is a note/warning block — check that code legibility holds inside. +##### Heading 5 — Deep Nesting + +A fifth-level heading exercises the descending heading scale that docs-style outlines produce. Most themes stop styling at h4; this level must still render legibly from the browser default rather than collapsing into body text. + +###### Heading 6 — Floor of the Outline + +The sixth level is the deepest CommonMark heading. It must remain distinguishable from body copy and from h5, even where a theme deliberately mutes it. + ## Tables — GFM with Alignment and Escapes Table tests cover the GFM pipe table surface that Oliver ships (alignment colons, escaped pipes): @@ -95,13 +115,22 @@ Image (local asset path, must not be rewritten to `.html`): ![Alt text for image](assets/images/placeholder.png) -Second longform paragraph to re-test measure after tables/code: The haunted identity work (#251) defines dividers, lore blocks, and ornament as shared primitives rather than copy-pasted CSS. This paragraph must remain legible at 768px and 375px widths, with table and code fences not exploding the layout. The `theme-brutal` palette `mac` here should still pass the contrast audit planned in #258. +Second longform paragraph to re-test measure after tables/code: The haunted identity work (#251) defines dividers, lore blocks, and ornament as shared primitives rather than copy-pasted CSS. This paragraph must remain legible at 768px and 375px widths, with table and code fences not exploding the layout. The `theme-brutal` palette `mac` here should still pass the contrast audit (#258). Horizontal rule is open — the divider primitive will be visible below if templates use a shared divider style. Expect minimal drift between `theme-spooky-dark.html` and `theme-textpattern.html` after the skeleton standardization (#245). +--- + ## Frontmatter Contract Check -This fixture exercises the seven tokens from `oliver-contract.md` §template dialect (`title`, `description`, `author`, `date`, `palette`, `$assets_root$`, `$body$`) plus `$if$/$endif$` gating. Rendering through `theme-kawaii.html` (subset tokens) and `theme-brutal.html` (full set) should both succeed; unknown `$tokens$` must pass through verbatim. +This fixture exercises the template dialect from `oliver-contract.md`: the typed metadata tokens (`title`, `description`, `author`, `date`, `palette`), the v2 extended tokens (`version`, `subtitle`, `tags`, `asset_meta`), the raw `$assets_root$`/`$body$` pair, and `$if$/$endif$` gating. Rendering through `theme-kawaii.html` (subset tokens) and `theme-brutal.html` (full set) should both succeed; unknown `$tokens$$` must pass through verbatim. + +- `version` is adapter-injected from `bones/config/version` — footer stamps (`v$version$`) must read the current release, not frontmatter. +- `tags` joins as `fixture, theme-eval, template-contract-v2` — themes with a `$if(tags)$` footer slot show it; others omit cleanly. +- `asset_meta` serializes as `eval.md — 0.7.0 — Fixture Harness — Rotkeeper — All Rights Reserved` (name, version, author, project, license joined with ` — `, `tracked` never rendered). +- The v3 generic hook (#269): any extra scalar frontmatter key is interpolatable as `$field$`; `theme-necropolis.html`'s `page_type` is the reference consumer. +- Site navigation (#244) renders through the literal `` placeholder, not an escaped token — themes without the slot are unaffected. +- `$warnings$` is reserved with no adapter feed yet; it substitutes empty. - Keep CommonMark-safe: no task lists (`- [ ]`) that would render literally, no footnotes. - Raw HTML is not present here — XHTML fail-closed (`error.RawHtmlNotXmlWellFormed`) is not exercised, keeping HTML vs XHTML bytes identical for this page. From 1788019e2f035b37ac2b883ec2980657ba25e589 Mon Sep 17 00:00:00 2001 From: Beau Boorman Date: Fri, 28 Aug 2026 21:07:34 -0500 Subject: [PATCH 2/2] test(fixtures): gate minors on theme-eval fixture (#261) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adversarial-gate follow-up (MERGE-SHAPE verdict, three trivia minors): - Fix double-dollar typo: unknown-token example reads $tokens$, not $tokens$$ - Add page_type: tomb-not-found frontmatter plus a contract-check bullet, so rendering through theme-necropolis self-exercises the v3 generic hook (verified: data-page-type="tomb-not-found" on body; output/404.html keeps its own literal 404, so the scene CSS stays owned by 404.md) - Bump asset_meta.version to 0.7.0-fixture so footer provenance is visible by default (page stamp distinguishes from the engine's v$version$ 0.7.0) Commit-body phrasing note (gate nit): the fixture body contains no raw HTML by construction — HTML-profile output keeps the page's bytes free of author-authored markup; under render_profile xhtml the page is xmllint- clean, so no fail-closed rejection applies. (Ammended wording from the first commit's "no raw HTML present" line.) Re-verified through the pinned binary (commit 3f05bac...): render via theme-brutal (ASSET shows 0.7.0-fixture, engine stamp v0.7.0) and via theme-necropolis (v3 hook live on body). --- bones/scripts/tests/fixtures/theme-eval/eval.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bones/scripts/tests/fixtures/theme-eval/eval.md b/bones/scripts/tests/fixtures/theme-eval/eval.md index fa9e6549..5f2a842b 100644 --- a/bones/scripts/tests/fixtures/theme-eval/eval.md +++ b/bones/scripts/tests/fixtures/theme-eval/eval.md @@ -10,9 +10,10 @@ tags: - fixture - theme-eval - template-contract-v2 +page_type: "tomb-not-found" asset_meta: name: "eval.md" - version: "0.7.0" + version: "0.7.0-fixture" author: "Fixture Harness" project: "Rotkeeper" tracked: true @@ -123,12 +124,12 @@ Horizontal rule is open — the divider primitive will be visible below if templ ## Frontmatter Contract Check -This fixture exercises the template dialect from `oliver-contract.md`: the typed metadata tokens (`title`, `description`, `author`, `date`, `palette`), the v2 extended tokens (`version`, `subtitle`, `tags`, `asset_meta`), the raw `$assets_root$`/`$body$` pair, and `$if$/$endif$` gating. Rendering through `theme-kawaii.html` (subset tokens) and `theme-brutal.html` (full set) should both succeed; unknown `$tokens$$` must pass through verbatim. +This fixture exercises the template dialect from `oliver-contract.md`: the typed metadata tokens (`title`, `description`, `author`, `date`, `palette`), the v2 extended tokens (`version`, `subtitle`, `tags`, `asset_meta`), the raw `$assets_root$`/`$body$` pair, and `$if$/$endif$` gating. Rendering through `theme-kawaii.html` (subset tokens) and `theme-brutal.html` (full set) should both succeed; unknown `$tokens$` must pass through verbatim. - `version` is adapter-injected from `bones/config/version` — footer stamps (`v$version$`) must read the current release, not frontmatter. - `tags` joins as `fixture, theme-eval, template-contract-v2` — themes with a `$if(tags)$` footer slot show it; others omit cleanly. -- `asset_meta` serializes as `eval.md — 0.7.0 — Fixture Harness — Rotkeeper — All Rights Reserved` (name, version, author, project, license joined with ` — `, `tracked` never rendered). -- The v3 generic hook (#269): any extra scalar frontmatter key is interpolatable as `$field$`; `theme-necropolis.html`'s `page_type` is the reference consumer. +- `asset_meta` serializes as `eval.md — 0.7.0-fixture — Fixture Harness — Rotkeeper — All Rights Reserved` (name, version, author, project, license joined with ` — `, `tracked` never rendered). The `-fixture` suffix distinguishes page provenance from the engine's `v$version$` stamp by default. +- The v3 generic hook (#269): any extra scalar frontmatter key is interpolatable as `$field$`. This fixture carries `page_type: tomb-not-found`, so rendering through `theme-necropolis.html` self-exercises the hook — expect `data-page-type="tomb-not-found"` on `` (the 404 scene CSS still keys on the literal `404`, which stays owned by `home/content/404.md`). - Site navigation (#244) renders through the literal `` placeholder, not an escaped token — themes without the slot are unaffected. - `$warnings$` is reserved with no adapter feed yet; it substitutes empty.