fix(windows): use UTF-8 at file and subprocess boundaries - #4
Conversation
|
@cursor review this pr |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
|
@cursor review |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
|
https://github.com/cursor review |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d1d2b45. Configure here.
|
@codex review this pr |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
d1d2b45 to
56788d7
Compare
Read agent configs, instruction files, skills, MCP configs, plugin settings, and CLI bundle inputs explicitly as UTF-8 so Windows locale encodings cannot reject valid Unicode content. Decode harness status subprocess output as UTF-8 with replacement to prevent locale-dependent reader failures. Skip orphan reaping when POSIX wait primitives are unavailable so Windows host startup and cleanup do not crash. Add regression coverage for UTF-8 parsing, bundle preprocessing, skill resources, CLI status output, and Windows host cleanup. Signed-off-by: scwf <wangfei_hello@126.com>
56788d7 to
f1e09df
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Read agent YAML, instruction files, skill metadata, MCP configs, and harness JSON as UTF-8 so Windows locale encodings cannot reject valid project content.
Decode harness status output explicitly as UTF-8 and skip the POSIX orphan reaper when child-wait primitives are unavailable on Windows.
Add regression coverage for UTF-8 artifacts, CLI status output, and Windows host cleanup.
Note
Low Risk
Localized I/O encoding and platform guards with regression tests; no auth or data-model changes.
Overview
Windows host and encoding fixes so locale defaults (e.g. GBK/CP936) cannot break valid UTF-8 agent content or harness status checks.
All agent-related file reads now use
encoding="utf-8"— omnigent YAML, bundleconfig.yaml, instruction/context files,SKILL.md, MCP configs, JSON skill sources, and compat-layer omnigent detection.parsedocuments thatPath.read_text()without encoding fails on Windows for prompts containing characters like em dashes (U+2014). Omnigent YAML helpers also treatUnicodeDecodeErroras a failed/invalid file with a clear message.Harness login probing decodes CLI status output as UTF-8 with
errors="replace"instead oftext=True(locale-dependent).Host orphan reaper is gated on
_orphan_reaping_supported()(waitpid/WNOHANG); the reaper loop is not started on Windows, and_reap_orphans_oncereturns immediately without calling POSIX wait APIs.Regression tests cover UTF-8 YAML loading, harness status decoding, and no-op orphan reaping when POSIX primitives are absent.
Reviewed by Cursor Bugbot for commit d1d2b45. Bugbot is set up for automated code reviews on this repo. Configure here.