Skip to content

fix(ci): keep install-docs help cp1252-safe - #1815

Merged
debpalash merged 4 commits into
debpalash:mainfrom
dajiaohuang:fix/1813-cp1252-help
Sep 7, 2026
Merged

fix(ci): keep install-docs help cp1252-safe#1815
debpalash merged 4 commits into
debpalash:mainfrom
dajiaohuang:fix/1813-cp1252-help

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Keep the install-doc validator's --help output printable on cp1252 Windows consoles.

Closes #1813.

Changes

  • replace the non-cp1252 decorative arrow in the argparse description with ASCII
  • add a subprocess regression test that forces PYTHONIOENCODING=cp1252

Type

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor
  • 📝 Documentation
  • 🧪 Tests
  • 🔧 CI / Build
  • 🚀 Release prep

Testing

  • python -m pytest tests/scripts/test_validate_install_docs.py -q (11 passed)
  • cp1252 python scripts/validate-install-docs.py --help
  • python scripts/validate-install-docs.py
  • python scripts/check-docs-drift.py
  • python -m pytest tests/test_no_committed_analytics_token.py tests/test_gitleaks_allowlist.py -q (6 passed)
  • python -m compileall -q scripts/validate-install-docs.py tests/scripts/test_validate_install_docs.py
  • git diff --check

Checklist

  • I've tested this locally
  • I've updated relevant documentation (the help source itself)
  • No local machine paths, logs, or personal env details in this PR
  • Version files are in sync (no version change)
  • This PR does not change runtime behavior or persisted fixtures

Replaced the Unicode arrow in validate-install-docs.py help text with ASCII -> and added a cp1252 subprocess regression test. This prevents UnicodeEncodeError when Windows consoles print --help. The change does not alter validator behavior.

@greptile-apps

greptile-apps Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Updates the install-documentation validator’s help text to remain printable with cp1252 encoding and adds a subprocess regression test covering that Windows console condition.

  • Replaces the unsupported Unicode arrow with ASCII.
  • Verifies that --help exits successfully under forced cp1252 output encoding.
  • Records the fix in the changelog.

Important Files Changed

Filename Overview
scripts/validate-install-docs.py Replaces the non-cp1252 help-text character without changing validator behavior.
tests/scripts/test_validate_install_docs.py Adds a deterministic subprocess regression test for cp1252 help output.
CHANGELOG.md Documents the Windows legacy-console encoding fix.

Reviews (3): Last reviewed commit: "docs: credit Windows console help fix (#..." | Re-trigger Greptile

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: c085564d-9cd1-4dc1-a898-36ba40a78c3f

📥 Commits

Reviewing files that changed from the base of the PR and between 6c42b50 and d91beef.

📒 Files selected for processing (1)
  • CHANGELOG.md

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The validator help text replaces an unencodable Unicode arrow with ->. A regression test verifies successful help output with PYTHONIOENCODING=cp1252, and the changelog records the fix.

Changes

Help output compatibility

Layer / File(s) Summary
ASCII-compatible help text
scripts/validate-install-docs.py
The normalization description uses -> instead of the Unicode arrow.
CP1252 help regression test and changelog
tests/scripts/test_validate_install_docs.py, CHANGELOG.md
The test runs validator help with CP1252 output encoding and checks for exit code 0. The changelog records the Windows console fix.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to d91be

Validator help now uses ASCII-compatible notation and is covered for CP1252 console output, with no remaining merge-blocking risk identified.

Suggested reviewers: debpalash

🚥 Pre-merge checks | ✅ 8 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed The title uses conventional-commit format with the fix(ci): prefix, describes the cp1252-safe help fix, and the body provides issue reference #1813.
Description check ✅ Passed The description includes the required summary, changes, type, testing, and checklist sections. The omitted release cadence section is non-critical.
Linked Issues check ✅ Passed The changes satisfy issue #1813 by replacing the unsupported arrow with ASCII text and adding a cp1252 regression test for --help.
Out of Scope Changes check ✅ Passed The source change, regression test, and changelog entry directly support the cp1252 help-output fix. No unrelated code changes are identified.
Cross-Platform Default Parity ✅ Passed PASS: The PR changes only the argparse help text ( to ->) and adds a regression test. The changed path runs only when the explicit --help CLI flag is used; the no-argument validator path and it…
I18n Completeness (21 Locales) ✅ Passed The target commits change only the validator script, its Python test, and CHANGELOG.md. They add no frontend code, no t('...') keys, and no frontend user-facing strings. All 21 locale files exist; the…
Local-First Guarantee ✅ Passed No local-first violation is introduced. The diff changes one validator comment, adds a local subprocess.run regression test with PYTHONIOENCODING=cp1252, and adds a changelog entry. The added code…
Backward Compatibility ✅ Passed PASS — The branch delta contains only CHANGELOG.md, scripts/validate-install-docs.py, and its test. The code change replaces one help-text arrow, and the validator only reads install documentation…
Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@debpalash
debpalash merged commit 2b5e3cd into debpalash:main Sep 7, 2026
17 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.

[Bug] validate-install-docs help crashes on cp1252 Windows consoles

2 participants