protocol: add PAYLOAD_VER_3 and PAYLOAD_VER_4 constants for upstream parity#67
Merged
Merged
Conversation
…parity Upstream meshcore-dev/MeshCore Packet.h defines four payload-version constants (PAYLOAD_VER_1..PAYLOAD_VER_4); pyMC_core currently exposes only the first two. Downstream tooling that diffs the PH_* / PAYLOAD_VER_* sets against pinned upstream Packet.h flags PAYLOAD_VER_3 (0x02) and PAYLOAD_VER_4 (0x03) as upstream-only. Add both as named constants alongside PAYLOAD_VER_2, marked as 'Reserved for future use' to match how PAYLOAD_VER_2 is already treated. No behavioral change: MAX_SUPPORTED_PAYLOAD_VERSION is unchanged, so Packet.read_from() continues to accept only versions 0-1; the new constants only provide stable names for the reserved version values. Co-Authored-By: Oz <oz-agent@warp.dev>
Contributor
Author
|
housekeeping @rightup |
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
Upstream meshcore-dev/MeshCore
src/Packet.hdefines four payload-version constants:src/pymc_core/protocol/constants.pycurrently only exposes the first two. Downstream tooling that diffs thePH_*/PAYLOAD_VER_*sets against a pinnedPacket.hflags the missing entries as upstream-only:Change
Add
PAYLOAD_VER_3 = 0x02andPAYLOAD_VER_4 = 0x03directly afterPAYLOAD_VER_2, with the same# Reserved for future usecomment style already used forPAYLOAD_VER_2. They are treated exactly likePAYLOAD_VER_2: defined as named constants, not exported inprotocol/__init__.py(which already omitsPAYLOAD_VER_2), and not added toMAX_SUPPORTED_PAYLOAD_VERSION.Behavior
No runtime change.
MAX_SUPPORTED_PAYLOAD_VERSIONis unchanged, soPacket.read_from()continues to reject versions > 1 (raise ValueError("Unsupported packet version: ...")insrc/pymc_core/protocol/packet.py). The new constants only provide stable names for the version values that upstream already reserves.Scope
Single file, two lines added, additive only. No test changes required (these constants have no behavior of their own and existing tests cover the unchanged
MAX_SUPPORTED_PAYLOAD_VERSIONboundary).Co-Authored-By: Oz oz-agent@warp.dev
Generated with Warp