Skip to content

Lock down lossless .6 text escaping - #3

Draft
henryoman wants to merge 5 commits into
mainfrom
agent/lock-down-text-escaping
Draft

Lock down lossless .6 text escaping#3
henryoman wants to merge 5 commits into
mainfrom
agent/lock-down-text-escaping

Conversation

@henryoman

Copy link
Copy Markdown
Contributor

What changed

  • adds table-driven format tests covering empty text, real tabs, newlines, carriage returns, backslashes, literal escape sequences, Unicode, and emoji
  • verifies malformed escape sequences fail closed
  • expands the database reopen test to prove complex chat content survives physical .6 storage exactly
  • documents that tabs are escaped losslessly and must never be normalized to spaces

Why

The runtime already escaped the structural characters correctly, but the contract coverage did not fully distinguish an actual tab from the literal two-character text \t, nor cover carriage returns, empty values, and Unicode together. This PR locks down that behavior without changing the .6 format.

Impact

Chat messages remain one physical line per committed row while decoding to the exact original text. Existing .6 files remain compatible; there is no migration or runtime behavior change.

Validation

  • git diff --check
  • verified the remote branch is five files ahead of main with no unrelated changes
  • Rust checks were not run locally because this execution environment does not include cargo; repository CI should run the pinned Rust toolchain checks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant