Skip to content

fix: drift-script crash on non-UTF-8 consoles, v1.7.1 - #6

Merged
luxsolari merged 1 commit into
mainfrom
fix/drift-script-encoding
Jul 2, 2026
Merged

fix: drift-script crash on non-UTF-8 consoles, v1.7.1#6
luxsolari merged 1 commit into
mainfrom
fix/drift-script-encoding

Conversation

@luxsolari

Copy link
Copy Markdown
Owner

Summary

Discovered while doing a fourth documentation pass over the upstream three-axes-framework repo: a command-naming fix there caused genuine drift, and running check_framework_drift.py to confirm it crashed with UnicodeEncodeError -- Windows consoles default stdout to cp1252, which can't encode characters like "↓" in SKILL.md's tier diagram. Fixed via sys.stdout.reconfigure(encoding="utf-8").

Verified against the actual pending drift: the script now prints the diff correctly. That drift was cosmetic (command-name formatting), so accepted as the new baseline via --update-snapshot rather than requiring a philosophy.md edit.

Test plan

  • Re-ran the script against real pending drift -- prints correctly instead of crashing
  • python tests/test_check_progress_schema.py -- 7/7 pass (unaffected)
  • plugin.json validated as well-formed JSON

🤖 Generated with Claude Code

Discovered while doing a fourth documentation pass over the upstream
three-axes-framework repo: a command-naming fix there (unrelated to
this project) caused genuine drift, and running
check_framework_drift.py to confirm it crashed with
UnicodeEncodeError trying to print the diff. Windows consoles default
stdout to the system codepage (cp1252), which can't encode characters
like the down-arrow in SKILL.md's tier diagram -- so the script broke
exactly at the one moment it had something real to show.

Fixed by forcing UTF-8 output via sys.stdout.reconfigure() at the top
of main(). Verified against the actual pending drift: the script now
prints the diff correctly. That drift turned out to be cosmetic
(command-name formatting, not a conceptual framework change) --
accepted as the new baseline via --update-snapshot rather than
requiring a philosophy.md edit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@luxsolari
luxsolari merged commit b70efbb into main Jul 2, 2026
1 check passed
@luxsolari
luxsolari deleted the fix/drift-script-encoding branch July 2, 2026 18:59
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.

1 participant