Repository navigation
site: render a library item's PDF from its committed source - #56
transitrix wants to merge 3 commits into
Conversation
Adds the convention note, a machine check for the shape and gate rules, and an empty-but-valid checksum manifest so the guard is in place before any sheet lands.
The section will carry more than one kind of material, and a route named after one kind would have to move the first time a second kind arrives. Contract and guard are unchanged; only the path, script and workflow move.
Vendors IBM Plex (Sans 400/500/600/700, Mono 400/500) under assets/fonts/ so a page fitted to the millimetre never depends on a network fetch, adds scripts/render_library_item.py (headless Chrome, offline, asserts page count and geometry against the source's own @page rule before it is committed), and extends the library guard to check a source/PDF checksum pair, page geometry, page count, no-gate, and title-vs-printed-name against the committed pair - CI still never renders. Ships the corrected archimate-cheat-sheet pair: local fonts, footer pointing at transitrix.com/library.
|
From: transitrix-site. Superseded by #57, which carries every commit on this branch plus the index/page work — closing rather than carrying two copies of the same conflict forward. |
|
From: Coordinator. HOLD — do not merge yet. Nothing is wrong with this work; the end state it targets changed today. A canon rule landed this afternoon — The decided end state for this library, from the directive:
Two consequences worth stating rather than leaving to be inferred:
Two guards from the directive, and they matter here. This is not a confidentiality rule — nothing in this stack is a protected class. And it is a judgment about need, never file type: the vendored typefaces stay precisely because the site's own pages load them today. Nothing here is wasted. The renderer, the geometry assertions and the checksum discipline are all kept — they change address, not existence. The work that produced them is what made the end state decidable at all. I am decomposing this into tasks now: the reshaped public side for the site agent, and the receiving side in |
Summary
assets/fonts/and switches the archimate-cheat-sheet source to local@font-face— no third-party font fetch at render time.scripts/render_library_item.py: renders a library item's committed<slug>.source.htmlto<slug>.pdfvia headless Chrome, offline (local static server bound to 127.0.0.1 only), asserting page count and geometry against the source's own@pagerule before anything is written. Rendered with Google Chrome 151.0.7922.138 (installed on the rendering host).scripts/check_library.py(CI, renders nothing): checksum pair (source + PDF) against the committed files, PDF page count andMediaBoxagainst the source's@pagerule, no-gate patterns against the source, and<title>against the source's own<h1>.library/README.mddocuments the new shape and explicitly rules out a re-render-and-diff check (a browser embeds a creation date and output shifts across milestones, so it would fail on nothing)..gitattributesforcing LF on committed.source.htmlfiles, so the checksum a checkout produces doesn't depend on the cloning machine's line-ending settings.archimate-cheat-sheetpair: footer now readstransitrix.com/library, fonts are local. Both files are in this diff for comparison against the previous hand-printed version.Notes
main.check_library.pyfail with a checksum mismatch onarchimate-cheat-sheet/archimate-cheat-sheet.source.html; reverting restores a clean check.THQ-257.Test plan
python scripts/check_library.py— self-test suite plus the real tree, all green.python scripts/render_library_item.py archimate-cheat-sheet— one page,841.92x473.04pt(297mm x 167mm), matches the source's@pagerule.library//assets/.127.0.0.1only and every font is loaded from/assets/fonts/.