Skip to content

build(release-script): documentation install snippets move with the release - #492

Merged
DemchaAV merged 1 commit into
developfrom
fix/docs-install-version-gate
Aug 3, 2026
Merged

build(release-script): documentation install snippets move with the release#492
DemchaAV merged 1 commit into
developfrom
fix/docs-install-version-gate

Conversation

@DemchaAV

@DemchaAV DemchaAV commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Why

The version guard covers the root README, the eight module READMEs and the showcase site, and stops there. docs/troubleshooting.md carries the two snippets a reader copies at the worst possible moment — when a session already refuses to start — and both had sat on 2.0.0 since the module install matrix landed in #306, handing out a render backend one minor behind the engine that reader was running. Nothing would have caught it at the next cut either: cut-release.ps1 rewrites a hand-maintained list of files, and that page was not on it.

What changed

  • docs/troubleshooting.md — the graph-compose-render-pdf and graph-compose-render-docx snippets read 2.1.0.
  • VersionConsistencyGuardTest.documentationInstallSnippetsMatchTheProjectVersion walks docs/ and checks every versioned GraphCompose coordinate against the same target set the README snippets use. Trees that pin an old version on purpose — migration/, roadmaps/, archive/, templates/v1-classic/, private/ — are excluded by path prefix, so a new migration guide is covered the day it is written rather than the day someone remembers to extend a list. A companion coordinate (graph-compose-fonts, graph-compose-emoji) is checked against its own pom, never the engine train's.
  • VersionConsistencyGuardTest.documentationPagesWithInstallSnippetsAreBumpedByTheReleaseScript closes the gap one step earlier: a page carrying such a snippet must appear in both of the release script's $docPage lists — the one that rewrites the version and the one that stages the file. Bumping a file the commit never stages leaves the tag carrying the old text.
  • cut-release.ps1 gains those two lists, and Update-ModuleReadmeInstallVersion stops leaning on "one file, one coordinate": its Maven and Gradle regexes now exclude -fonts / -emoji explicitly, so a future "font not found → add graph-compose-fonts:1.0.0" block on a docs page cannot be rewritten to the engine version mid-cut.

Verification

./mvnw -B -ntp clean verifyBUILD SUCCESS, exit 0.

VersionConsistencyGuardTest 13 → 15 tests. Both new tests were confirmed to fail for the right reason before being accepted:

  • reverting docs/troubleshooting.md:54 to 2.0.0docs/troubleshooting.md:53 graph-compose-render-pdf advertises 2.0.0, expected one of [2.1.0]
  • removing docs/troubleshooting.md from the staging list → docs/troubleshooting.md is bumped by cut-release.ps1, so the release commit must stage it

The companion-exclusion regexes were exercised against a sample carrying graph-compose-render-pdf, graph-compose, graph-compose-fonts and graph-compose-emoji: the two train coordinates bump, the two companions are left alone.

Lane: build/CI + docs. No production code, no public API.

…elease

The version guard covered the README, the module READMEs and the showcase
site, and stopped there. The troubleshooting page carries the two snippets a
reader copies at the worst possible moment — when a session already refuses
to start — and both had sat on 2.0.0 since the module install matrix landed
in #306, handing out a render backend one minor behind the engine that reader
was running.

The guard now walks docs/, skipping the trees that pin an old version on
purpose by path prefix rather than by a list someone has to remember to
extend. A second check closes the same gap one step earlier: a page carrying
such a snippet must be named in both of the release script's lists, the one
that rewrites the version and the one that stages the file. The bumper no
longer leans on a file naming a single coordinate either — it skips
graph-compose-fonts and graph-compose-emoji wherever they appear, since those
ship on their own release lines.

./mvnw -B -ntp clean verify — BUILD SUCCESS. VersionConsistencyGuardTest
13 -> 15; both new tests confirmed red against a deliberately stale version
and a deliberately missing staging entry.
@DemchaAV
DemchaAV merged commit cc45519 into develop Aug 3, 2026
14 checks passed
@DemchaAV
DemchaAV deleted the fix/docs-install-version-gate branch August 3, 2026 11: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