Repository navigation
sdk(knowledge): reject a section that heads one rule ID twice - #146
Merged
Merged
Conversation
#142 made rule IDs unique tree-wide, but collected a section's heading IDs deduplicated, so a proposal heading its own ID twice (`## X-2` over `### X-2`) or two nested headings sharing an ID (`### X-4` twice) passed validation and apply while the ID was otherwise free. The downstream validators do not enforce ID uniqueness, so that would land an ambiguous definition. `_section_rule_ids` now keeps repeats; validation rejects the proposal ("section heads rule_id X more than once") and apply treats it as an integrity failure. Found by the commit gate while curating the 09-10 batch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018MAFmwP3u5qAMDgHfM6LFi
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Why
#142 made rule IDs unique tree-wide but collected a section's heading IDs deduplicated, so a proposal heading its own ID twice (
## X-2over### X-2) or two nested headings sharing an ID passed validation and apply while the ID was otherwise free. The downstream validators do not enforce ID uniqueness, so that would land an ambiguous definition. Found by the local review gate while curating #144.What
_section_rule_idskeeps repeats; validation rejects the proposal (section heads rule_id X more than once) and apply treats it as an integrity failure. Tests: parent-and-nested, two-nested, apply-time refusal. No API change; knowledge API stays 1.1.0.🤖 Generated with Claude Code
https://claude.ai/code/session_018MAFmwP3u5qAMDgHfM6LFi