fix(docs): backport #22617 — label-based API version mapping (v4-next)#22622
Merged
critesjosh merged 4 commits intobackport-to-v4-next-stagingfrom Apr 17, 2026
Merged
Conversation
… aztec-nr api page (with conflicts) Mechanical cherry-pick of 0e1c474 from PR #22617. The original fix targets docs/developer_versioned_docs/version-v4.2.0/docs/aztec-nr/api.mdx, which does not exist on v4-next. Git's rename detection landed the diff on docs/developer_versioned_docs/version-v4.1.0-rc.2/docs/aztec-nr/api.mdx, producing conflict markers. Committed AS-IS for history; next commit reverts the wrong target and applies the fix to the right file on v4-next.
The mechanical cherry-pick in the previous commit landed conflict markers on version-v4.1.0-rc.2/docs/aztec-nr/api.mdx (a Testnet-labelled snapshot whose existing name-based logic correctly returns "testnet" for names containing "rc"). Revert that file to its pre-cherry-pick state — the v4.2.0 mainnet fix does not apply to the v4.1.0-rc.2 testnet snapshot. The equivalent change for v4-next is applied to docs-developers in the next commit.
…ec-nr api page Apply the equivalent of upstream fix 0e1c474 (PR #22617) to v4-next. On next, the fix targets the v4.2.0 versioned snapshot; on v4-next that snapshot does not exist yet, but docs-developers/docs/aztec-nr/api.mdx — the source that will seed the next versioned cut — still carries the stale name-based useApiVersion logic. Replacing it with the label-based mapping prevents the same regression recurring when v4.2.0 developer docs are cut from v4-next.
2 tasks
critesjosh
approved these changes
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #22617 — fix(docs): restore Aztec.nr API reference links on v4.2.0 — to
v4-nextviabackport-to-v4-next-staging.Why the automatic cherry-pick failed
The upstream fix modifies
docs/developer_versioned_docs/version-v4.2.0/docs/aztec-nr/api.mdx, which does not exist on v4-next. Git's rename detection landed the diff onversion-v4.1.0-rc.2/docs/aztec-nr/api.mdxwith conflict markers — the wrong target.On v4-next, the equivalent stale
useApiVersionlogic lives indocs/docs-developers/docs/aztec-nr/api.mdx. That file is the source from which future versioned snapshots are cut, so without this fix the same regression would recur the moment v4.2.0 developer docs are cut from v4-next.Commit structure
Per
CLAUDE.mdbackport guidance:cherry-pick: ... (with conflicts)— mechanical cherry-pick committed AS-IS for history.fix: resolve cherry-pick conflicts by reverting wrong target— restoresversion-v4.1.0-rc.2/...(whose existing name-based logic already resolves correctly for itsTestnet (v4.1.0-rc.2)label, since the name matchesincludes("rc")).fix(docs): use label-based API version mapping in docs-developers aztec-nr api page— applies the same 7/-5 change from fix(docs): restore Aztec.nr API reference links on v4.2.0 #22617 to the real v4-next target.Net diff
Full analysis: https://gist.github.com/AztecBot/4994eafc80a7cc7081ecf215fc4a9aec
Test plan
yarn startlocally on v4-next, open the Aztec.nr API Reference under the Alpha version, confirm links resolve.ClaudeBox log: https://claudebox.work/s/056d3a595d4c0d37?run=1