Skip to content

docs: backfill the 2.1.0 docs version and guard release snapshots - #287

Merged
nicklambourne merged 2 commits into
masterfrom
docs/backfill-2.1.0-and-guard
Aug 17, 2026
Merged

docs: backfill the 2.1.0 docs version and guard release snapshots#287
nicklambourne merged 2 commits into
masterfrom
docs/backfill-2.1.0-and-guard

Conversation

@nicklambourne

Copy link
Copy Markdown
Owner

Why

The docs site serves the current package version live (lastVersion: "current",
labelled from python/pyproject.toml) and lists every earlier release as a
frozen snapshot in the version dropdown. Cutting those snapshots is a manual
docusaurus docs:version step — and nothing in the release procedure or CI ever
performed it. So when 2.1.0 was released, no snapshot was frozen; 2.1.1
then shipped as the live current version, and 2.1.0 silently disappeared from the
dropdown (it was never in docs/versions.json, and it is newer than the legacy
2.0.0 suffix the legacy porter manages).

Part 1 — Backfill the 2.1.0 snapshot

  • Froze 2.1.0 from the current docs tree (its content is unchanged since the
    2.1.0 release: git diff --quiet python/v2.1.0 HEAD -- docs/docs is empty)
    using the standard docusaurus docs:version 2.1.0 flow.
  • Generated the Python and TypeScript API reference first (pnpm generate
    plus the typedoc build step), so the snapshot carries a real bilingual 2.1.x
    reference — the generated pages are gitignored under docs/docs/ but are
    committed inside versioned_docs/version-2.1.0/.
  • docs/versions.json now lists 2.1.0 ahead of the frozen legacy suffix. This
    is exactly the shape the legacy generator preserves: write_registered_versions
    keeps non-legacy versions at the front (preserved + registered), so the
    snapshot is stable under regeneration.

No legacy version, the legacy manifest, or any existing versioned_docs /
versioned_sidebars entry was touched.

Part 2 — Close the process gap

  • RELEASING.md — added a first step to the coordinated release procedure:
    freeze the outgoing docs version with docusaurus docs:version <outgoing>
    before bumping, and explained the lastVersion: current model (the latest
    release is live; each release freezes the previous version).
  • docs/scripts/check_release_snapshots.mjs (new) + check:release-snapshots
    script, wired into .github/workflows/docs.yml — enumerates the released
    python/v* tags and fails if any, other than the current package version, is
    missing from docs/versions.json or the legacy manifest. Dependency-light
    Node, matching the neighbouring check:*.mjs scripts; the workflow already
    checks out with fetch-depth: 0 so the tags are present.

With 2.1.0 backfilled the guard passes (2.1.1 is the current live version, so
exempt); it fails loudly for any future release that forgets its snapshot.

Verification

  • pnpm --filter @slackblocks/docs build succeeds (Python + TS reference,
    Docusaurus build, TS API rendering, legacy fixture, legacy contract).
  • Generation-clean guard is clean: after a fresh generate + build,
    git diff --exit-code -- docs/legacy/manifest.json docs/versioned_docs docs/versioned_sidebars docs/static/img/legacy returns 0.
  • check:release-snapshots passes now, and fails with exit 1 (naming 2.1.0)
    when the version is removed from versions.json.
  • The whole diff only adds the version-2.1.0 snapshot, its sidebar, the
    versions.json line, and the Part 2 files.

🤖 Generated with Claude Code

The docs site serves the current package version live (lastVersion:
current) and offers frozen snapshots of prior releases in the version
dropdown. 2.1.0 was released without cutting a docs snapshot, so it never
appeared in the dropdown; 2.1.1 then shipped as the live current version,
leaving a gap.

Freeze 2.1.0 from the current docs tree (its content is unchanged since the
2.1.0 release) with the standard docusaurus docs:version flow, including the
generated Python and TypeScript API reference so the snapshot matches a real
2.1.x build. versions.json now lists 2.1.0 ahead of the legacy 2.0.0 suffix;
the legacy generator preserves non-legacy versions at the front.
2.1.0 shipped without a frozen docs version because the release procedure
never cut one, and nothing caught the gap. Close it from both ends.

Add check:release-snapshots, wired into the docs workflow: it enumerates the
released python/v* tags and fails if any (other than the live current package
version) is absent from docs/versions.json and the legacy manifest. Document
the missing step in RELEASING.md so each release freezes the outgoing docs
version with docusaurus docs:version before the new version takes over as
current.
@nicklambourne
nicklambourne force-pushed the docs/backfill-2.1.0-and-guard branch from 620084a to 81510f3 Compare August 17, 2026 13:19
@nicklambourne
nicklambourne merged commit b881990 into master Aug 17, 2026
22 checks passed
@nicklambourne
nicklambourne deleted the docs/backfill-2.1.0-and-guard branch August 17, 2026 13: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.

1 participant