Skip to content

License a fence the source opened - #51

Merged
tamnd merged 1 commit into
mainfrom
license-a-fence-the-source-opened
Aug 18, 2026
Merged

License a fence the source opened#51
tamnd merged 1 commit into
mainfrom
license-a-fence-the-source-opened

Conversation

@tamnd

@tamnd tamnd commented Aug 18, 2026

Copy link
Copy Markdown
Owner

_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.

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 here as --- and was read as a model drawing a rule under its answer.

P08 had a second copy of the same bug from the other direction. 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.

The entries

File msgid Why it opens with a rule
c-api/call.po:273 --- it is a literal ---
howto/mro.po:167 ----------- and 5 more lines it is a picture of a class hierarchy

Both are copied through exactly. Four findings over two hard checks, and both checks are 0 on the real corpus now.

548 catalogs, 2 checks, 2 passed, 0 findings, 4.7s
every hard check passes

The test that asserted the bug

test_a_fence_is_never_licensed encoded the old reasoning, with a source of \nsorted(x)\n . Replaced by three 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 in the module
  • passing no source still licenses nothing, which is the right answer for a caller holding a string and no idea what it was made from

Takes the M5 exit from nine failing hard checks to seven.

Refs #11

_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.
@tamnd
tamnd merged commit cd2d5b5 into main Aug 18, 2026
6 of 7 checks passed
@tamnd
tamnd deleted the license-a-fence-the-source-opened branch August 18, 2026 07:17
@tamnd tamnd mentioned this pull request Aug 18, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant