Skip to content

fix(android): escape backup JSON controls - #1471

Merged
ryanbr merged 1 commit into
ryanbr:mainfrom
bhelm:fix/issue-86-backup-provenance-json-escaping
Aug 20, 2026
Merged

fix(android): escape backup JSON controls#1471
ryanbr merged 1 commit into
ryanbr:mainfrom
bhelm:fix/issue-86-backup-provenance-json-escaping

Conversation

@bhelm

@bhelm bhelm commented Aug 19, 2026

Copy link
Copy Markdown

Summary

  • escape every JSON C0 control character in Android backup provenance strings
  • preserve named escapes for backspace, form feed, newline, carriage return, and tab, with canonical lower-case \u00xx escapes for the remaining controls
  • retain sorted keys, numeric literals, and ordinary manifest/version-event output
  • add mirrored Swift and Android byte-contract tests plus Android JSON roundtrip coverage

Normal production values remain build-controlled; the affected inputs require custom/tampered metadata or direct helper use. This keeps the operational scope bounded while restoring the public byte-parity and valid-JSON contract.

Verification

  • Swift canonical control: 5/5 passed
  • Kotlin RED: 5 tests, exactly 2 expected failures for named controls and the complete C0 corpus
  • Kotlin focused GREEN: 5/5 passed
  • Kotlin fullDebug: 4,093 tests, 0 failures
  • Android full :app:test: 16,372 tests across four variants, 0 failures
  • Swift full WhoopStore: 391 tests, 0 failures
  • independent frozen-delta review: no P0/P1 findings; functional PASS
  • git diff --check: clean

Android execution was serial and bounded: JDK 17, no daemon, one worker, no parallel execution, Kotlin in-process, 1536 MiB heap. Temporary Linux-only Swift build gates were fully reverted before commit. Machine-readable RED/GREEN hash manifests were retained outside the worktree.

Provenance: upstream PR #1422 (d9aae8cb).
Tracks bhelm#86

@ryanbr
ryanbr merged commit 27484c3 into ryanbr:main Aug 20, 2026
14 checks passed
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.

2 participants