Repository navigation
fix(output): escape external terminal controls without mutating JSON - #255
Conversation
|
Review follow-up implemented in Paired-device list/send rendering now uses a display-only sanitized copy of Receiver response fields. JSON keeps the original bytes, outgoing message bodies remain unchanged, and renderer-owned line breaks remain separate. Offline device fixtures cover C0/C1/OSC status/session fields, guidance and failure reasons. Verified: 18 related human/device-output/generation tests. The local integration retains both |
|
Optional consistency improvement addressed in The integration retains |
Summary
Escape C0, DEL and C1 controls in human-facing external fields before rendering, preserving ordinary Unicode and renderer-owned line breaks. Cover list, doctor, send, update/notices and CLI/SSH errors without changing JSON or outgoing message bodies.
Closes #239
Type
Checklist
Verified against
Python 3.13.7, macOS arm64: independently reran 13 new human-output tests. OSC52/OSC8/CSI/C1/BEL, column alignment, stderr, argparse, Unicode, exact JSON bytes and unchanged outgoing bodies covered. Worker core and adapter suites also passed. Independent read-only review completed.
Notes
Untrusted exception-message line breaks are deliberately escaped; renderer formatting remains separate. JSON bytes retain the existing contract, including its existing Unicode behavior: this is not a promise that raw JSON is safe to render as terminal text. Bidi/zero-width spoofing is not addressed. Draft only, no merge/release/deployment.