Skip to content

fix(windows): add missing encoding to livetest2 result write_text - #72097

Closed
mannnrachman wants to merge 1 commit into
NousResearch:mainfrom
mannnrachman:fix/livetest2-write-text-encoding
Closed

fix(windows): add missing encoding to livetest2 result write_text#72097
mannnrachman wants to merge 1 commit into
NousResearch:mainfrom
mannnrachman:fix/livetest2-write-text-encoding

Conversation

@mannnrachman

Copy link
Copy Markdown
Contributor

What does this PR do?

Unbreaks the check-windows-footguns.py --all CI gate, which currently fails for every PR.

a2c42be (fix(lint): explicit encoding on write_text in livetest harness (PLW1514)) added encodings to the livetest harness but missed the per-scenario result write in _run_one, leaving one bare Path.write_text() on scripts/tool_search_livetest2.py:190. Since the CI job scans with --all, that single pre-existing miss now fails the gate for unrelated PRs (observed on #72094).

Related Issue

Part of the #71014 / #37423 read_text/write_text encoding campaign.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • scripts/tool_search_livetest2.py: out_path.write_text(..., encoding="utf-8") — the one call a2c42be missed.

How to Test

python3 scripts/check-windows-footguns.py --all

Validation Results

  • Before: ✗ 1 Windows footgun(s) found across 818 file(s) scanned. (scripts/tool_search_livetest2.py:190)
  • After: ✓ No Windows footguns found (818 file(s) scanned).

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched open and merged issues/PRs; no open PR fixes this line
  • My PR contains only changes related to this fix
  • I've added tests for my changes — N/A: one-line encoding argument, covered by the CI gate itself
  • I've tested on Ubuntu 22.04 x86_64 with Python 3.11.15

Documentation & Housekeeping

  • Documentation N/A
  • cli-config.yaml.example N/A
  • CONTRIBUTING.md / AGENTS.md N/A
  • Cross-platform impact considered; scripts/check-windows-footguns.py --all passes

Screenshots / Logs

$ python3 scripts/check-windows-footguns.py --all
✓ No Windows footguns found (818 file(s) scanned).

🤖 Generated with Claude Code

a2c42be added explicit encodings to the livetest harness (PLW1514)
but missed the per-scenario result write in _run_one, so
check-windows-footguns.py --all now fails CI for every PR.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation labels Jul 26, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for identifying the remaining Windows encoding issue. This automated hermes-sweeper review found that current main already provides this exact fix, with broader sibling coverage.

  • Commit 0e2808729e20e09dfe3581b15ab1018f839ff636 (fix(lint): encode remaining write_text calls in the tool_search livetest harness) is contained in current main and adds encoding="utf-8" to the per-scenario result write at scripts/tool_search_livetest2.py:190.
  • The same commit also fixes the multiline summary write at scripts/tool_search_livetest2.py:211, which the single-line footgun checker would not have reported.
  • Current main therefore has explicit UTF-8 encoding on all write_text() calls in this harness.

@teknium1 teknium1 closed this Jul 30, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists platform/windows Native Windows-specific behavior or breakage sweeper:implemented-on-main Sweeper: behavior already present on current main sweeper:risk-automation Sweeper risk: may affect CI, automerge, label sync, or maintainer automation sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants