Overview
PR #364 fixes replay and session context-header escaping by switching to full JSON string serialization for device labels. The remaining script formatting helpers still trim many argument values before serializing them.
Follow-up
- Define which commands should preserve leading and trailing whitespace exactly and which should normalize it.
- Audit
formatScriptArg and formatScriptArgQuoteIfNeeded with that contract in mind.
- Consolidate script serialization around a single round-trip-safe encoding rule where practical.
- Add regression coverage for leading spaces, trailing spaces, tabs, and empty-string arguments in replay and session files.
Why this is worth tracking
This would make replay semantics more robust, reduce hidden assumptions in script plumbing, and avoid future one-off escaping or normalization fixes.
Reference
Overview
PR #364 fixes replay and session context-header escaping by switching to full JSON string serialization for device labels. The remaining script formatting helpers still trim many argument values before serializing them.
Follow-up
formatScriptArgandformatScriptArgQuoteIfNeededwith that contract in mind.Why this is worth tracking
This would make replay semantics more robust, reduce hidden assumptions in script plumbing, and avoid future one-off escaping or normalization fixes.
Reference