[AAASM-3752] 🐛 (aggregate): Restore per-module version switcher in docs hub#41
Conversation
The first aggregation cut built one flat default-channel page per module and dropped the version machinery each per-module switcher needs, so the switchers 404'd on docs.agent-assembly.com (they still worked on the standalone *.github.io sites). - core: build master HEAD into /core/latest/, copy docs/versions.json to /core/versions.json, and add the site-root redirect — the in-theme #aaasm-version-selector fetches /core/versions.json and navigates to /core/<channel>/. - python-sdk: reuse the published gh-pages mike tree verbatim (versions.json + per-version dirs + aliases), dereferencing alias symlinks (cp -RL) since Pages does not follow symlinks. Skips the now-unneeded source build. - go-sdk: run the repo's own build_all_versions.sh (PAGES_BASE=/go-sdk) so every channel in data/versions.toml lands under /go-sdk/<channel>/, then render the site-root redirect. - verify: assert the version manifests + latest/ dirs exist so a regression that drops a version tree fails the build instead of shipping a dead dropdown. node-sdk is unchanged (its dropdown ships baked-in from committed versioned_docs). Refs AAASM-3752
Update each entry's channel/base_url_strategy/build to describe the restored version machinery (core /core/latest/ + versions.json, python gh-pages reuse, go build_all_versions.sh channel tree). Refs AAASM-3752
Update the layout diagram, build/copy contract, base-URL strategy, verify gate, and the Versioning section (full python tree vs default-channel core/go, and why) for AAASM-3752. Refs AAASM-3752
🔎 Claude Code review — docs-hub version switcher (AAASM-3752)CI: ✅ Green. Scope vs AAASM-3752: ✅ Delivers Option A (full restore). python-sdk = full mike tree reused verbatim from Side-effects / regression: ✅ NONE — every change is additive/scoped to the three switcher fixes. Verified:
One intended behavior change (not a defect): core and go-sdk now serve under Readiness: ✅ Ready to approve & merge. Suggest filing a lightweight follow-up ticket for "mirror core/go archived tags into the hub" so the AGGREGATION.md follow-up isn't lost (non-blocking). — Claude Code (automated PR review, 2026-06-26) |
|



Description
Restore the per-module documentation version switcher in the aggregated docs
hub. The first aggregation cut (AAASM-3659) built one flat default-channel page
per module and dropped the version machinery each switcher needs, so the switchers
404'd on
docs.agent-assembly.comwhile still working on the standalone*.github.iosites. This makes the aggregator publish, under each/<module>/,the version manifest and the version/channel subpaths the switcher references.
Mechanism (per module):
gh-pagesmike tree verbatim (cp -RL, derefs alias symlinks)/core/latest/, copy committeddocs/versions.json→/core/versions.json, site-root redirectlatest) from the committed manifestbuild_all_versions.sh(PAGES_BASE=/go-sdk) →/go-sdk/<channel>/, site-root redirectlatest) from committedversions.tomlversioned_docs/)python is "full" because it keeps a persistent
gh-pagesbranch (reused for free);core/go publish via a deploy-time Pages artifact with no versioned branch, and their
committed manifests declare only the
latestchannel (moving channels + archivedtags are release-job-computed and live only on the deployed artifact). Mirroring
those archived tags into the hub is a documented follow-up. See AGGREGATION.md.
Before / after (what now publishes under each subpath)
/python-sdk/versions.json/go-sdk/latest//go-sdk/)/go-sdk/root redirect/core/versions.json/core/latest/+ root redirect/node-sdk/Type of Change
Related Issues
Closes AAASM-3752
Documentation Checklist
bash -n docs/scripts/aggregate.shpasses;modules.jsonvalid JSONVerification
Built the changed
build_*paths locally (mdbook 0.5.2, uv/mike via gh-pages,hugo 0.163 extended, go 1.26), served
public/overhttp://localhost, anddrove a headless Chromium to confirm each switcher populates with no 4xx
on any manifest:
#aaasm-version-selectorpopulated:latest (master) → /core/latest/. No 4xx.latest (master) → /go-sdk/latest/; page renders with assets under/go-sdk/latest/. No 4xx.Screenshots saved locally to
/tmp/fix-docshub/verification/{core,python,go}-switcher.png(not committed — binary build artifacts;
ghcannot attach images to a PR body).The only blocked requests in verification were Google Analytics beacons (expected, irrelevant).
🤖 Generated with Claude Code
https://claude.ai/code/session_01Cc1vBBiNxp9qLKQ5Gq85w8