fix(platform): read proc version with utf-8#3901
Merged
alteixeira20 merged 2 commits intoJun 11, 2026
Merged
Conversation
alteixeira20
approved these changes
Jun 11, 2026
Collaborator
There was a problem hiding this comment.
LGFM. This is a tiny platform-compatibility fix: /proc/version is now read with explicit UTF-8 decoding and ignored decode errors, which is appropriate for WSL detection.
The regression test verifies the new open options, current CI is green, and the change is limited to the intended platform-detection path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
is_wsl()now reads/proc/versionwith explicit UTF-8 decoding anderrors="ignore", matching the defensive proc/system-file reads already used elsewhere in the platform compatibility helpers. The existing WSL detection regression test now asserts that the tolerant read options are used.Target branch
dev, notmain. All PRs land indev;mainis curated by the maintainer at each release. If your PR is onmainby accident, click "Edit" on this PR and change the base.Linked Issue
Closes #3902
Type of Change
Checklist
devdocker compose uporuvicorn app:app) and verified the change works end-to-end. Type-checks and unit tests are not enough.How to Test
3 passed.test_get_wsl_windows_user_profile_falls_back_to_users_dir.Visual / UI changes — REQUIRED if you touched anything that renders
This PR does not touch UI, rendering, CSS, HTML, SVG, or
static/js/code.Screenshots / clips
Not applicable; no visual changes.