fix(planning): write share.py output as UTF-8 so Windows pipes don't crash on non-cp1252 text
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu với plugins/planning/shared/share.py và các kiểm thử subprocess tương ứng; issue nêu vấn đề mã hóa stdout và stderr, cùng các lần đọc phụ thuộc vào locale trong kiểm thử. Tái hiện bằng PYTHONIOENCODING=cp1252 và một dòng log chứa ký tự như →, sau đó kiểm tra đầu ra của logs và logs --summary. Hoàn tất khi cả hai lệnh chạy thành công và giữ nguyên ký tự dưới dạng UTF-8; xác minh trên lane pr-test-windows.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Shell
- Star
- 22
- Fork
- 2
- Merge trung bình
- 8 giờ 44 phút
- Pull request đã merge (30 ngày)
- 926
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của melodic-software/claude-code-plugins
-
status: ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
melodic-software/claude-code-plugins#8537 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: medium status: confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melodic-software/claude-code-plugins#8507 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
melodic-software/claude-code-plugins#8476 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: security needs-human priority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
melodic-software/claude-code-plugins#8472 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pr-pipeline: show a thread's review commit and outdated state in address-feedback list outputĐang mởpriority: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
melodic-software/claude-code-plugins#8434 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của melodic-software/claude-code-plugins
Issue tương tự
-
Agents panel: Codex token stats always empty because Codex now writes `*.jsonl.zst` sessionsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 2 ngày
-
headers-parser: `forRegExp` does not escape regexp characters in path segments that contain `*`Có thể đã có người làm @RaphaelFakhri đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
mattpocock/skills#1307 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
vladmandic/sdnext#5161 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
severity: low
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 89/100
luainkernel/lunatik#1980 ·
Maintainer thường phản hồi trong vòng 1 ngày