Skip to content

docs: stop offering an examples-local type, and drop the counts that keep rotting - #482

Merged
DemchaAV merged 4 commits into
developfrom
docs/last-untrue-text
Aug 1, 2026
Merged

docs: stop offering an examples-local type, and drop the counts that keep rotting#482
DemchaAV merged 4 commits into
developfrom
docs/last-untrue-text

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Why

Three things in the reader's path said something the code does not.

The example catalogue's entry-point table introduced the cover letter as a BusinessTheme.modern() document. BusinessTheme is a record in com.demcha.examples.support.theme — it ships in none of the published artifacts, and its own package-info already says so. A reader who adds the dependency and reaches for it finds nothing to import, and finds that out only after the failed import.

The catalogue named a count of generated documents and a count of committed previews. Both sat well below the real inventory, having been reconciled by hand once already and drifted again since.

The banner caption named "the 2.0 module graph" while the image it captions renders 2.1, and stated a line count for the example it links.

What

The examples-local type leaves the entry points. The Start here row and the section intro say what the example demonstrates; the section states that its colours come from a helper local to this module and names BrandTheme as the shipping equivalent.

ExamplesLocalTypeGuardTest polices using the type, across the published documentation.

Where it looks: every published page — the READMEs and the docs tree — minus the pages whose subject is what a past release contained (docs/adr, docs/archive, docs/migration, docs/roadmaps, docs/templates/v1-classic) and the decision guide that names the removed surface beside its replacement on purpose. The same exemptions the canonical surface guard already uses, for the same reason.

What it rejects: a call, a constructor, a method reference, a member access — three unguarded ways to make the same offer is not a rule. A member named java is exempt, because that is a link to the type's own source rather than an API being suggested. The bare name stays legal in prose, since these pages have to name what they describe; in a table row it does not, because there a bare name is a claim about what that row's document is made of, which is how the defect was written.

Code blocks are scanned. A fenced snippet is the most copy-pasted thing on a page, so exempting fences wholesale would leave the rule policing only the form nobody copies. The single exemption is a fence introduced by a doc-example-ignore marker, which already carries a written reason — and a test asserts that path is still exercised, so it cannot quietly become dead code.

An unclosed fence fails per page. It exempts everything below it, and no aggregate can see one file going quiet.

The type set is read from the helper package rather than listed — five types today, and a list would have covered whichever one was noticed first.

Four counts are removed, not corrected. The CHANGELOG entry describing that had itself acquired five figures; those are out too.

Tests

qa gate: 688 tests, BUILD SUCCESS. Core guard job as CI runs it: 35 tests, BUILD SUCCESS.

Negative check Result
a tutorial fence offering the type fails — the fence is scanned
a nested page under docs/ using it fails — the scan is not README-only
new BusinessTheme(…) fails
BusinessTheme::modern fails
the call form in prose fails
the bare name in an entry-point table row fails
an unclosed fence fails, names the page
a link to the type's own source file passes — a link is not an offer
a doc-example-ignore fence quoting example source passes — and a test keeps that path alive

DemchaAV and others added 4 commits August 1, 2026 08:43
…keep rotting

The example catalogue introduced the cover letter as a `BusinessTheme.modern()`
document. That record lives in the examples module and ships in no artifact, so a
reader who adds the dependency and reaches for it finds nothing to import. The
rows and prose now describe what the examples demonstrate; the advanced section
that quotes the helper says it is examples-local and names `BrandTheme` as the
shipping equivalent.

ExamplesLocalTypeGuardTest bans the factory-call form on any README and leaves
the fence alone — a fence quotes an example's own source, and editing the type
out of a quotation would make it false.

Four counts are removed rather than corrected: the catalogue was "~53 PDFs" with
a "curated 39-PDF subset" where it generates 91 and commits 62, the banner
caption stated a line count for the example it links, and it named the module
graph by a version the image no longer shows. Each had been reconciled before.

The commit-message examples pointed at the 1.5 line while the pull-request
template requires a conventional subject and 26 of the last 30 commits are one.
…at misled

The replacement sentence was as untrue as the one it replaced: it said the
palette and fonts come from a record the example declares, and the example
imports the shared examples-module helper and calls it. The section now says
the colours come from a helper local to this module and names BrandTheme as
the shipping equivalent.

Three defects in the rule:

- it matched any dot after the type name, so a markdown link to the type's own
  source would have failed the build citing a call that was never written. It
  now matches a call.
- the bare name in a table row passed, which is the form the defect was
  actually written in. A row naming the type is now rejected too; elsewhere in
  prose the bare name stays legal, because these pages describe those examples.
- one of the package's five types was listed. The set is read from the source
  tree, so the next helper is covered without anyone remembering this file.

The guard-the-guard compared prose against a fixed floor that the fenced
content clears on its own — an inverted split would have passed it. It compares
the two halves instead.
…uotation

The rule read one README per module and skipped every fenced block, which left
the two forms most likely to mislead outside it: a nested page under docs/, and
a tutorial snippet — the thing a reader copies rather than reads.

- The scan covers the published documentation, historical records aside: pages
  under docs/adr, docs/archive, docs/migration, docs/roadmaps and the v1-classic
  templates exist to record what a past release contained, and the decision guide
  between the removed and layered surfaces names the old one beside its
  replacement on purpose.
- Code blocks are scanned. The one exemption is a fence introduced by a
  doc-example-ignore marker, which already carries a written reason and is how a
  page quotes an example's own source verbatim. A test asserts that path is still
  exercised, so the escape hatch cannot quietly become dead code.
- Construction, method references and member access join the call form. Three
  unguarded ways to make the same offer is not a rule.
- An unclosed fence is caught per page. It exempts everything below it, and the
  totals cannot see one file going quiet.

The entry describing the removed counts had itself acquired five of them, in a
bullet titled "the last hardcoded counts are gone"; every figure that can drift
before the release is out.
@DemchaAV
DemchaAV merged commit f6cb344 into develop Aug 1, 2026
10 checks passed
@DemchaAV
DemchaAV deleted the docs/last-untrue-text branch August 1, 2026 08:59
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