Skip to content

test: round-trip coverage for every protocol code, dumper and lossless path #1202

Closed

Description

@JarryShaw

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.

Activity

  1. added
    testPull requests that add or correct tests (test: subject prefix)
    on Oct 7, 2026
  2. JarryShaw commented on Oct 7, 2026

    @JarryShaw
    OwnerAuthor

    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.

  3. added
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 7, 2026
  4. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    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.

    Audit Issues
    link #1204–#1210
    transport #1211–#1223
    internet-v6 #1228–#1237
    internet-v4 #1312–#1329, #1349
    application #1238–#1252, #1302, #1303, #1333, #1443 (new)
    misc + pcapng #1267–#1286
    dumpkit #1255–#1266
    corekit #1274, #1288–#1296
    const / vendor / CLI #1297–#1300
    foundation #1354–#1364

    #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:

    Every other issue in the table is closed. This issue is now pending, and #1443 is the only known failure it should list.

  5. added
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 9, 2026
  6. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    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.

  7. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    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.

  8. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    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 say Refs #1202.

  9. 5 remaining items

  10. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    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:

    1. 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.
    2. Add a network-gated test. It would regenerate each module from the live sources and compare it with the committed file, but run only when opted in, so ordinary CI never depends on the network (the test(integration): pcapng end-to-end counts fail when many_interfaces.pcapng falls back to the synthesised stand-in #1478 failure mode). It would fail whenever a registry changes upstream, so it would really be a drift detector.

    The foundation and corekit slices are already being worked; neither depends on this.

  11. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    take option 1

  12. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    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.

  13. removed
    needs: decisionWaiting on the maintainer to decide — not blocked by other work
    on Oct 9, 2026
  14. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testPull requests that add or correct tests (test: subject prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions