Skip to content

docs: restore the README shape CORELIB_PLAN §9 prescribes - #110

Merged
Andste82 merged 1 commit into
mainfrom
docs/91-readme-section-shape-and-ci-badge
Aug 9, 2026
Merged

Andste82 merged 1 commit into
mainfrom
docs/91-readme-section-shape-and-ci-badge

Conversation

@Andste82

@Andste82 Andste82 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Fixes #91.

CORELIB_PLAN §9 fixes the README section list and its order for the whole corelib family ("do not change the section ordering and do not invent new top-level sections") — that shared shape is what makes one port's README navigable to a reader who knows another. This README had drifted in three places.

Changes

  • §9.8 — ## Choosing between the two C++ corelibs was a top-level section after ## Benchmarks. §9.8 makes exactly this comparison the final subsection of Benchmarks when a language ships two corelibs for two use cases, so it is demoted to ###, and its ### Instruction counts (Callgrind) table to ####. GitHub anchors are unaffected by the level change, so every link into it still resolves.
  • §9 — ## Feature flags was an invented top-level section documenting one knob, SOFAB_STRICT_UTF8, which #### Strict UTF-8 validation under ## Usage already covers. Its content (only knob, no #ifdef wire-type gating, SOFAB_DISABLE_* is a harness-only name here) folds into that subsection.
  • §9.2 — the badge block carried Coverage and Docs only; §9.2 asks for CI, coverage and a Docs badge. The Build: x86_64 (GCC) badge now opens the block; the per-target table stays as the full matrix and says so.

Regression test

The shape is a property of the document, so nothing inside the library can notice it drifting. New test/test_readme_structure.sh, wired into CTest next to the existing document-level check test_ci_workflows, reads README.md and requires:

  1. §9.1 header block — logo, title, tagline, org link;
  2. §9.2 badge block — CI, coverage and Docs badges, in that order, before any prose;
  3. §9 top-level sections — exactly the prescribed list, in order, no extras;
  4. §9.4 — no API-documentation section at any heading level;
  5. §9.8 — the two-corelib comparison is a ### subsection sitting under ## Benchmarks.

Headings are read from a copy with fenced code blocks blanked, so a # comment in a shell snippet is not mistaken for a section. It exits 77 (CTest "skipped") in a tree with no README.

On the pre-fix README it reports exactly the four findings from the issue:

FAIL: §9 top-level sections differ from the prescribed list (no invented sections, no reordering)
      > ## Feature flags
      > ## Choosing between the two C++ corelibs
FAIL: §9.2 badge block carries no CI badge (it has: Coverage Docs)
FAIL: §9.2 badges out of order: expected CI, coverage, Docs — got coverage docs
FAIL: §9.8 the two-corelib comparison is a '##' heading; §9.8 makes it a '###' subsection of ## Benchmarks

Full suite green locally in both Debug and Release (5/5, the Build & test section is updated to describe the new suite).

§9 fixes the section list and its order for every corelib README — "do not
change the section ordering and do not invent new top-level sections" — because
that shared shape is what lets a reader who knows one port navigate any other.
This README had drifted from it in three places:

* `## Choosing between the two C++ corelibs` was a top-level section after
  `## Benchmarks`. §9.8 makes exactly this comparison the *final subsection* of
  Benchmarks when a language ships two corelibs for two use cases, so it is
  demoted to `###` (and its Callgrind table with it). Anchors are unchanged, so
  the links into it still resolve.
* `## Feature flags` was an invented section covering one knob,
  `SOFAB_STRICT_UTF8`, already documented under Usage. Its content folds into
  that subsection: the knob is the only one, and the header always compiles the
  full wire format.
* The §9.2 badge block carried Coverage and Docs only; §9.2 asks for CI,
  coverage and Docs. The x86_64 GCC build badge now opens the block, and the
  per-target table stays as the full matrix.

The shape is a property of the document, so no C++ test can see it drift — the
new `test_readme_structure` suite reads README.md and checks the §9.1 header
block, the §9.2 badge block and its order, the exact §9 top-level section list,
§9.4 (no API-documentation section) and the §9.8 placement of the two-corelib
comparison. It fails on the previous README with exactly these four findings,
skips when a tree carries no README, and runs under CTest beside the existing
document-level check, `test_ci_workflows`.

Closes #91
@Andste82
Andste82 merged commit 96e5a00 into main Aug 9, 2026
9 checks passed
@Andste82
Andste82 deleted the docs/91-readme-section-shape-and-ci-badge branch August 9, 2026 09:21
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.

9.2: README: two invented top-level sections, and the CI badge is missing from the §9.2 badge block

1 participant