Skip to content

Make CLI UTF-8-safe so --help survives Windows cp1252 (closes #11) - #18

Merged
abhay-codes07 merged 1 commit into
mainfrom
fix/cli-utf8-help
Jul 12, 2026
Merged

Make CLI UTF-8-safe so --help survives Windows cp1252 (closes #11)#18
abhay-codes07 merged 1 commit into
mainfrom
fix/cli-utf8-help

Conversation

@abhay-codes07

Copy link
Copy Markdown
Owner

Closes #11.

A stray -> (U+2192) in the certify command's Typer help string crashed both volo certify --help and (because it renders in the top-level command list) volo --help with UnicodeEncodeError whenever stdout was cp1252 — any volo --help | cat, > file, subprocess capture, or Windows CI runner.

Fix (two layers)

  1. The help string is now ASCII (-> instead of ).
  2. _force_utf8_io() in main.py reconfigures stdout/stderr to UTF-8 (errors='replace') at import — before Click renders --help — so a future non-ASCII help string can't reintroduce the crash. No-op where the stream can't be reconfigured (pytest capture), so tests are unaffected.

Verification

volo --help and volo certify --help now exit 0 under PYTHONIOENCODING=cp1252 (were exit 1). 3 tests including a guard that every command-group help string is cp1252-encodable. Full CLI suite 85 passed; mypy + ruff clean.

A stray -> (U+2192) in the certify command's Typer help string crashed both
'volo certify --help' and (because it renders in the top-level command list)
'volo --help' with UnicodeEncodeError whenever stdout was cp1252 — i.e. any
'volo --help | cat', redirect to a file, subprocess capture, or Windows CI
runner. Two fixes: (1) the help string is now ASCII; (2) _force_utf8_io() in
main.py reconfigures stdout/stderr to UTF-8 (errors=replace) at import, before
Click renders --help, so a future non-ASCII help string can't reintroduce the
crash. No-op where the stream can't be reconfigured (e.g. pytest capture).

Verified: 'volo --help' and 'volo certify --help' now exit 0 under
PYTHONIOENCODING=cp1252 (were exit 1). 3 tests. Closes #11.
Copilot AI review requested due to automatic review settings July 12, 2026 17:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

🛫 Volo reliability — ❌ NO-SHIP

Replayed 7 adversarial scenarios against the agent (threshold ≥ 0.90).

Metric Score
Trajectory determinism 1.000
Decision determinism 1.000
Faithfulness 0.000
Consistency under repetition 1.000

Cost — replayed deterministically at $0 (no live API calls).

baseline 1783877594588-97237adf-fbe3-4dfd-b9b1-1dde603582fc • generated by Volo

@abhay-codes07
abhay-codes07 merged commit b8e872e into main Jul 12, 2026
3 of 4 checks passed
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.

volo --help crashes on Windows when stdout is cp1252 (non-ASCII in help string)

2 participants