refactor: consolidate play packet routing into a declarative descriptor table - #554
Draft
carabistouflette wants to merge 1 commit into
Draft
Conversation
…or table The five dispatch sites for scheduled serverbound play packets (decode, execution class, pre-join gate, domain-handshake gate, and handler invocation) previously lived in separate hand-maintained matches and could drift independently. They are now consolidated into one PLAY_PACKET_DESCRIPTORS table of PlayPacketDescriptor entries: - decode closures produce the ScheduledPlayPacketKind from the payload - execution closures keep the audited per-kind (and per-action for PlayerCommand/PlayerAction) concurrency classes, including their comments - gate flags replace the hand-maintained before-join and domain-handshake id lists; immediate packets (keep alive, ping, chunk batch) keep their dedicated decode path - ScheduledPlayPacket carries its resolved descriptor, so execution, gates, and handler dispatch are single lookups decode_play_packet shrinks to an immediate-packet match plus one descriptor lookup. Classification and routing tests are preserved through the new descriptor-based construction.
carabistouflette
force-pushed
the
pr10-play-descriptor-table
branch
from
August 29, 2026 01:08
fe6fd50 to
297b85e
Compare
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.
Type of change
Description
Consolidates the five dispatch sites for scheduled serverbound play packets —
decode_play_packet,execution(),can_process_before_join,can_process_during_domain_handshake, andhandle()— into a single declarativePLAY_PACKET_DESCRIPTORStable ofPlayPacketDescriptorentries (id, decode fn, execution class, join gates, handler fn). Previously these lived in five hand-maintained matches that could drift independently (e.g. adding a packet to decode but forgetting its concurrency class).ScheduledPlayPacketcarries its resolved descriptor, so execution class, gates, and handler dispatch are single lookups resolved once at decode time.decode_play_packetshrinks to an immediate-packet match plus one descriptor lookup.How this was tested
cargo test -p steel-core --lib connection::java(15 tests) andcargo test -p steel-core --lib(2422 tests);cargo clippy -r --all-targetsclean.Screenshots / logs
N/A.
Checklist
Additional notes