Skip to content

Refine Protobuf encoding and decoding - #990

Merged
Kyle-Ye merged 1 commit into
mainfrom
optimize/protobuf
Aug 15, 2026
Merged

Refine Protobuf encoding and decoding#990
Kyle-Ye merged 1 commit into
mainfrom
optimize/protobuf

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Aug 15, 2026

Copy link
Copy Markdown
Member

Summary

  • add fast paths for single-byte varints and short length-delimited fields
  • make UInt64 the canonical unsigned decode path and keep signed decoding on the full-width varint path
  • reject truncated fixed-width fields instead of silently accepting them
  • expand boundary and malformed-input coverage

@Kyle-Ye
Kyle-Ye marked this pull request as ready for review August 15, 2026 07:22
@github-actions github-actions Bot added area: data-flow State, binding, environment, preference, observation, or property data flow. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. type: maintenance Refactor, cleanup, dependency bump, NFC, or internal maintenance. labels Aug 15, 2026
@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.29268% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 14.31%. Comparing base (79f67f5) to head (6c5afca).
⚠️ Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
...penSwiftUICore/Data/Protobuf/ProtobufDecoder.swift 73.46% 13 Missing ⚠️
...penSwiftUICore/Data/Protobuf/ProtobufEncoder.swift 58.06% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #990      +/-   ##
==========================================
- Coverage   14.52%   14.31%   -0.21%     
==========================================
  Files         687      691       +4     
  Lines       46292    48892    +2600     
==========================================
+ Hits         6724     6999     +275     
- Misses      39568    41893    +2325     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye
Kyle-Ye merged commit 3254c0e into main Aug 15, 2026
3 of 10 checks passed
@Kyle-Ye
Kyle-Ye deleted the optimize/protobuf branch August 15, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: data-flow State, binding, environment, preference, observation, or property data flow. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. type: maintenance Refactor, cleanup, dependency bump, NFC, or internal maintenance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant