Skip to content

fix(planning): write share.py output as UTF-8 so Windows pipes don't crash on non-cp1252 text #8239

Closed

Description

@kyle-sexton

Refs: #7670

Summary

On Windows, share.sh output crashes on a character cp1252 cannot encode, such as an emoji in a name or chat-derived log line, or →. It happens when stdout is a pipe (a terminal pipe, the interview skill reading the output, a test).

Cause

plugins/planning/shared/share.py prints its JSON with ensure_ascii=False, and the logs --summary text as-is. When stdout is a pipe on Windows, Python encodes it in the ANSI code page (cp1252), and an unencodable character raises UnicodeEncodeError. share.sh runs Python with -I, which ignores PYTHONUTF8. Reproduced on Linux with PYTHONIOENCODING=cp1252 and a → in a log line.

Fix

Make share.py write UTF-8 on stdout and stderr explicitly (sys.stdout.reconfigure(encoding="utf-8")), and have the tests and the skill read share.py's output as UTF-8 rather than with the locale default. Verify on the pr-test-windows lane.

Verification

A subprocess test that sets PYTHONIOENCODING=cp1252, logs a line with a non-cp1252 character, and gets exit 0 from share.py logs and logs --summary, with the character intact in UTF-8.

Activity

  1. added
    needs-triage
    on Oct 18, 2026
  2. github-actions commented on Oct 18, 2026

    @github-actions
    Contributor

    Proposed work class: work-class: scoped
    Basis: automated intake triage; the lanes App applied this class.

    Size: Small
    Complexity: Low
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Understood: share.py prints non-ASCII text, and on Windows with a piped stdout Python uses cp1252, so characters like → or emoji raise UnicodeEncodeError. The proposed fix is to reconfigure stdout and stderr to UTF-8, read the output as UTF-8 in the tests and skill, and add a subprocess test run under PYTHONIOENCODING=cp1252. The Windows lane check (pr-test-windows) can't run in this unattended lane, but the Linux reproduction can. No duplicates found among the open issues.

    Automated triage, applied by the lanes App.

  3. added and removed
    needs-triage
    on Oct 18, 2026
  4. github-actions commented on Oct 25, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (attempt 2 of 2).

  5. added
    status: ready
    needs-owner-decision
    and removed
    status: ready
    on Oct 26, 2026
  6. melodic-automation-lanes commented on Oct 26, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  7. melodic-automation-lanes commented on Oct 26, 2026

    @melodic-automation-lanes
    Contributor

    The latest triage verdict holds nothing: admission moved the issue to status: needs-decision; its comment says why.

  8. kyle-sexton commented on Oct 26, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded. The owner answered in the Refinement and Issue Triage sessions (2026-10-25), deciding the open items below on the facts:

    go with whatever the facts/data/metrics + /discovery:research says and ensure we're aligned with SOLID, DRY/SSOT principles

    I should only ever be in the loop ONLY when necessary (intent/vision changed, something came up during implementation that impacts trajectory/alignment, OR a high security risk) - I've covered this all before

    No owner ledger (.work/*/interview-checklist.md, .work/gh-monitor-owner-decisions/) names this issue, and intake posted no refinement questions.

    Closed as done. Main already does what the body asks, with the body's own verification test. Evidence on origin/main:

    Checks a person runs:

    • The pr-test-windows lane passes test_share.py on the next run that touches plugins/planning/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-owner-decision

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions