Repository navigation
Conversation
|
Thanks for tightening this up — this looks like a useful portability fix for the OpenAPI client generators. I reviewed the diff and ran the generator checks locally in a scrubbed environment with
Those passed, and the Swift/TypeScript generator unit tests also passed locally ( I'm not formally approving from automation because this touches generator/pre-push-sensitive tooling and the review policy requires human maintainer review for that surface, but this is a positive signal from my side. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
kodjima33
left a comment
There was a problem hiding this comment.
Reviewed — looks good; not auto-merging (over scope/size or non-bug area), landing left to maintainer.
kodjima33
left a comment
There was a problem hiding this comment.
backend bug fix (conf 4/5): make OpenAPI client generators portable on Windows (explicit UTF-8 encoding + slash-stable paths); tests, CI green
Summary
relative_to()failuresRoot cause
The client generators used
Path.read_text()andPath.write_text()without an encoding. On Windows, Python therefore inherited the active ANSI code page. The UTF-8 app-client contract failed to decode under GBK before generation started.After forcing UTF-8 manually, TypeScript
--checkstill reported all four committed outputs as stale because the generated header embedded a Windows backslash path while the committed Linux-generated header used forward slashes. The Swift generator had the same path-label contract, and both generators assumed every explicit output lived under the repository root.This was visible in the contributor path because
scripts/pre-pushinvokes all three generator checks directly; it does not inherit the UTF-8 export used bybackend/test.sh.Scope and safety
Product invariants affected
None.
Verification
PYTHONUTF8unset:python backend/scripts/generate_dart_models.py --all --checkpython backend/scripts/generate_ts_openapi_types.py --checkpython backend/scripts/generate_swift_openapi_types.py --checkThe full 601-file backend run had one unrelated Windows CPU-time guard at the exact
0.12sthreshold; all four assertions in that file passed, and the same file passed its isolated official-runner retry in0.10s. The aggregate preflight also encounters the existing Windows Firestore path-normalization false positive fixed by #9683; checks after that gate were run directly and passed.