fix: docs MD anchor broken — RST label slug not heading slug (#316)#323
Open
fix: docs MD anchor broken — RST label slug not heading slug (#316)#323
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
kiyotis
commented
Apr 28, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ete steps Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…RED) Issue #316: labels.py anchor must be github_slug(title), not github_slug(label). These 5 tests are currently RED; implementation follows in the next commit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Issue #316: _anchor_for_label(label) → _anchor_for_title(title). Anchor in generated docs MD now matches GitHub's auto-anchor for the heading, so #fragment links resolve correctly on GitHub. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Issue #316: §3-2-2 label resolution rule updated. Sphinx-following exception added to §3-2 preamble: #anchor in docs MD must match GitHub heading auto-anchor (github_slug(heading_title)), not Sphinx HTML id (github_slug(label_name)). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Task 4: all 5 versions show FAIL 0→0 (no regression). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Issue #316: anchor in generated JSON/docs MD now uses github_slug(heading_title) instead of github_slug(label_name), matching GitHub's heading auto-anchor. All 5 versions regenerated: v6 (353), v5 (533), v1.4 (489), v1.3 (327), v1.2 (321). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Closes #316
Approach
_anchor_for_labelinscripts/common/labels.pywas slugifying the RST label name (e.g.universal-dao) instead of the heading text (ユニバーサルDAO). GitHub auto-anchors headings from their rendered text, so all 2,744 cross-reference anchor links in docs MD silently failed to navigate.Fix: replace
_anchor_for_label(label)with_anchor_for_title(title), passingLabelTarget.title(the resolved heading text) togithub_slug. This aligns the generated#fragmentwith GitHub's actual auto-anchor for each heading.Tasks
See tasks.md.
Expert Review
Expert review will be conducted before merging.
Success Criteria Check
_anchor_for_labeluses heading text viagithub_sluglabels.py:_anchor_for_title(title)usinggithub_slug(title)rbkc create + verifyon all 5 versions, notes.mdTestHeadingTextAnchor::test_anchor_differs_from_label_slug_for_japaneseTestHeadingTextAnchor(5 tests) prevents regression🤖 Generated with Claude Code