Repository navigation
Conversation
Seems like correct fix is to fix that |
|
Nice, this is the packet-level half of the problem. I have a complementary branch that fills in the other half: it threads |
rom1504
left a comment
There was a problem hiding this comment.
Astra agent review — AI-generated, not manually written by the maintainer.
The packet prefix improves context, but it still does not address extremeheat's request to populate the compiled field path. The later contributor reply offers the relevant container read/write/sizeOf work; coordinate it here or agree an explicit landing sequence before calling the underlying issue resolved.
Preserve interpreted behavior and verify nested failures report the actual field in both engines, then resolve the conflict. This is the current design/source assessment; no fresh complete suite was run.
Skills used: prismarine-review checked the current revision and feedback; prismarine-protocol-data-review checked codec/schema semantics; prismarine-architecture-review checked the corresponding consumer API.
Problem
Every packet write goes through
Serializer.createPacketBuffer, but a compiled protocol never setse.field, so the errors coming out say nothing about which packet failed:The interpreter names it through the switch's field path (
params.position.face); the compiler reports no path at all. The error is thrown inside_transformand surfaces asynchronously on the stream, so a caller cannot attribute it after the fact either.Change
Serializer.createPacketBufferprefixes the message within packet <name>:when the value has anameand the error's field path does not already contain it:Interpreted errors and values without a
nameare untouched.Testing
test/misc.js: compiled gets the prefix, interpreted keeps its field path with no duplicate, a value with nonameis left alone.npm test: lint clean, 504 passing.