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
test: round-trip coverage for every protocol code, dumper and lossless path #1202
Goal
Make every round trip the library promises a tested invariant, so that a mismatch fails CI instead of turning up in review. This follows the owner's ruling that every round trip must pass and match exactly.
Scope
Each new path below sits alongside the registry-driven construct → parse → construct cycle that already exists in tests/protocols/test_option_roundtrip_unit.py.
Capture-driven parse → rebuild: for every layer of every frame in examples/captures/*, Cls.from_data(layer.info).data == layer bytes.
Protocol edge cases: minimum and maximum lengths, reserved bits set, zero-length values, padding variants, unassigned codes.
Dumpers:format='pcap' output is byte-identical to its input, and json/plist/tree dumps are complete and deterministic.
Foundation: reassembly recovers the original payload, traceflow output re-reads to exactly its frames, every offline engine agrees, and registry register/unregister is symmetric.
corekit: Field and Schema pack/unpack are symmetric, and Info ↔ dict round-trips.
const/vendor: each crawler regenerates its const module byte-identically from the offline snapshots.
Every case that still fails is listed with the issue that tracks it, in the same way as EXPECTED_FAILURES. A case not on that list must pass.
Depends on
The ten round-trip audits now running, one per protocol family plus dumpkit, foundation, corekit and const/vendor/CLI. Their defects get filed first, so the known-failure tables can cite real issue numbers.
#1443 was the one gap: unassigned FTP reply codes and HTTP status codes raise EnumValueError, so those replies cannot be parsed. I re-ran it on 78991b7d5 and filed it today.
Three other findings I checked on main are already fixed:
PR #1445 covers the first two parts of the scope: capture-driven parse→rebuild (20,501 subtests) and the dumper checks (1,725 subtests). It found three new mismatches, now filed as #1446, #1447 and #1448. The PR says Refs, so this issue stays open for the parts still to do: protocol edge cases, foundation, corekit pack/unpack, and const/vendor. That last part first needs a decision on where offline crawler snapshots should live.
Recorded: the owner does not want offline crawler snapshots committed, so the const/vendor part will not use them.
That leaves one choice for that part:
Drop it from this issue (recommended).cron-vendor.yml already runs every crawler against the live sources each Saturday and commits any regenerated const module. The per-crawler tests in tests/vendor/ already cover the parsing. A byte-identical check would need either snapshots or the network.
Recorded: the owner chose option 1, so the const/vendor part is out of this issue's scope. The owner also ruled that when a crawler fails, its const enum is simply left as it is. cron-vendor.yml already works that way: a target that exits non-zero leaves its const file unchanged, and only the targets that succeeded are committed.
That leaves two parts here, both being worked, and each will be its own Refs #1202 PR:
foundation: reassembly, traceflow re-read, engine agreement, and registry symmetry;
corekit: Field and Schema pack/unpack, and Info ↔ dict.
This issue closes once both have merged and any defect they find has its own issue.
Activity
JarryShaw commentedon Oct 7, 2026
Blocked until the ten round-trip audits have reported and every defect they found is filed. I will post the issue list here when that is done.
JarryShaw commentedon Oct 9, 2026
Unblocked. All ten round-trip audits reported on 2026-10-07, between 17:19Z and 19:16Z, and every defect they found is now filed.
#1443 was the one gap: unassigned FTP reply codes and HTTP status codes raise
EnumValueError, so those replies cannot be parsed. I re-ran it on78991b7d5and filed it today.Three other findings I checked on
mainare already fixed:StringFieldencoding, by fix(corekit): StringField is not lossless: guessed charset, U+FFFD substitution, and a character-count length #1336, which madeStringFieldlossless;Every other issue in the table is closed. This issue is now
pending, and #1443 is the only known failure it should list.JarryShaw commentedon Oct 9, 2026
A worker is on it now, on branch
test/1202-roundtrip-coverage. This is test-only work: any new mismatch it finds will be filed as its own issue.JarryShaw commentedon Oct 9, 2026
PR #1445 covers the first two parts of the scope: capture-driven parse→rebuild (20,501 subtests) and the dumper checks (1,725 subtests). It found three new mismatches, now filed as #1446, #1447 and #1448. The PR says
Refs, so this issue stays open for the parts still to do: protocol edge cases, foundation, corekit pack/unpack, and const/vendor. That last part first needs a decision on where offline crawler snapshots should live.test: capture-driven parse→rebuild and dumper round trips (#1202)
JarryShaw commentedon Oct 9, 2026
A second worker has started on the protocol edge-case slice, on branch
test/1202-protocol-edge-cases. It is test-only and its PR will sayRefs #1202.test: capture-driven parse→rebuild and dumper round trips (#1202) (#1445
test(protocols): edge-case round trips for every layer family (#1202)
5 remaining items
JarryShaw commentedon Oct 9, 2026
Recorded: the owner does not want offline crawler snapshots committed, so the const/vendor part will not use them.
That leaves one choice for that part:
cron-vendor.ymlalready runs every crawler against the live sources each Saturday and commits any regenerated const module. The per-crawler tests intests/vendor/already cover the parsing. A byte-identical check would need either snapshots or the network.The foundation and corekit slices are already being worked; neither depends on this.
JarryShaw commentedon Oct 9, 2026
take option 1
JarryShaw commentedon Oct 9, 2026
Recorded: the owner chose option 1, so the const/vendor part is out of this issue's scope. The owner also ruled that when a crawler fails, its const enum is simply left as it is.
cron-vendor.ymlalready works that way: a target that exits non-zero leaves its const file unchanged, and only the targets that succeeded are committed.That leaves two parts here, both being worked, and each will be its own
Refs #1202PR:Info↔ dict.This issue closes once both have merged and any defect they find has its own issue.
test(corekit): field, schema and Info round trips (#1202)
test(corekit): field, schema and Info round trips (#1202) (#1492)
test(foundation): reassembly, traceflow, engine and registry round tr…
test(foundation): reassembly, traceflow, engine and registry round tr…
test(foundation): reassembly, traceflow, engine and registry round tr…
test(foundation): reassembly, traceflow, engine and registry round tr…
test(foundation): reassembly, traceflow, engine and registry round tr…
test(foundation): reassembly, traceflow, engine and registry round tr…
JarryShaw commentedon Oct 9, 2026
Both parts have merged, so this issue is complete:
Info↔ dict round trips, in test(corekit): field, schema and Info round trips (#1202) #1492.The const/vendor part was dropped from scope by the owner's earlier ruling.
Every defect these PRs found has its own issue, recorded as a known-failure row that a fix PR must delete: