Skip to content

docs: show the verification result on every example, and publish the totals - #559

Merged
godofecht merged 1 commit into
mainfrom
docs/show-example-status
Aug 18, 2026
Merged

godofecht merged 1 commit into
mainfrom
docs/show-example-status

Conversation

@godofecht

@godofecht godofecht commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

You asked for a way of showing that every example runs. It is now shown in two places, both generated from the same ledger the CI gate writes.

On every block

Each ```flow block in the wiki carries its result in the header above the code:

Badge Means
Compiles Parsed, type-checked strict, lowered to C, run through clang
Rejected on purpose Tagged expect-error; the page is about what the compiler refuses
Not compiled Tagged ignore= with a written reason, shown in the tooltip
Not compiling yet Known debt, recorded so it cannot grow

The lookup uses the same key as the ratchet — a hash of the block's own text — so the badge cannot drift from the ledger. Change the code and the key changes with it, so a stale green is not possible.

On its own page

project/example-status.md is generated by build_wiki.py from docs/generated/example-status.json:

Every ```flow block in the documentation is compiled in CI: parsed, type-checked
in strict mode, lowered to C and run through clang. 477 of 776 are proven, either
by compiling or by failing exactly as the page says they should.

| Result              | Blocks |
| Compiles            |    476 |
| Rejected on purpose |      1 |
| Not compiled        |     65 |
| Not compiling yet   |    234 |

It then lists every page that still has blocks which do not build, worst first. The gaps are as visible as the successes, which is the point — a status page reporting only good news would not be worth having.

What has no badge, and why

Blocks with no badge are the ones no ledger row matches, which means they were never tagged as Flow in the source. Highlight.js guesses a language for untagged blocks, so a handful render as Flow without being tracked. Leaving those unmarked is the honest option: no badge means no claim. Tagging them is real content work and belongs in its own change.

Two things it turned up

The badge made the code header wider than a narrow column and clipped the language label and copy button. The overflow audit caught it at 390px:

CLIPPED DIV.code-block 251>148 "flowNot compiling yetCopyfun"

The header now wraps, and the audit is clean again at all seven widths.

Also, GENERATED in check_doc_links.py is a set inside a frozenset(...) call, and my first edit put the new entry after the closing brace — a syntax error the link checker reported immediately.

Validation

  • Unit suite 1515 passed, 2 skipped
  • Overflow audit clean at 1600, 1440, 1180, 1000, 820, 600, 390
  • wiki_verify.py all checks pass; wiki_contrast.py 0 low-contrast elements
  • check_doc_examples.py --check-ledger, check_doc_coverage.py, wiki_nav.py, check_wiki_links.py, check_doc_links.py all clean
  • Badges verified against the ledger by script across five pages: 65 of 65 tracked blocks badged

…totals

The claim that the documentation compiles was only visible to whoever ran the
CI job. It is now visible to the reader, in two places.

Every ```flow block in the wiki carries its result in the header above the
code: Compiles, Rejected on purpose, Not compiled, or Not compiling yet, with
the written reason in the tooltip where there is one. The lookup uses the same
key as the ratchet, a hash of the block's own text, so the badge cannot drift
from the ledger: change the code and the key changes with it.

A generated page at project/example-status.md carries the totals, what each
result means, how the ratchet is enforced, and every page that still has
blocks that do not build. The gaps are as visible as the successes, which is
the point; a status page that only reported good news would not be worth
having.

Blocks with no badge are the ones no ledger row matches, which means they were
never tagged as Flow in the source. Highlight.js guesses a language for
untagged blocks, so a handful render as Flow without being tracked. Leaving
them unmarked is honest: no badge means no claim.

Two things this turned up. The badge made the code header wider than a narrow
column, clipping the language label and the copy button, so the header now
wraps. And the GENERATED allowlist in check_doc_links.py is a set inside a
frozenset call, which took a second attempt to edit correctly.

Overflow audit clean at seven widths, wiki checks pass, contrast 0,
unit 1515.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@godofecht
godofecht merged commit a7d2730 into main Aug 18, 2026
21 checks passed
@godofecht
godofecht deleted the docs/show-example-status branch August 18, 2026 22:28
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