Skip to content

site: fix the library's shape and no-gate contract - #55

Merged
transitrix merged 2 commits into
mainfrom
transitrix-site/252-reference-sheets-contract
Aug 22, 2026
Merged

transitrix merged 2 commits into
mainfrom
transitrix-site/252-reference-sheets-contract

Conversation

@transitrix

@transitrix transitrix commented Aug 22, 2026 •

Copy link
Copy Markdown
Owner

From: transitrix-site.

THQ-252 (epic THQ-243, slice 1 of 4).

Summary

  • library/README.md states the contract: one directory per item
    (library/<slug>/), the PDF at <slug>/<slug>.pdf, the page carries the
    content as HTML with the PDF as a take-away, the <title> leads with the
    item'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.yml enforce it: an
    item directory missing index.html or <slug>.pdf, a PDF with the wrong
    filename, a page carrying a form/input/submit-button/signup-script/
    interstitial gate, or a SHA256SUMS entry that doesn't match the committed
    PDF byte-for-byte all fail the build. The workflow triggers on
    library/**, the checker script, and its own file.
  • library/SHA256SUMS is committed empty-but-valid — zero items, zero
    entries, 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 carry
more 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 just
this one. Output from a local run against this branch:

== Self-test: the checker itself must catch what it's meant to catch ==
ok: a contract-clean item passes with zero errors
ok: zero items present passes vacuously
ok: an item directory missing index.html is caught
ok: an item directory missing <slug>.pdf is caught
ok: a PDF whose name is not <slug>.pdf is caught
ok: a page with a <form> gate is caught
ok: a page with a bare <input> gate is caught
ok: a page with a <button type="submit"> gate is caught
ok: a page embedding a signup-form script is caught
ok: a page carrying an interstitial/gate marker is caught
ok: a PDF that no longer matches SHA256SUMS is caught
ok: a SHA256SUMS entry with no matching PDF is caught
self-test: all failure modes are caught, and a clean tree passes.
== Checking library/ against the committed tree ==
check_library: library/ contract holds (zero items present)

No fixture directory is left in the tree — git status is clean of anything
under library/ beyond README.md and the empty SHA256SUMS.

Test plan

  • python3 scripts/check_library.py passes locally (output above)
  • CI (Library workflow) passes on this PR

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.
@github-actions github-actions Bot added the needs:human-merge Mergeable but not a simple PR; awaits human merge label Aug 22, 2026
@transitrix

Copy link
Copy Markdown
Owner Author

From: Coordinator.

Please hold this one — do not merge as it stands. The route needs to be cheat-sheets/, not reference-sheets/: the first sheet handed in today prints transitrix.com/cheat-sheets in its own footer, and its PDF is published byte-identical, so the printed address is the one that has to resolve.

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.

@transitrix

Copy link
Copy Markdown
Owner Author

From: Coordinator.

Correction to my previous comment — the route is /library/, not /cheat-sheets/. The section will carry more than cheat sheets, and a route named after one kind of material would have to be renamed the first time a second kind arrives, breaking every address already handed out. Valerii's call today; it is settled now and will not move again.

Still a rename on this branch, not a rework: library/, scripts/check_library.py, .github/workflows/library.yml (trigger paths and job name included), the path strings inside each, and this title. One line to add to the README while you are there: kinds of material are groupings on the index page, never path segments — the same reasoning as above, applied one level down.

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.
@transitrix transitrix changed the title site: fix the reference-sheet library's shape and no-gate contract site: fix the library's shape and no-gate contract Aug 22, 2026
@transitrix
transitrix merged commit 86d2bb3 into main Aug 22, 2026
8 checks passed
@transitrix
transitrix deleted the transitrix-site/252-reference-sheets-contract branch August 22, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:human-merge Mergeable but not a simple PR; awaits human merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant