License a fence the source opened - #51
Merged
Merged
Conversation
_FENCE was the only guard in textguard with no licence. The reason given was that the corpus has literal blocks but a protected one reaches the module as a placeholder and never as three backticks, and that is true of the translate path and not of the audit. L03 hands over the raw msgstr and the raw msgid with nothing protected, so an entry whose msgid is --- arrived as --- and was read as a model drawing a rule under its answer. P08 had a second version of the same bug. Every other rule in placeholders.py reads the pair and that one read the translation alone, so it reported the same entries for the same wrong reason. Two entries in the corpus are affected and both are correctly copied non-prose: a literal --- in c-api/call.po and the class inheritance diagram in howto/mro.po, which opens with a line of dashes because it is a picture. Four findings over two hard checks, both now 0 on the real corpus. test_a_fence_is_never_licensed asserted the old behaviour and is replaced by three tests rather than deleted: a fence the source did not open is still narration, a fence the source did open is licensed like every other phrase, and passing no source still licenses nothing.
Merged
tamnd
added a commit
that referenced
this pull request
Aug 18, 2026
The fence licence in #51 changes what the audit reports, so the corpus that ships the regenerated reports needs a tag naming the tool that produced them.
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.
_FENCEwas the only guard intextguardwith no licence. The reason given was that the corpus has literal blocks, but a protected one reaches the module as a placeholder and never as three backticks.That is true of the translate path and not of the audit.
L03hands over the rawmsgstrand the rawmsgidwith nothing protected, so an entry whosemsgidis---arrived here as---and was read as a model drawing a rule under its answer.P08had a second copy of the same bug from the other direction. Every other rule inplaceholders.pyreads the pair, and that one read the translation alone, so it reported the same entries for the same wrong reason.The entries
c-api/call.po:273------howto/mro.po:167-----------and 5 more linesBoth are copied through exactly. Four findings over two hard checks, and both checks are 0 on the real corpus now.
The test that asserted the bug
test_a_fence_is_never_licensedencoded the old reasoning, with a source of\nsorted(x)\n. Replaced by three rather than deleted:Takes the M5 exit from nine failing hard checks to seven.
Refs #11