Skip to content

Surface the playground, install from PyPI, give the page a social card - #48

Merged
ChelseaKR merged 1 commit into
mainfrom
devrel/discoverability
Sep 5, 2026
Merged

Surface the playground, install from PyPI, give the page a social card#48
ChelseaKR merged 1 commit into
mainfrom
devrel/discoverability

Conversation

@ChelseaKR

Copy link
Copy Markdown
Owner

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-validate has 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 when main is ahead of the last tag) and pointed at CONTRIBUTING.md.

3. The playground has a card

The head declared og:title, og:description and twitter: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 (#111827 ground, 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.mjs already fails the build on any of those in the description, and it now holds the card to the same line.

twitter:card moves from summary to summary_large_image, which is what 1200×630 is for; declaring summary crops it to a square thumbnail.

The card is gated, not trusted

An og:image naming 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.yml copies social-card.png into the Pages artifact and fails if the head names a file the artifact does not carry.
  • web/a11y/audit.mjs reads og:image, twitter:image, og:image:alt and the declared dimensions out of a real browser, alongside the head checks already there.
  • tests/test_playground_catalogue.py checks, inside make verify and 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 verify passes: 354 tests (351 before, +3 new), coverage 95.59%, pip-audit clean. Baseline on main was 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

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
@ChelseaKR
ChelseaKR merged commit 264de61 into main Sep 5, 2026
5 checks passed
@ChelseaKR
ChelseaKR deleted the devrel/discoverability branch September 5, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant