ci(docs-sync): forward-port the tutorials into cosmos/docs latest/ - #18
Conversation
The example tutorials tell the reader to clone this repo and check out main, so they document whatever main is now rather than a released version. A frozen copy in cosmos/docs latest/ therefore describes code the reader is not running. Nothing carried the sync into latest/, and it sat two syncs behind for months. The script and the reasoning live in cosmos/docs; only the call is here. The step skips itself when the script is absent, so this works whether it merges before or after the cosmos/docs side. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Greptile SummaryThe PR extends the documentation synchronization workflow so the transformed tutorials are also copied from the
Confidence Score: 4/5The workflow change appears functionally safe, but the explicit repository changelog requirement must be satisfied before merging. No behavioral failure was established in the synchronization flow; the only accepted issue is the omitted changelog entry required for every repository change. Files Needing Attention: .github/workflows/docs-sync.yml and CHANGELOG.md Important Files Changed
|
| - name: Set up Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' |
There was a problem hiding this comment.
This workflow change does not update CHANGELOG.md. The repository requires every change to add an entry under ## [Unreleased] describing what changed and why. This requirement must be satisfied before merging.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
The sync writes the tutorials into
cosmos/docssdk/next/tutorials/example/and nothing carries them intosdk/latest/.latest/is the default view for readers, and it sat two syncs behind for months: it described localnet as running several validators whenscripts/localnet/init.shgentxesnode0only, and described acode: 0broadcast response as the chain having executed the transaction.These pages are the one exception to
cosmos/docs' version freeze. They instructgit clone https://github.com/cosmos/exampleandgit checkout main, so they document whatevermainis now. Freezing a copy protects nothing; it leaveslatest/describing code the reader is not running.Changes
cosmos-docs/scripts/sync-next-to-latest.jsover the tutorials, which copiesnext/intolatest/and rewrites/sdk/next/links to/sdk/latest/sdk/latest/tutorials/example/alongsidenext/, so one PR carries both copies and gets one reviewThe script and the reasoning live in
cosmos/docs, so only the call is here.Review focus
The step skips itself when
scripts/sync-next-to-latest.jsis absent fromcosmos/docsmain, so merge order does not matter. The workflow checks outcosmos/docswith noref:, so it getsmain, and the script lands there with cosmos/docs#345. Until then this step logs a warning and exits 0.The loop guard is unaffected: the commit still carries
[docs-sync], which is whatcosmos/docs' outgoing workflow skips on.Verification
Rehearsed locally against fresh clones of both repos, running the real steps in order: transform into
next/, then the forward-port. It produced 5 changed files underlatest/, no/sdk/next/links left inlatest/, no/sdk/latest/links innext/, and nonoindexleaking fromnext/'s front matter intolatest/. The skip branch was tested separately and exits 0.🤖 Generated with Claude Code