fix(metadata): write raw-DEFLATE appData (phase 2 of format convergence)#93
Merged
Conversation
ApprovabilityVerdict: Approved Format convergence change switching compression output from zlib-wrapped to raw DEFLATE to match iOS/Android. Backward compatible (dual-format reader remains), well-tested, and authored by the same person who implemented phase 1 of this convergence. You can customize Macroscope's approvability policy. Learn more. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of the appData compression-format convergence (phase 1: #91).
compressIfSmallernow emits raw DEFLATE (deflateRawSync) — the format iOS (COMPRESSION_ZLIB) and Android (Deflater(nowrap=true)) have always written and are the only format old installed apps can read natively.deflateSync→deflateRawSync; frame ([0x1f][size BE4]) unchanged.main(serve.ts,send-attachment.ts—{}vsboolean) are untouched by this diff (metadata.ts + test only).Rollout gate — met
Requires every server-side reader to have the #91 dual reader before merge:
convos-cli@0.10.13(verified: prod herald running convos-assistants97e5749, which pins 0.10.13) ✅Draft until Andrew confirms merge timing. After this releases + the pin bump, the fleet writes one format and the zlib path becomes read-only legacy.
🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Write appData compressed bodies as raw DEFLATE with zlib fallback reader
compressIfSmallerin metadata.ts to usedeflateRawSyncinstead ofdeflateSync, so new compressed blobs use raw DEFLATE framing rather than zlib-wrapped DEFLATE.decompressIfNeededto tryinflateRawSyncfirst and fall back toinflateSyncfor historic zlib-wrapped blobs, surfacing the raw-inflate error if both fail.Macroscope summarized b343767.