feat: add DIG_MESSAGE opcode const (220) for directed dig-message envelopes#3
Merged
Merged
Conversation
…elopes Additive public const `DIG_MESSAGE: u8 = 220` — the canonical wire opcode for a directed dig-message envelope (first of the free 220-255 band; 200-219 stay the consensus band, DigMessageType). The envelope rides as OPAQUE bytes in DigMessage.data; the transport never seals/opens it (WU6 of epic #796, Wave A). Release-first: this exposes the canonical const to the Wave-A/B dig-message consumers (dig-gossip mirrors it as ProtocolMessageTypes::DigMessage + dig_gossip::DIG_MESSAGE; dig-relay-protocol #874, dig-ipc-protocol #1074, ...). MINOR bump 0.1.2 -> 0.2.0. Refs #1164 #796 Co-Authored-By: Claude <noreply@anthropic.com>
MichaelTaylor3d
commented
Jul 19, 2026
MichaelTaylor3d
left a comment
Contributor
Author
There was a problem hiding this comment.
PASS (loop-reviewer, fresh context).
Verified against the WU6/#1164 acceptance criteria:
- Additive-only —
pub const DIG_MESSAGE: u8 = 220is the first opcode of the free220..=255band; the200..=219consensus band (DigMessageType, RegisterPeer=218/RegisterAck=219) is untouched. No renumber/repurpose of any existing type (§5.1 satisfied). Doc-comment is intent-revealing and states the OPAQUE-envelope + e2e-sealing-is-dig-message's-job contract (§5.4). - Tests —
dig_message_opcode_frames_and_round_tripsexercises 220 through the real encoder with msg_type intact;dig_message_opcode_is_not_a_consensus_typeproves 220 is not aDigMessageTypediscriminant (bands can't collide). Coverage gate green. - Version — 0.1.2 → 0.2.0 MINOR is correct for a new public API (§2.4).
- Gates — fmt/clippy/test/docs/coverage/commitlint/version-increment all green; CodeQL clean.
- dig-constants check — protocol opcodes are canonically homed in dig-protocol (not dig-constants, which holds asset-ids/addresses/ports); this crate IS the canonical home #874/#1074 consumers reference. Correct placement.
Trivial + correct. No findings. Merge-order note: land this then publish, or land dig-gossip#7 first (it is self-contained) — either is safe.
(Recorded as --comment, not --approve: self-authored PR, 422 on self-approval; branch protection gates on green checks + zero unresolved threads, both satisfied.)
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.
Task
Additive canonical opcode const
pub const DIG_MESSAGE: u8 = 220for the directed dig-message envelope. Part of WU6 (epic #796) — the release-first sub-step exposing the canonical opcode to the dig-message adoption consumers.What changed
DIG_MESSAGE = 220— first opcode of the free220..=255band (the200..=219consensus band,DigMessageType, is untouched — §5.1 additive, no renumber).DigMessage.data; the transport never seals/opens it (end-to-end sealing is dig-message's job, §5.4).DigMessage+ round-trips withmsg_typeintact; 220 is not a consensusDigMessageType.Blast radius
Purely additive public API — no existing symbol touched. Consumers reference
dig_protocol::DIG_MESSAGE(dig-gossip mirrors it asProtocolMessageTypes::DigMessage+dig_gossip::DIG_MESSAGE; dig-relay-protocol #874, dig-ipc-protocol #1074, ...).Version
MINOR bump 0.1.2 → 0.2.0 (new public API).
Refs #1164 #796
🤖 Generated with Claude Code