Skip to content

feat(messages): add the uncompressed data size to QueryOk - #228

Merged
mo4islona merged 1 commit into
mainfrom
feat/query-ok-uncompressed-size
Oct 23, 2026
Merged

mo4islona merged 1 commit into
mainfrom
feat/query-ok-uncompressed-size

Conversation

@mo4islona

Copy link
Copy Markdown
Contributor

Adds optional uint64 uncompressed_data_size = 4 to QueryOk: the size of data before compression. A portal can now get the raw size of a result without decompressing it.

Wire compatibility:

  • The field is outside the signature, so portals that predate it still verify results that carry it. A new test, uncompressed_size_is_outside_signature, pins this.
  • It is optional, so a portal can tell a worker that does not send it from an empty result.
  • Field number 4 was never used in QueryOk.

QueryFinished::new keeps data.len() for QueryOkSummary.uncompressed_data_size. Switching it to the new field is a separate change.

Rust API: QueryOk gains a field, so struct literals need it (or ..Default::default()).

🤖 Generated with Claude Code

The portal needs the size of a result before compression, and it should not
have to decompress the data to get it. The field stays out of the signature,
so portals that predate it still verify results that carry it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mo4islona
mo4islona merged commit f41e6b1 into main Oct 23, 2026
3 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.

1 participant