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
Reorder protocol class members to the member-order convention #2490
Reorder protocol class members on main to the member-order convention. Ruled by the owner: HTTP v1 is a violation; dunders (__init__, __new__, __post_init__, __index__, __length_hint__, and the rest) are Data Models; the old protocols (IPv4, TCP, UDP, ARP, Ethernet, IPv6) are the reference.
Order inside a protocol class body: properties, public methods (id, read, make, register_*), dunders (Data Models), then utilities (_read_xxx before its _make_xxx).
Dispatched now; the Actions queue is below the hold line. The worker re-audits current main, makes one branch per file group, and AST-checks each as a pure reorder. Files that other streams are editing right now are deferred until those land: the LinuxSLL/ARPHRD link files, IGMP, the checksum protocols, DTLS, and IPX/Loopback/SCTP for the registry work.
Decisions needed for the rest of this issue. protocol-member-order.rst does not settle these:
Helpers that neither read() nor make() calls and no registry reaches (e.g. HTTPv1._decode_text, PCAPNG._check_block_floor, IPv6._exthdr_key): where do they go? Options: (a) last in Utilities, (b) next to their first caller. Recommendation: (a).
Rule c, ordering specific readers and makers by enum value, is not applied anywhere yet. Options: (a) apply it, with the registry default first, as IPv4 has it; (b) drop rule c for registry-table order. Recommendation: (a), in its own PRs.
Registry fallbacks that read()/make() name directly (_read_*_unknown) were treated as specific readers, as refactor(protocols): order application protocol members #2491's review did. Options: confirm that, or file them as helpers. Recommendation: confirm, and write it on the page.
ARP, a reference protocol, is reordered on Reorder protocol class members to the member-order convention #2490's link branch, because its read/read/make/make layout breaks rule b. Options: keep the change, or drop it and record ARP as an exception. Recommendation: keep.
A guard test that runs the group-order audit with a known-exceptions table. Recommendation: add it now; the reviewer showed it can go green with the deferred files listed.
A helper that neither read() nor make() calls and no registry reaches goes last in Utilities.
Rule c applies: specific readers and makers in enum-value order, with the registry default first, as IPv4 has it. It lands in its own PRs.
Registry fallbacks that read()/make() name directly (_read_*_unknown) count as specific readers, and the page says so.
ARP's reorder on the link branch stays.
A guard test is added now.
Reconciled: items 1, 2 and 3 are written onto protocol-member-order.rst, and item 5's guard test is dispatched now in one PR. That guard carries a known-exceptions table, so it passes on main today and keeps passing as #2522, #2523 and the held link/misc branches merge. Applying item 1's moves and rule c is another mechanical reorder of the same files, so it follows in its own PRs once the in-flight streams release them (the checksum, TLS, HTTP, IGMP and link streams).
Re-sequenced: this now runs last, on a quiet tree, after #2717, #2749 and #2730. Those touch protocol modules that a member reorder would move, and the reorder can be re-run cleanly after them.
Unblocked. #2717 (#2759), #2749 (#2755) and #2730 (#2757) have all merged, and no open PR edits pcapkit/protocols/ now; #2483 only touches the changelog. A worker is applying the three remaining parts of protocol-member-order.rst on main c211805ae:
rule c: option readers in their registry's declaration order;
subgroup d: helpers that read/make do not reach go last;
registry-map entry order.
Each module gets an AST-identity proof that the reorder is pure. The guard is extended so that it checks these rules too.
Decision needed:#2765 surfaced five wording questions on protocol-member-order.rst. The PR implements the recommendations, so a ruling only adjusts the page.
A class with several registries (TCP nests MPTCP, SCTP has a block per registry, MH/PCAPNG list all readers before all makers). Rec: use the MH/PCAPNG shape, which is the page's literal "all _read_*() before all _make_*()". The guard checks only within each registry.
PCAPNG.__option__ order: namespace then value, or sorted by opt_value? Rec: namespace then value, and write that on the page.
Int keys with no enum: the page says "alphabetically". Rec: reword it to "by key value", which is what TCP already does.
The PCAP-NG Option.__enum__:Rec: out of scope, because Option.register's warning relies on its order.
The .rst member lists (e.g. IPv4's) no longer follow source order. Rec: a separate docs-only follow-up.
Activity
JarryShaw commentedon Oct 31, 2026
Held: Actions queue at 78 (well above the hold line). The member-order reorder dispatches when the queue drops below 40.
refactor(protocols): move HTTP private helpers into Utilities
refactor(protocols): order application protocol members (#2491)
JarryShaw commentedon Nov 1, 2026
Dispatched now; the Actions queue is below the hold line. The worker re-audits current main, makes one branch per file group, and AST-checks each as a pure reorder. Files that other streams are editing right now are deferred until those land: the LinuxSLL/ARPHRD link files, IGMP, the checksum protocols, DTLS, and IPX/Loopback/SCTP for the registry work.
JarryShaw commentedon Nov 1, 2026
Decisions needed for the rest of this issue. protocol-member-order.rst does not settle these:
read()normake()calls and no registry reaches (e.g.HTTPv1._decode_text,PCAPNG._check_block_floor,IPv6._exthdr_key): where do they go? Options: (a) last in Utilities, (b) next to their first caller. Recommendation: (a).read()/make()name directly (_read_*_unknown) were treated as specific readers, as refactor(protocols): order application protocol members #2491's review did. Options: confirm that, or file them as helpers. Recommendation: confirm, and write it on the page.JarryShaw commentedon Nov 1, 2026
JarryShaw commentedon Nov 1, 2026
Owner took all five recommendations, paraphrased:
read()normake()calls and no registry reaches goes last in Utilities.read()/make()name directly (_read_*_unknown) count as specific readers, and the page says so.Reconciled: items 1, 2 and 3 are written onto protocol-member-order.rst, and item 5's guard test is dispatched now in one PR. That guard carries a known-exceptions table, so it passes on main today and keeps passing as #2522, #2523 and the held link/misc branches merge. Applying item 1's moves and rule c is another mechanical reorder of the same files, so it follows in its own PRs once the in-flight streams release them (the checksum, TLS, HTTP, IGMP and link streams).
30 remaining items
JarryShaw commentedon Nov 4, 2026
Re-sequenced: this now runs last, on a quiet tree, after #2717, #2749 and #2730. Those touch protocol modules that a member reorder would move, and the reorder can be re-run cleanly after them.
JarryShaw commentedon Nov 4, 2026
Unblocked. #2717 (#2759), #2749 (#2755) and #2730 (#2757) have all merged, and no open PR edits
pcapkit/protocols/now; #2483 only touches the changelog. A worker is applying the three remaining parts ofprotocol-member-order.rston mainc211805ae:read/makedo not reach go last;Each module gets an AST-identity proof that the reorder is pure. The guard is extended so that it checks these rules too.
JarryShaw commentedon Nov 4, 2026
Decision needed: #2765 surfaced five wording questions on
protocol-member-order.rst. The PR implements the recommendations, so a ruling only adjusts the page._read_*()before all_make_*()". The guard checks only within each registry.PCAPNG.__option__order: namespace then value, or sorted byopt_value? Rec: namespace then value, and write that on the page.Option.__enum__: Rec: out of scope, becauseOption.register's warning relies on its order..rstmember lists (e.g. IPv4's) no longer follow source order. Rec: a separate docs-only follow-up.refactor(protocols): order option readers, unreachable helpers and re…
JarryShaw commentedon Nov 4, 2026
Closed by #2765. The five wording questions above were not ruled on before it merged, so they moved to #2772, which keeps
needs: decision.docs(changelog): fold #2764, #2765, #2766 and #2767 (#2449)