Skip to content

Fix BOM-prefixed Windows cleanup selection JSON - #3

Closed
rodion-m wants to merge 2 commits into
mainfrom
agent/windows-cleanup-selection-utf8-bom
Closed

Fix BOM-prefixed Windows cleanup selection JSON#3
rodion-m wants to merge 2 commits into
mainfrom
agent/windows-cleanup-selection-utf8-bom

Conversation

@rodion-m

Copy link
Copy Markdown
Member

Summary

  • accept BOM-prefixed and BOM-less UTF-8 cleanup-selection JSON
  • use BOM-safe decoding for cleanup-plan scan data
  • add regression coverage for loading and dry-run behavior
  • bump the plugin manifests to 5.0.1 as required for skill asset changes

Root cause

Windows PowerShell and some editors can emit a UTF-8 BOM. Reading with encoding="utf-8" preserves the leading marker, which causes json.loads to reject otherwise valid JSON. utf-8-sig removes the marker when present and behaves like UTF-8 when it is absent.

Safety

  • based directly on the rewritten, sanitized main
  • contains no history from the old fork branch
  • does not contain skills/agents-consilium/prompt.md or prompt.txt
  • preserves the existing validation and dry-run path

Validation

  • python3 skills/maintaining-windows-health/assets/test_validate_command.py — 56 passed, 0 failed
  • python3 -m py_compile for all three changed Python files
  • git diff --check
  • gitleaks dir — no leaks found
  • plugin and marketplace manifests parsed with jq

Supersedes #2 while preserving the original contributor's implementation and authorship.

Fixes #1

Pitchfork-and-Torch and others added 2 commits July 28, 2026 12:13
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 #1
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@rodion-m

Copy link
Copy Markdown
Member Author

Closing this replacement: the maintainer will preserve and merge the original contributor PR #2 instead.

@rodion-m rodion-m closed this Jul 28, 2026
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.

Windows cleanup apply rejects UTF-8 BOM selection JSON

2 participants