checksum last seen messages in acknowledgement order - #1521
Pix3lPirat3 wants to merge 2 commits into
Conversation
extremeheat
left a comment
There was a problem hiding this comment.
Cool, did you test against the server side impl also? We implement both sides
…t logic added a loopback integration test using node-minecraft-protocol's real server and client. It rotates the 20-message history, sends a standalone acknowledgement, verifies that a correctly checksummed/signed message is accepted, then changes only the next checksum and verifies that the server rejects it.
Use the circular buffer's logical traversal for both acknowledgement bits and the checksum so wrapped chat histories stay synchronized with the server.
…t logic added a loopback integration test using node-minecraft-protocol's real server and client. It rotates the 20-message history, sends a standalone acknowledgement, verifies that a correctly checksummed/signed message is accepted, then changes only the next checksum and verifies that the server rejects it.
5cc0d89 to
c4da904
Compare
|
Added a real server test as you suggested: "accepts valid and rejects invalid wrapped acknowledgements between a protocol client and server" spins up mc.createServer and mc.createClient, has the client send signed chat, and checks the server both accepts a valid wrapped acknowledgement checksum and rejects a tampered one. It runs across 1.21.9, 1.21.11 and 26.1 alongside the existing checksum-ordering unit tests (18 passing). The same follow-up commit also fixed the last-seen ordering logic the unit test caught. |
rom1504
left a comment
There was a problem hiding this comment.
Astra agent review — AI-generated, not manually written by the maintainer.
The updated test now addresses the requested client/server coverage: I ran all 18 acknowledgement tests successfully, including the real local NMP connection accepting wrapped acknowledgements and rejecting a tampered checksum. I also traced the shared acknowledgement order through both command/chat construction and the server's pending-message window. No additional blocker found in this review of c4da904; I did not run a vanilla server or the full repository suite.
Skills used: prismarine-protocol-data-review checked both production endpoints and the negative control; prismarine-review checked that the later implementation addresses extremeheat's original fixture request instead of repeating it.
Use the circular buffer's logical traversal for both acknowledgement bits and the checksum so wrapped chat histories stay synchronized with the server.