Repository navigation
Commit the upstream pin, and stop tests reading real checkouts - #39
Merged
Merged
Conversation
The pin was written to work/manifests/upstream.yaml, which is run state and never leaves the machine that produced it. S01 recounts the corpus against that pin and S02 needs the pinned upstream to say whether a msgid was edited, so a pin under work/ means the two checks that matter most are the two that only ever run where the answer is already known. It goes to the content repo, where spec 02 always had it, next to the glossary and for the same reason. Paths.manifests is now that one directory and the four glossary paths route through it, so a file cannot be written to one place and read from another. The move surfaced what it was always going to surface. Tests set PYDOCVI_UPSTREAM and PYDOCVI_WORK but left PYDOCVI_CONTENT alone, so the first run after the move wrote a four-entry fixture pin into the real content repo, and eleven translate tests turned out to have been reading the real glossary all along. They passed on this machine and would fail anywhere else. An autouse fixture now points all three at tmp_path before any test runs, and TestTranslate writes its own contract. The failure mode this guards against is not a red suite, it is a green one that wrote into a checkout nobody was looking at.
This was referenced Aug 17, 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.
Groundwork for the content repo's
audit.yml, the last box on #11 beforeapply.The pin has to be committed
S01recounts the corpus againstmanifests/upstream.yamlandS02needs the pinned upstream to say whether amsgidwas edited. Both were reading the pin out ofwork/, which is run state and never leaves the machine that produced it. CI has nowork/directory and never will, so as it stood the two most important checks in the audit were the two that could only run where the answer was already known.It moves to the content repo, which is where spec 02 §1 always had it, next to the glossary and for the reason already written on
Paths.glossary: run state is disposable and this is not.Paths.manifestsis now that one directory, and the four glossary paths route through it rather than each spellingcontent / "manifests"again.What the move found
Tests set
PYDOCVI_UPSTREAMandPYDOCVI_WORKand leftPYDOCVI_CONTENTalone. So:pytestrun after the config change wrote a four-entry fixture pin into the real content repo. Untracked, spotted ingit status, removed.TestTranslatetests had been reading the real checkout'smanifests/glossary.yamlfor as long as they have existed. They passed here and would fail on any machine without that checkout.An autouse fixture in
conftest.pynow points all three paths attmp_pathbefore any test runs, andTestTranslatewrites its own two-line contract. The failure mode this guards against is not a red suite. It is a green one that quietly wrote into a checkout nobody was looking at.Checks
make checkgreen: 1326 passed, 97.26% total.make secretsclean.pydocvi syncre-run for real against the mirror, so the pin now in the content repo is the genuine one:tamnd/python-docs-vi@da475ff9, 548 files, 87,008 entries, 1,711,382 English words, 1,435 already translated. That lands in the content repo alongside the workflow.