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(corekit): BitField packs every bit its namespace does not name as zero (shared root of the per-protocol reserved-bit issues) #1288
Describe the bug BitField.pre_process starts from an all-zero buffer (pcapkit/corekit/fields/strings.py:232) and only writes named subfields, so any uncovered bit is lost on pack. This is the shared root of #1199, #1207, #1211, #1212, #1221, #1235 and #1246. Counting BitFields in pcapkit/protocols/schema whose namespace leaves bits uncovered gives 70 (mh 28, tcp 14, hip 5, httpv2 4, hopopt 4, ipv6_opts 4, ipv4 3, sctp 3, pcapng 2, ipv6_frag 1, ipv6_route 1, l2tp 1).
Expected behavior
Either post_process keeps the uncovered bits under a hidden key that pre_process ORs back, or each site names them as reserved. A fix at the field fixes all the per-protocol reports at once.
Found by the corekit round-trip audit (#1202). The repro was re-checked by an independent verifier, and I re-ran it on main at 11ae68ebf.
Blocked until the per-protocol reserved-bit PRs land (#1226, #1253, #1254 and the IPv6 and HTTP/2 wave PRs). This issue then closes with an invariant test that every BitField namespace covers all of its bits.
#1226, #1253 and #1254 have merged. Still blocked until#1235 closes: its remaining HOPOPT/IPv6-Opts reserved-bit sites (MPL, IP_DFF, Quick-Start) have a worker on them now.
#1416 adds the invariant test. Its KNOWN_GAPS allowlist holds the 27 sites still unfixed: HIP 3 (#1417) and MH 24 (#1418), both now being worked. This issue closes once that allowlist is empty.
Done: #1416's KNOWN_GAPS allowlist is now empty on main (949b0a900, test-only). #1419 (HIP) and #1421 (MH) merged after #1416, so the exact-match assertion was failing on 02ee60a71. With the empty allowlist it passes (3 tests OK), and re-adding a single entry makes it fail again.
Activity
JarryShaw commentedon Oct 7, 2026
Blocked until the per-protocol reserved-bit PRs land (#1226, #1253, #1254 and the IPv6 and HTTP/2 wave PRs). This issue then closes with an invariant test that every BitField namespace covers all of its bits.
JarryShaw commentedon Oct 8, 2026
#1226, #1253 and #1254 have merged. Still blocked until #1235 closes: its remaining HOPOPT/IPv6-Opts reserved-bit sites (MPL, IP_DFF, Quick-Start) have a worker on them now.
JarryShaw commentedon Oct 8, 2026
Unblocked: #1235 is closed (every site already round-trips on
ec2ba13a4). A worker is on the invariant test now.JarryShaw commentedon Oct 8, 2026
#1416 adds the invariant test. Its
KNOWN_GAPSallowlist holds the 27 sites still unfixed: HIP 3 (#1417) and MH 24 (#1418), both now being worked. This issue closes once that allowlist is empty.fix(mh): keep the reserved bits of 24 BitField flag namespaces on reb…
test(schema): empty the BitField KNOWN_GAPS allowlist (#1288)
JarryShaw commentedon Oct 8, 2026
Done: #1416's
KNOWN_GAPSallowlist is now empty onmain(949b0a900, test-only). #1419 (HIP) and #1421 (MH) merged after #1416, so the exact-match assertion was failing on02ee60a71. With the empty allowlist it passes (3 tests OK), and re-adding a single entry makes it fail again.