fix(config): close Windows portability gaps in memu init - #636
Open
xnne-bot wants to merge 4 commits into
Open
Conversation
Keep POSIX mode-bit assertions on POSIX, and verify on Windows that config writes inherit ACLs without invoking chmod or elevation.\n\nCo-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Probe the platform default SSL context before falling back to certifi when no cafile or capath is exposed. This keeps the Windows certificate store, including corporate roots, while retaining certifi for a true trust vacuum.\n\nCo-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Decode UTF-8 BOM, UTF-16 BOM, and Windows ANSI config files through one shared reader so init guards and runtime loading agree. Normalize legacy files to canonical UTF-8 on the next write, even when no logical value changes.\n\nCo-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replace the byte-identical claim with the behavior the writer actually guarantees: unmanaged text, order, and comments survive while encoding and line endings may be normalized.\n\nCo-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 task
memu init
12 tasks
This was referenced Aug 12, 2026
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.
📝 Pull Request Summary
Fix the Windows portability gaps found while validating the
initandconfigwork in #632, without adding elevation, ACL mutation, or authorization prompts.✅ What does this PR do?
0600/0700assertions on POSIX and tests the intended inherited-ACL behavior on Windows.config.envfiles through one shared loader, then normalizes them to UTF-8 on the next write.🤔 Why is this change needed?
PR #632 currently passes its Linux-only CI but has Windows-specific gaps:
get_default_verify_paths()exposes no file path on Windows, causing a healthy OS certificate store to be replaced by certifi.UnicodeDecodeErrorbeforeinitcan migrate them.Validated on Windows 11 with Python 3.13. The affected suite passes with 59 passed, 2 skipped; both skips are the expected POSIX-only permission tests. Pre-commit, ruff, mypy, deptry, and lock checks pass.
Parent PR: #632
Tracking notes: MrXnneHang/xnnehang.top#111
🔍 Type of Change
✅ PR Quality Checklist
feat:,fix:,docs:,memory base:)📌 Optional
The POSIX-shaped local database path examples in the install guides remain a non-blocking follow-up suggestion; this patch does not expand into a multi-host documentation rewrite.
🤖 Generated with Claude Code