Skip to content

Handle fallible filesystem decoding in Windows console IO - #9728

Merged
youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:fix/windows-console-fsdecode-20261106
Nov 6, 2026
Merged

youknowone merged 1 commit into
RustPython:mainfrom
youknowdot:fix/windows-console-fsdecode-20261106

Conversation

@youknowdot

Copy link
Copy Markdown
Contributor
  • I did not use AI to write the code of this patch.
  • This PR follows our AI policy.

Summary

Fix the two Windows E0308 errors in main's Clippy job. Both bytes-path branches still treated the now-fallible vm.fsdecode result as a string.

  • Return \0 if decoding fails during best-effort console detection, consistent with the adjacent path-conversion failure handling.
  • Propagate decoding errors from _WindowsConsoleIO initialization with ?.

Only these two call sites change. No lint suppression, workflow changes, or test changes.

Validation

  • cargo fmt --check, normal commit hooks, and git diff --check passed.
  • Independent source review passed.
  • Four isolated Rust control-flow tests and strict Clippy on that small reproducer passed. These do not execute RustPython or Windows APIs.
  • Windows cross-Clippy was attempted but stopped before compilation because the offline cache lacks clipboard-win v5.4.1; the installed toolchain also lacks the Windows target. Native Windows compilation, the workspace suite, and C-API tests remain unrun. Hosted CI must validate the actual Windows build.

Based on main 0dd06b08e13f79ad19d32c8f5820953a05a6be81.

AI assistance: OpenAI Codex diagnosed the CI failure, implemented and reviewed the fix, and performed the listed local checks. Model version is not exposed.

Keep console detection best-effort when filesystem decoding fails and propagate decoding errors when initializing WindowsConsoleIO. This fixes both E0308 match-arm errors on current main without suppressing lints.

Assisted-by: OpenAI Codex:model version not exposed
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@youknowone
youknowone marked this pull request as ready for review November 6, 2026 03:52
@youknowone
youknowone merged commit 7e49b84 into RustPython:main Nov 6, 2026
8 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-06T03:52:52.979148Z
We couldn’t complete this review. Comment @codex review to try again.
1a9d65d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants