From 120a0d8218038076ce657fa426c988623038ca2e Mon Sep 17 00:00:00 2001 From: "Joshua D. Drake" Date: Thu, 17 Sep 2026 13:50:54 -0600 Subject: [PATCH] docs: the version badge said 1.0-alpha3, and nothing could see it `badges/version.svg` is the first thing on the GitHub page, so it is the version most readers see. It sat at `1.0-alpha3` for the whole alpha4 cycle and through the tag. Nothing was watching it. `docs_style.sh` compares prose that says "recorded in `VERSION`", and the audit added a second rule for "the latest published pre-release is". A badge is neither: it is an image, and README repeats it in the image's alt text. Three places a version is written, two of them checked. THE SVG CARRIES THE STRING THREE TIMES and they drift apart: aria-label="version: ..." the accessible name, invisible in a browser version: ... the hover text ... the pixels A fix that updates the rendered text looks correct to anyone who opens the page and leaves the accessible name stale. All three are compared now, and so is README's alt text, which drifts separately from the image it describes. The rule is stated as "names no version other than VERSION's" rather than "names VERSION's version", because the second passes on a badge that names both. Proved by mutation, one revert at a time: rendered text only FAIL got [1.0-alpha3] aria-label only FAIL got [1.0-alpha3] <- invisible in a browser README alt only FAIL got [1.0-alpha3] want [1.0-alpha4] The other three badges were checked and are accurate: status is pre-release, license is MIT, and PostgreSQL 15-18 (+19 beta) matches the majors run_all_versions.sh actually runs. `1.0-alpha3` and `1.0-alpha4` are the same length, so the SVG's width and textLength are still correct. A version whose name is longer will need those recomputed, and the check will not catch that; it compares strings, not geometry. docs_style.sh 29 checks, PASSED Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01NhwXKAgSmYDUjteWkfajHK --- README.md | 2 +- badges/version.svg | 2 +- test/docs_style.sh | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6003867d..1fc60ed7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ PostgreSQL 15-18 (+19 beta) License: MIT -Version 1.0-alpha3 +Version 1.0-alpha4 Status: pre-release

Read the documentation at commandprompt.github.io/pgcolumnar

diff --git a/badges/version.svg b/badges/version.svg index eee15c89..c2655b4e 100644 --- a/badges/version.svg +++ b/badges/version.svg @@ -1 +1 @@ -version: 1.0-alpha3version1.0-alpha3 \ No newline at end of file +version: 1.0-alpha4version1.0-alpha4 \ No newline at end of file diff --git a/test/docs_style.sh b/test/docs_style.sh index 4902a2fe..56dc1919 100755 --- a/test/docs_style.sh +++ b/test/docs_style.sh @@ -236,6 +236,34 @@ done check "every document citing VERSION quotes the version VERSION holds" \ "$(printf '%s' "$_stale" | sed 's/^ //')" "" +# ---- and the VERSION BADGE, which is a third place the version is written ---- +# +# `badges/version.svg` renders the version as an image, and README.md repeats it +# in that image's alt text. Neither is prose, so neither the VERSION check above +# nor the published-release check below can see them, and the badge sat at +# `1.0-alpha3` for the whole alpha4 cycle. It is the first thing on the GitHub +# page, so it is the version most readers see and the last one anything checked. +# +# THE SVG CARRIES THE STRING THREE TIMES -- aria-label, title, and the rendered +# text node -- and a fix that updates one of them looks right in a browser while +# leaving the accessible name stale. All three are compared. +_badge="$SRCDIR/badges/version.svg" +check "premise: the version badge is present" \ + "$([ -f "$_badge" ] && echo yes || echo no)" "yes" + +_badgehits="$(grep -c -- "$_ver" "$_badge" 2>/dev/null || echo 0)" +_badgeold="$(grep -oE '1\.0-[a-z]+[0-9]*' "$_badge" 2>/dev/null | sort -u | grep -vxF "$_ver" | tr '\n' ' ' | sed 's/ $//')" +check "the version badge names no version other than VERSION's" \ + "$_badgeold" "" +check "premise: and it names VERSION's version at all" \ + "$([ "${_badgehits:-0}" -ge 1 ] && echo yes || echo no)" "yes" + +# README's alt text is the badge's accessible name and drifts separately from the +# image it describes. +check "README's badge alt text names the version VERSION holds" \ + "$(grep -oE 'alt="Version [^"]*"' "$SRCDIR/README.md" | sed 's/.*alt="Version //; s/"$//')" \ + "$_ver" + # ---- the OTHER version claim, which the check above cannot see -------------- # # A second version sentence sits beside the first: "the latest published