Skip to content

Link the docs at the version's tag in published notes and READMEs - #158

Merged
CaffeinatedCoder merged 2 commits into
mainfrom
docs/151-frozen-doc-links
Oct 20, 2026
Merged

CaffeinatedCoder merged 2 commits into
mainfrom
docs/151-frozen-doc-links

Conversation

@CaffeinatedCoder

Copy link
Copy Markdown
Owner

Closes #151

Problem

The 5.5.0 release notes (each package changelog's section, set at pack by #139), the packed READMEs that nuget.org shows as the package page, and the GitHub release notes all link the docs at blob/main. A published package can't change. After the v5.5.0 tag, main becomes the SchemaKit line and reshapes docs/, so every 5.5.0 package page and release-notes link would 404 or show SchemaKit's documentation.

Change

Decision: rewrite at pack time to the version's tag, for the notes and the READMEs alike. Don't point the READMEs at release/5.x.

  • One rule for every artifact: a package links the docs as they were at the tag it was built from. That tag is the one the notes' footer already links.
  • The source keeps blob/main, which DocumentationLinkTests resolves against the checkout. On the tagged commit, the checkout is the tag's tree, so that test is what proves the frozen links resolve.
  • Why not release/5.x: it doesn't exist until minutes after the tag. It's mutable, so a later 5.x docs change would rewrite what a 5.5.0 page links. And the README would follow a different rule than the release notes.
  • What it costs: a pack of an untagged version links a tag that doesn't exist yet. That covers the PR pack job, the smoke test and a local pack. Nothing reads those links, and the release workflow builds from the tag.

Files:

  • src/Directory.Build.targets:
    • _ComputeFrozenLinks turns $(RepositoryUrl)/blob/main/ and /tree/main/ into /blob/v$(PackageVersion)/ and /tree/v$(PackageVersion)/.
    • SetPackageReleaseNotesFromChangelog applies it to the notes.
    • The new FreezePackageReadmeLinks writes a rewritten copy of the README under obj/ and swaps it into NuGet's file list. If no packed file is the README (for example, NuGet renames its item), the pack fails.
  • .github/workflows/release.yml: the notes extraction does the same literal replacement in bash.
    • The replacement is left unquoted on purpose: bash 3.2 keeps quotes in it, bash 5 strips them.
  • Changelogs (root and the three packages): a Packaging: line under ### Changed in 5.5.0.
  • CLAUDE.md and CONTRIBUTING.md: say what the pack and the release job rewrite.

Tests

  • PackagingConventionTests:
    • The seeded changelog now holds blob/main and tree/main links. It also holds links that must stay as written: another repository whose name shares the prefix, and another branch.
    • The real-pack test now also compares each packed README with its source README rewritten to the tag.
    • The expected form comes from the test's own string replacement, not from the target's regex.
  • ReleaseWiringConventionTests.Github_release_notes_link_the_docs_at_the_tag runs the release step's own lines with bash, from the awk extraction to the empty-notes check, against a seeded changelog.

Each guard was proven by breaking the mechanism, then restoring:

Break Fails
Drop the notes rewrite in the targets Release_notes_render_…, Packed_release_notes_… ("packed release notes are not the 5.5.0 section")
Unhook FreezePackageReadmeLinks from GenerateNuspec Packed_release_notes_… ("packed README is not its README.md with the docs linked at v5.5.0")
Read a renamed NuGet item instead of _PackageFiles Pack fails: "expected one packed file named README.md, found 0"
Drop the rewrite in release.yml Github_release_notes_…
Quote the bash replacement Github_release_notes_… (bash 3.2 keeps the quotes)

The unit suite passes after rebasing on main (584 tests).

🤖 Generated with Claude Code

@CaffeinatedCoder CaffeinatedCoder added this to the 5.5.0 milestone Oct 20, 2026
@CaffeinatedCoder CaffeinatedCoder added documentation Improvements or additions to documentation package/core Affects EFCore.ComplexIndexes package/postgresql Affects EFCore.ComplexIndexes.PostgreSQL package/sqlserver Affects EFCore.ComplexIndexes.SqlServer area/release Versioning, changelogs, release wiring labels Oct 20, 2026
The release notes, the packed READMEs and the GitHub release linked the
docs at blob/main. A published package cannot change, and after the
v5.5.0 tag main becomes the SchemaKit line and reshapes docs/.

The pack now rewrites links into this repository at blob/main (and
tree/main) to the version's tag, in the release notes and in a copy of
the README packed in place of the source; release.yml does the same to
the GitHub release's notes. The source keeps blob/main, which
DocumentationLinkTests resolves against the checkout, so on the tagged
commit it proves the frozen links resolve.

Closes #151

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Versioning, changelogs, release wiring documentation Improvements or additions to documentation package/core Affects EFCore.ComplexIndexes package/postgresql Affects EFCore.ComplexIndexes.PostgreSQL package/sqlserver Affects EFCore.ComplexIndexes.SqlServer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release notes and packed READMEs link docs at blob/main, which becomes SchemaKit after the tag

1 participant