Surface the playground, install from PyPI, give the page a social card - #48
Merged
Conversation
Three discoverability defects, all of them the same shape: the thing a visitor needs is real, works, and is not where they will look for it. 1. The in-browser playground first appeared at line 42 of a 646-line README. It is the strongest thing this repository has to offer someone who has not decided to install anything yet -- a validator that runs on their own machine, on a payload they have not published -- and it was below eight paragraphs of prose. It is now in the lede, and the fuller explanation stays where it was. 2. The documented install was `pip install .`, which requires a clone and is not how anyone installs this. `ctdl-validate` has been on PyPI since 2026-08-13. The user-facing command is now `pip install ctdl-validate`; the working-tree install is kept below it, named as what it is and pointed at CONTRIBUTING.md. 3. The head declared og:title, og:description and twitter:card=summary and no image, so every share of the playground rendered as text. It now carries a 1200x630 card in the page's own dark palette, served from the same origin as the page, and the card claims nothing the head does not already say: no rule count, no conformance level, nothing about Credential Engine. The card is gated three ways rather than trusted. pages.yml copies it into the artifact and fails if the head names a file the artifact does not carry; web/a11y/audit.mjs reads the tags out of a real browser; and tests/test_playground_catalogue.py checks -- inside `make verify`, with no runner needed -- that the address, the dimensions read out of the PNG's own IHDR, and the alt text agree with the file on disk. A preview that breaks silently is exactly the defect this repository exists to catch. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pvm6FCdDXwtzA3juGxz6ba
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three discoverability defects. All the same shape: the thing a visitor needs is real, works, and is not where they will look for it.
1. The playground is now in the lede
chelseakr.github.io/ctdl-validate runs the validator in the browser via WebAssembly. That is the strongest thing this repository has to offer someone who has not decided to install anything yet — a validator that runs on their own machine, on a payload they have not published — and it first appeared at line 42 of a 646-line README, below eight paragraphs of prose.
It is now in the first fifteen lines, one sentence, with the reason it matters (the payload stays in the tab). The fuller explanation stays where it was.
2. The documented install is the published package
The README said
pip install ., which requires a clone and is not how anyone installs this.ctdl-validatehas been on PyPI since 2026-08-13; verified live before changing it.The user-facing command is now
pip install ctdl-validate. The working-tree install is kept directly below it, named as what it is (what you want whenmainis ahead of the last tag) and pointed atCONTRIBUTING.md.3. The playground has a card
The head declared
og:title,og:descriptionandtwitter:card=summary, and no image — so every share of the playground rendered as a line of text. It now carries a 1200×630 card in the page's own dark palette (#111827ground, the four severity colours as a rule), served from the same origin as the page.The card says the title and the description already in the head and nothing more: no rule count, no conformance level, nothing about Credential Engine.
web/a11y/audit.mjsalready fails the build on any of those in the description, and it now holds the card to the same line.twitter:cardmoves fromsummarytosummary_large_image, which is what 1200×630 is for; declaringsummarycrops it to a square thumbnail.The card is gated, not trusted
An
og:imagenaming a file nothing publishes is a blank rectangle everywhere the page is shared, and nothing about the page itself looks wrong — which is the defect class this repository exists to catch. So it is checked three ways:.github/workflows/pages.ymlcopiessocial-card.pnginto the Pages artifact and fails if the head names a file the artifact does not carry.web/a11y/audit.mjsreadsog:image,twitter:image,og:image:altand the declared dimensions out of a real browser, alongside the head checks already there.tests/test_playground_catalogue.pychecks, insidemake verifyand with no runner needed, that the address, the dimensions — read out of the PNG's own IHDR chunk, so no image library is added — and the alt text agree with the file on disk.Verification
make verifypasses: 354 tests (351 before, +3 new), coverage 95.59%,pip-auditclean. Baseline onmainwas green before these edits, so nothing here is inherited.Both URLs were confirmed 200 and the PyPI package confirmed live before any edit.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Pvm6FCdDXwtzA3juGxz6ba