Repository navigation
Conversation
|
Integration follow-up: this head was stacked with the current Windows preflight fixes and exercised through the official |
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for the focused CI portability fix. I reviewed the diff and ran the guard-ratchet test module locally on the PR head (fab8999e0): 14 tests passed.
This looks like a good candidate from an implementation standpoint: run_git() now decodes Git output as UTF-8 instead of relying on the host locale, the regression covers non-ASCII history text, and the temporary repository cleanup is made portable by replacing the POSIX-only rm calls with TemporaryDirectory cleanup.
I’m not formally approving because this touches CI/guardrail scripts, so it should still get human maintainer review before merge, but I don’t see blocking changes needed from this automation review.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
kodjima33
left a comment
There was a problem hiding this comment.
Real crash with a named root cause: git log decoded via host locale (GBK on Windows) returned None stdout then AttributeError. Explicit UTF-8 decode plus a non-ASCII-history regression; also drops a POSIX-only rm from the tests. Green.
* fix(preflight): decode gh metadata as UTF-8 Decode captured gh PR JSON with the producer's UTF-8 encoding instead of the Windows host code page. Add a Unicode metadata contract and register the recurring subprocess locale failure class with #10595 and #10844 as evidence. Tests: MetadataTests passed 14/14; the real #10823 body loaded under preferred_encoding=cp936; Ruff, Black, py_compile, and diff checks passed. Failure-Class: new * fix(preflight): propagate UTF-8 through Windows runner * fix(preflight): pin suggestion subprocess UTF-8 * test(preflight): pin nested subprocess UTF-8 * fix(preflight): emit direct Windows output as UTF-8 --------- Co-authored-by: 491034170 <[email protected]>
What changed and why
Decode
git logoutput as UTF-8 in the failure-class guard-artifact ratchet instead of relying on the host locale. Git emits repository history as UTF-8, while native Windows Python used GBK here; a non-ASCII first-parent commit caused the subprocess reader thread to fail and leftstdoutasNone, followed by anAttributeErrorin the ratchet.Make the checker's two disposable-repository tests use Python
TemporaryDirectorycleanup instead of invoking the POSIX-onlyrmexecutable. This lets the complete checker module run under native Windows.Product invariants affected
none
How it was verified
UnicodeDecodeError: 'gbk' codec can't decode byte 0x94, thenAttributeError: 'NoneType' object has no attribute 'split'..github/scripts/test_check_failure_class_guard_ratchet.py: 14 tests passed on native Windows; before the cleanup fix, 12 passed and 2 errored becausermwas unavailable.py_compileandgit diff --checkpassed.Tests
The new regression supplies non-ASCII history text and verifies the production Git subprocess explicitly requests UTF-8. Existing end-to-end repositories continue to cover thresholds, artifacts, grandfathering, shallow history, short history, PR-body declarations, and the shipped registry.
Failure class (fixes)
Failure-Class: none