Repository navigation
fix(preflight): decode async scanner source as UTF-8 - #10715
undivisible merged 2 commits into
Conversation
|
Thanks for the focused fix. I reviewed the scanner change and the regression coverage. This looks like the right direction: opening scanner inputs with I also ran the targeted unit file locally in a clean env with only the missing test dependency installed:
Result: I am leaving this as a positive maintainer signal rather than a formal approval because this touches a preflight/automation scanner path and the automation approval gate requires human sign-off for workflow-sensitive changes before merge. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Fresh native-Windows integration evidence on current main: with this head stacked into the Windows preflight series, |
undivisible
left a comment
There was a problem hiding this comment.
Reviewed the UTF-8 source handling and its focused regression coverage.
Summary
Root cause
scan_async_blockers.pyopened repository source files without an explicit encoding. On Windows, Python therefore used the active ANSI code page (GBK on the reproduced machine) and crashed on valid UTF-8 source before the preflight scan could run. The first observed failure was the em dash inbackend/agent-proxy/main.py.Repository Python sources are UTF-8, so the scanner now declares that contract at the file boundary. The regression test fails against the previous implementation on every platform because it verifies the encoding passed to
open.The adjacent scope test also constructed its key with native separators while production findings are normalized to POSIX separators. Normalizing the fixture removes an unrelated Windows-only failure and keeps the production path unchanged.
Validation
PYTHONUTF8: 452defand 115async deffunctions scanned; zero selected or legacy findingsbackend/tests/unit/test_scan_async_blockers.pyandbackend/tests/unit/test_async_resource_correctness.py: 33 passedgit diff --checkpr_preflight.py --suggest: no product invariants;Failure-Class: noneFailure class
Failure-Class: none