8000 fix(release): preserve Markdown punctuation when stamping Maven versions by adityamukho · Pull Request #48 · project-minigraf/minigraf-java · GitHub
[go: up one dir, main page]

Skip to content

fix(release): preserve Markdown punctuation when stamping Maven versions - #48

Merged
adityamukho merged 4 commits into
mainfrom
fix/47-preserve-markdown-version-delimiters
Dec 5, 2026
Merged

adityamukho merged 4 commits into
mainfrom
fix/47-preserve-markdown-version-delimiters

Conversation

@adityamukho
@adityamukho adityamukho commented Dec 4, 2026 •
Copy link
Copy Markdown
Contributor

Problem

Release preparation consumes punctuation after inline Maven coordinates, including the closing Markdown backtick and comma observed in the #46 rehearsal. Review also identified that prose could satisfy the installation-coordinate guard, and that stamping a stable release rewrote the fixed prerelease illustration.

Changes

  • Match the coordinate's complete version token so quotes, backticks, parentheses, sentence-ending periods and HTML closing tags survive replacement. Requested release versions remain validated by the existing release policy.
  • Require a complete, line-anchored Gradle implementation statement in each original README before stamping. The guard supports single- and double-quoted Kotlin/Groovy forms, checks matching delimiters, and accepts optional semicolons and trailing line comments. Prose, commented-out snippets, other dependencies and malformed statements cannot satisfy it. Maven XML coordinates remain required independently.
  • Reword the explanatory paragraph to use the fixed literal 3.0.0-alpha rather than a full Maven coordinate, so a stable release updates installation instructions while preserving the prerelease illustration.

Closes #47.

Validation

  • The original Markdown regression and subsequent punctuation expansion were reproduced before their fixes. The final expansion covers six source/target pairs, both README paths, quoting, Markdown, parentheses, HTML, stable/rc/prerelease/build identifiers and unchanged JNA.
  • The two remaining findings were reproduced before this commit: 14 missing/malformed installation cases across both README paths, plus the actual README illustration changing during stable stamping.
  • All 54 release-adapter tests pass locally. The accepted Gradle forms are tested independently, so one valid form cannot mask another.
  • The actual README test masks only MiniGraf installation version values and compares all remaining text, independently verifying that Gradle and Maven use 3.0.0. It has no prose-wording anchors and still fails against the older README that reproduced the illustrative-version rewrite. The README/consumer quick-start synchronization check passes.
  • Missing Gradle and Maven XML coordinates produce distinct, file-specific diagnostics; both paths were checked with invalid input preserved.
  • Current v2.x READMEs at 047ad05a01ab0b95544bc1953c2abf9c1d0fd1f2 pass the stricter guard 8000 and stamp from 2.0.12 to 2.0.13 with all other text unchanged.
  • git diff --check passes. Independent review found no correctness issues.
  • On the current head c80966e, the hosted release-fixtures job passed all 32 shared release tests and 82 Java fixture tests, including the refactored real-README guard. README synchronization also passed. The remaining platform jobs in run 47370450997 are still running.

Review disposition

All five inline review findings are addressed:

  1. Punctuation hardening: complete version tokens are matched, including dotted prerelease/build identifiers ending in hyphens (9a2f2f6).

  2. Installation-coordinate counting: original-text validation now requires a genuine Gradle installation statement in each README (a3ca9cc).

  3. Fixed explanatory prose: the example remains explicitly prerelease and is verified against the actual README during stable stamping (a3ca9cc).

  4. Editorial coupling in the real-README test: compare all non-installation content without anchoring to specific sentences (c80966e).

  5. Maven diagnostic: a missing XML version reports missing minigraf-jvm Maven <version> (c80966e).

The PR changes the stamper, its regression tests and the root README.

Stop the version matcher at closing Markdown backticks so release
preparation preserves inline punctuation. Cover unchanged and changed
versions in both READMEs while preserving Gradle/XML forms and JNA.

Fixes #47.
Comment thread .github/java_release.py Resolved
Comment thread .github/java_release.py Resolved
Comment thread .github/test_java_release.py Resolved
Preserve adjacent quotes, parentheses, sentence periods and HTML while
consuming complete prerelease and build identifiers. Extend the whole-
document regression to six source/target pairs in both READMEs.

Addresses the punctuation-hardening review on #48 for #47.
Validate a complete Gradle installation statement in each original README
before stamping, so prose coordinates cannot hide a missing or malformed
snippet. Support quoted Kotlin and Groovy forms.

Keep the fixed prerelease illustration outside the Maven coordinate
matcher and verify it survives stable-version stamping. Cover the guard
in both README paths and retain JNA and punctuation checks.

Addresses the remaining review findings on #48.
Comment thread .github/test_java_release.py Resolved
Comment thread .github/java_release.py Resolved
Compare real READMEs with only installation version values masked, so
editorial wording can change while all other content remains protected.
Verify the requested Gradle and Maven versions independently.

Report a missing Maven <version> distinctly from a missing Gradle
installation coordinate. Address both latest inline notes on #48.
@adityamukho
adityamukho merged commit cd72e6d into main Dec 5, 2026
31 of 32 checks passed
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.

release: preserve inline Markdown delimiters when stamping Maven versions

1 participant

0