Problem
#1574 fixed #1538 by pinning encoding="utf-8" on every text-mode subprocess call in this repository, and added scripts/tests/test_tooling_encoding.py to assert that nothing reintroduces it. That test guards this repository and nothing else, so every other repository in the fleet can write the same defect freely.
The rule is not stated anywhere a carrier reads. CODESTYLE.md has a Python section and says nothing about it, and no linter in the toolchain covers it: ruff has no rule reaching a subprocess call at all, and its rule for the same omission on open and read_text, PLW1514, is neither selected here nor out of preview.
Why it matters
The defect is invisible on the host it is written on. Python decodes a text=True pipe with the locale encoding when the call names none, which on Linux is UTF-8, so the omission looks correct everywhere CI runs and fails only on a Windows host. That is why #1538 went unnoticed until a maintainer ran a gate locally from Windows, and why nothing would catch the next one.
Suggested fix
State it in CODESTYLE.md's Python section, as the rule plus the reason rather than as a description of this repository's test, since a carrier gets the rule and not the mechanism. Two halves are load bearing and they fail differently: naming the encoding is what makes the read platform independent, and what a byte outside that encoding is worth is a per-call decision the call answers with its own errors, which a strict default answers by raising.
AGENTS.md "Where the Rules Live" routes code style to CODESTYLE.md and packages its language sections as the python-codestyle Skill, so the Skill regenerates from the same text and no second copy is written.
Follow-up to #1538, filed rather than grown into #1574, since new prose in a carried document is reviewed as carried content and belongs on its own branch.
Problem
#1574 fixed #1538 by pinning
encoding="utf-8"on every text-modesubprocesscall in this repository, and addedscripts/tests/test_tooling_encoding.pyto assert that nothing reintroduces it. That test guards this repository and nothing else, so every other repository in the fleet can write the same defect freely.The rule is not stated anywhere a carrier reads.
CODESTYLE.mdhas a Python section and says nothing about it, and no linter in the toolchain covers it: ruff has no rule reaching a subprocess call at all, and its rule for the same omission onopenandread_text,PLW1514, is neither selected here nor out of preview.Why it matters
The defect is invisible on the host it is written on. Python decodes a
text=Truepipe with the locale encoding when the call names none, which on Linux is UTF-8, so the omission looks correct everywhere CI runs and fails only on a Windows host. That is why #1538 went unnoticed until a maintainer ran a gate locally from Windows, and why nothing would catch the next one.Suggested fix
State it in
CODESTYLE.md's Python section, as the rule plus the reason rather than as a description of this repository's test, since a carrier gets the rule and not the mechanism. Two halves are load bearing and they fail differently: naming the encoding is what makes the read platform independent, and what a byte outside that encoding is worth is a per-call decision the call answers with its ownerrors, which a strict default answers by raising.AGENTS.md"Where the Rules Live" routes code style toCODESTYLE.mdand packages its language sections as thepython-codestyleSkill, so the Skill regenerates from the same text and no second copy is written.Follow-up to #1538, filed rather than grown into #1574, since new prose in a carried document is reviewed as carried content and belongs on its own branch.