Repository navigation
Allow the segment link order only for unchanged segment output - #748
Merged
Merged
Conversation
#747 let chapter validation accept links that change order inside one block for every page. Reuse, repair, audit and publish verification also read older whole-page translations, where a label can move to another link without changing the link counts, so the default stays strict again. The segment translator now records the Git blob of each page it wrote in the translation checkpoint (segment_outputs). The new link rule applies only to the page it just assembled, and later only while the page on the branch still has that exact blob: an edited, repaired or older page gets the strict check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
merge |
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
#747 let chapter validation accept links that change order inside one Markdown block for every page. Chapter validation also checks pages that did not come from the segment translator: reuse and repair of existing translations (
stage_markup_repairs), the audit of current chapters (invalid_current_chapters) and publish verification (verify_requested_translations). Older whole-page translations can move a label to another link without changing the link counts. #747 hid that.Change
chapter_validation_problems(..., segment_output=True)allows the Allow links to change order inside one block in chapter validation #747 rule (a link or image with a unique destination may change order inside its own block). Only the segment translator passes it, attranslator.pyfor the page it just assembled.segment_outputs: {path: localized blob}. Reuse, audit and publish verification apply the segment rule only while the page on the branch still has that exact blob. A hand-edited, repaired or older page gets the strict check. A blob that does not match the file on disk is never recorded, and retranslating a page without segment output drops its entry.Tests
test_translat*: 377 OK.test_segment_translator: 149 OK.verify_requested_translations. After a hand edit, both report "moved Markdown links". Retranslating without segment output removes the entry.segment_output=True, and the same page fails without it.🤖 Generated with Claude Code