fix(windows-health): accept UTF-8 BOM in cleanup selection JSON#2
Open
Pitchfork-and-Torch wants to merge 1 commit into
Open
Conversation
Windows PowerShell Set-Content -Encoding UTF8 writes a BOM that made apply-cleanup-selection.py fail before dry-run/apply. Load selection files with utf-8-sig (and the scan data path in render-cleanup-plan) and cover BOM + BOM-less inputs in the validator regression suite. Fixes CodeAlive-AI#1
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
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
Windows PowerShell
Set-Content -Encoding UTF8(and several editors) write a UTF-8 BOM.apply-cleanup-selection.pyusedencoding=utf-8, sojson.loadsrejected BOM-prefixed selection files before validation or dry-run.Changes
load_selection_jsonusingutf-8-sig(BOM-safe; no-op for BOM-less files)render-cleanup-plan.pyscan data input (same PowerShell footgun)--dry-runon a BOM-prefixed selectionTest plan
python test_validate_command.py→ 56 passed, 0 failed (includes 2 BOM checks)Fixes #1