Found in the self-review of PR #314 and fixed in that same PR (commit pins
encoding="utf-8"); filed as the record per the review-finding policy.
scripts/audit_predicate_domains.py writes a non-ASCII ⊑ (U+2291, "⊑ microbe")
into the detail column of 366 report rows. The report write, baseline write,
and baseline read all used the platform default (locale) encoding. On a
non-UTF-8 locale that raises UnicodeEncodeError writing the report and
UnicodeDecodeError reading the baseline — a hard crash. It only passed CI
because the GitHub runner's locale is UTF-8.
Fix: encoding="utf-8" on all three opens. Verified byte-neutral — the
committed report and baseline are byte-identical after regeneration.
Related (NOT fixed here, pre-existing repo-wide): the corpus read
yaml.safe_load(path.read_text()) at line ~143 also relies on the default
encoding, matching the sibling audits (audit_causal_graphs.py etc.). If a
trait YAML ever carries non-ASCII (e.g. an accented species name) it has the
same latent failure across every audit. Worth a separate, repo-wide sweep rather
than a one-file change here.
Found in the self-review of PR #314 and fixed in that same PR (commit pins
encoding="utf-8"); filed as the record per the review-finding policy.scripts/audit_predicate_domains.pywrites a non-ASCII⊑(U+2291, "⊑ microbe")into the
detailcolumn of 366 report rows. The report write, baseline write,and baseline read all used the platform default (locale) encoding. On a
non-UTF-8 locale that raises
UnicodeEncodeErrorwriting the report andUnicodeDecodeErrorreading the baseline — a hard crash. It only passed CIbecause the GitHub runner's locale is UTF-8.
Fix:
encoding="utf-8"on all three opens. Verified byte-neutral — thecommitted report and baseline are byte-identical after regeneration.
Related (NOT fixed here, pre-existing repo-wide): the corpus read
yaml.safe_load(path.read_text())at line ~143 also relies on the defaultencoding, matching the sibling audits (
audit_causal_graphs.pyetc.). If atrait YAML ever carries non-ASCII (e.g. an accented species name) it has the
same latent failure across every audit. Worth a separate, repo-wide sweep rather
than a one-file change here.