Copy a code entry before asking whether a person signed it - #56
Merged
Conversation
apply asked the human guard first and the code copy second. The block rule learning to read `def f(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):` was enough to show what that costs. Four segments left the memory, because a person's copy of a line of code is not a translation of it. The five entries in the corpus stayed exactly as they were, translated and not fuzzy and now accounted for by nothing, and S04 reported all five. S04 was right. An unmarked non-fuzzy string reads to a reviewer and to Sphinx as somebody's considered work, and there was nothing behind these. The guard was holding in place a mark that had lost its meaning, and there was no way to clear the finding short of a corpus-wide --refuzzy, which would have to be run again after the next classifier change. The guard exists to stop a machine translation landing on a person's work. Copying the msgid is not a machine translation, it is the source text, and P07 requires the entry to hold it byte for byte. The guard is not engaged here, and putting it first only meant a writer could leave its own checker with findings it had no way to clear. Measured before the swap: 5 entries in the corpus are human-marked and classified as code, and all 5 already hold the msgid byte for byte. The reordering changes no translated text and adds five provenance comments saying where the text came from. The guard is where it always was for everything that is not code, which is 81 964 of the 87 008 entries.
This was referenced Aug 18, 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.
Follow-on from #55, which is what surfaced this.
apply_entryasked the human guard first and the code copy second. #55 taught the block rule to read three more shapes of code, 4 segments left the memory as a result, and the 5 entries in the corpus holding them stayed exactly where they were: translated, not fuzzy, and accounted for by nothing.S04reported all five, andS04was right. An unmarked non-fuzzy string reads to a reviewer and to Sphinx as somebody's considered work. There was nothing behind these, and no way to clear the finding short of a corpus-wide--refuzzythat would have to be run again after the next classifier change.Why the guard was not the right thing to ask first
The guard exists to stop a machine translation landing on a person's work. Copying the
msgidis not a machine translation, it is the source text, andP07requires the entry to hold it byte for byte. The guard is not engaged for a code entry, and putting it first only meant that a writer could leave its own checker with findings it had no way to clear.The precedence was the other way round in #53, on the reasoning that a reviewer's mark outranks everything. That was the conservative first cut and one classifier change was enough to show the cost. The test that asserted it is now asserting the opposite, with the reason written next to it.
Measured before the swap
msgstralready byte-identical tomsgidmsgstrdiffering frommsgidSo the reordering changes no translated text at all. It adds five provenance comments saying where the text came from. The guard is untouched for everything that is not code, which is 81,964 of the 87,008 entries, and there is a test holding it there.
Checks
make checkgreen, 1,399 tests, 97.47 per cent coverage.H03clean.