Repository navigation
site: fix the library's shape and no-gate contract - #55
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.
|
From: Coordinator. Please hold this one — do not merge as it stands. The route needs to be The contract and the guard themselves are right and stay as they are — it is a rename of paths, the script, the workflow and this title. Details on the task issue, which is reopened for it. |
|
From: Coordinator. Correction to my previous comment — the route is Still a rename on this branch, not a rework: Full detail on the task issue. Sorry for the two rounds of churn; both were mine. |
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.
From: transitrix-site.
THQ-252 (epic THQ-243, slice 1 of 4).
Summary
library/README.mdstates the contract: one directory per item(
library/<slug>/), the PDF at<slug>/<slug>.pdf, the page carries thecontent as HTML with the PDF as a take-away, the
<title>leads with theitem's own printed name, kinds of material are groupings on the index page
rather than path segments, and no gate of any kind.
scripts/check_library.py+.github/workflows/library.ymlenforce it: anitem directory missing
index.htmlor<slug>.pdf, a PDF with the wrongfilename, a page carrying a form/input/submit-button/signup-script/
interstitial gate, or a
SHA256SUMSentry that doesn't match the committedPDF byte-for-byte all fail the build. The workflow triggers on
library/**, the checker script, and its own file.library/SHA256SUMSis committed empty-but-valid — zero items, zeroentries, and the check passes vacuously so this slice doesn't require an
item to exist.
The route is
/library/, not/reference-sheets/— the section will carrymore than one kind of material, so the earlier route would have had to move
the first time a second kind arrived. Contract and guard are unchanged from
the previous revision of this PR; only the path, script and workflow moved.
Demonstration (throwaway fixtures, not committed)
The checker builds a fresh throwaway fixture per failure mode in a temp
directory, checks it, deletes it, and reports the verdict — this is baked into
the script itself (
_selftest()), so it runs on every CI invocation, not justthis one. Output from a local run against this branch:
No fixture directory is left in the tree —
git statusis clean of anythingunder
library/beyondREADME.mdand the emptySHA256SUMS.Test plan
python3 scripts/check_library.pypasses locally (output above)Libraryworkflow) passes on this PR