Skip to content

Preserve significant whitespace in replay and session script serialization #366

@thymikee

Description

@thymikee

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions