You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(schema): a SchemaField's unread octets are lost through from_data, so a direct SchemaField rebuilds zero-filled #1380
Split from #1292 after the #1374 cross-review. #1374 makes a directly declared SchemaField pack its whole declared span, so the parse → pack round trip is byte-exact: 0302eeee04 rebuilds as 0302eeee04. The parse → from_data round trip still loses the unread octets. Out2.from_dict(o.to_dict()).pack() gives 0302000004. The length is consistent, but the octets the inner schema did not read are zero-filled.
The cause is that Protocol.from_data (protocols/protocol.py:799-847) runs Data.from_dict → _make_data → __init__ → make. That path builds a fresh schema that was never unpacked, so there are no unread octets to re-emit, and the data model has no slot that carries them.
Scope: none of the 446 shipped schema classes declares a SchemaField directly or behind a static ConditionalField. Every library SchemaField sits behind a SwitchField or is a ListField item. This affects user-defined schemas only.
Fix: carry the unread remainder through the data model, e.g. a remainder key in to_dict(), and re-emit it on build, as #1344 did for IPv4 option padding and #1348 for TCP. Then update #1374's test_schema_field_keeps_declared_width, which currently pins 0302000004.
Still blocked, now on a different PR.#1374 has merged, but this fix edits Protocol.from_data in protocols/protocol.py, and #1395 (the fix that turns main green again, #1394) edits the same file. Blocked until#1395 merges.
Activity
fix(schema): Schema.pack keeps option padding, SchemaField spans and …
fix(schema): Schema.pack keeps option padding, SchemaField spans and …
JarryShaw commentedon Oct 8, 2026
Still blocked, now on a different PR. #1374 has merged, but this fix edits
Protocol.from_datainprotocols/protocol.py, and #1395 (the fix that turnsmaingreen again, #1394) edits the same file. Blocked until #1395 merges.JarryShaw commentedon Oct 8, 2026
Unblocked: #1395 has merged, and no open PR now edits
protocols/protocol.py. A worker is starting on it.fix(schema): a SchemaField's unread octets are lost through from_data…