Skip to content

net - #1752

Open
daniel-noland wants to merge 10 commits into
pr/daniel-noland/spec-toolingfrom
pr/daniel-noland/fuzz-net-headers
Open

net#1752
daniel-noland wants to merge 10 commits into
pr/daniel-noland/spec-toolingfrom
pr/daniel-noland/fuzz-net-headers

Conversation

@daniel-noland

@daniel-noland daniel-noland commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 14584f83-c04d-421b-8c80-4dba1aaecc05

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/spec-tooling branch from 0ea0d48 to 5b72388 Compare August 26, 2026 17:30
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch from f5188c3 to 75fbc59 Compare August 26, 2026 17:30
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.82179% with 28 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
net/src/headers/embedded.rs 91.20% 6 Missing and 2 partials ⚠️
net/src/headers/view.rs 94.21% 4 Missing and 3 partials ⚠️
net/src/headers/embedded_view.rs 96.53% 4 Missing and 2 partials ⚠️
net/src/headers/within.rs 93.22% 3 Missing and 1 partial ⚠️
net/src/headers/mod.rs 98.75% 1 Missing and 1 partial ⚠️
net/src/headers/pat.rs 99.63% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch from 75fbc59 to 8086c9c Compare August 26, 2026 19:36
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/spec-tooling branch 2 times, most recently from 671b989 to b687ddd Compare August 26, 2026 20:41
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch 2 times, most recently from dd9b98e to 83d440b Compare August 26, 2026 21:02
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/spec-tooling branch from 069153b to d80fe2d Compare August 26, 2026 21:13
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch from 83d440b to bbcc339 Compare August 26, 2026 21:13
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/spec-tooling branch 3 times, most recently from 3d5b3de to a2e4e51 Compare August 27, 2026 01:25
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch from bbcc339 to 73933c6 Compare August 27, 2026 01:29
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/spec-tooling branch from a2e4e51 to 046ea6b Compare August 27, 2026 01:41
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch from 73933c6 to 493afc8 Compare August 27, 2026 01:41
Comment thread net/src/headers/embedded_view.rs Outdated
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch 3 times, most recently from 8bd7e1c to e7119dc Compare August 27, 2026 03:26
@daniel-noland
daniel-noland marked this pull request as ready for review August 27, 2026 03:29
@daniel-noland
daniel-noland requested a review from a team as a code owner August 27, 2026 03:29
@daniel-noland
daniel-noland requested review from sergeymatov and a lite review from Copilot and removed request for a team August 27, 2026 03:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@daniel-noland
daniel-noland requested a review from mvachhar August 27, 2026 03:29
@daniel-noland daniel-noland self-assigned this Aug 27, 2026
@daniel-noland daniel-noland changed the title test(net): property-test the checksum, headers view, matcher, and builder test(net): property-test the rest of net Aug 27, 2026
@daniel-noland daniel-noland added the clean-up Code base clean-up, no functional change label Aug 27, 2026

@mvachhar mvachhar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need one extra test regarding checksums. Might as well fix the wierd licensing verbiage while you're at it.


/// Eight words to fold, over a UDP pseudo-header.
#[test]
fn a_v6_address_change_matches_a_fresh_udp_checksum() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a test for the incremental checksum update where the quoted packet header is truncated below the required 128 bytes. We won't ever generate such a packet but we can receive one. What happens in that case when we try to update the checksum?

Comment thread net/src/headers/view.rs
Comment thread net/src/headers/view.rs Outdated
Comment thread net/src/headers/embedded_view.rs Outdated
@daniel-noland daniel-noland changed the title test(net): property-test the rest of net net Aug 28, 2026
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch from e7119dc to 98d9cda Compare August 28, 2026 04:22
daniel-noland and others added 9 commits August 27, 2026 23:09
`EmbeddedTransport::update_checksum` dropped the checksum returned by
`increment_update_checksum`. Store it so NAT port rewrites update checksums
inside quoted packets.

Fold quoted address changes into TCP, UDP, and ICMPv6 pseudo-header checksums.
ICMPv4 is unchanged; incremental updates work with truncated quotes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
`HeadersView` licenses unchecked extraction through a separately generated
shape walk. Compare its decisions and selected layer addresses with the safe
matcher over VLAN and extension-header layouts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Compare the licensing decision with the separate mutable matcher traversal.
Exercise returned mutable references under Miri with stacked borrows, and make
the Miri budget and borrow check configurable through the environment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Exercise the separately generated match and extraction paths at every supported
arity. Fail nontrivial properties whose generated shape never matches.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Generate varied outer and quoted-packet layouts, including VLANs, extensions,
family mismatches, and truncated transports. Compare embedded matching and
extraction at every reachable arity and exercise mutable splits under Miri.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Check that optional matchers are never stricter than their required forms, then
cover absent, wrong-variant, and cursor-advancing behavior directly. Pin the
embedded combinators' inner-accumulator semantics.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Derive each type-level shape from its matcher chain, then compare returned layer
addresses across all arities. Add explicit VXLAN and first-step rejection cases.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Scramble parent protocol fields before stacking header chains, then deparse and
reparse to verify that `Within::conform` names the actual child. Exercise VLAN
and extension-header transitions throughout the conformance graph.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Exercise every ICMP subtype builder and verify that caller customization
survives installation. Cover ICMP quoted inside ICMP errors and assert the
quoted IP protocol field directly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch from 98d9cda to b760312 Compare August 28, 2026 05:11
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/spec-tooling branch from 9b64d3b to 24551ab Compare August 28, 2026 05:11
Lower the minimum case count so coverage-instrumented runs still execute the
guard while deliberately short Miri runs skip it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Daniel Noland <daniel@githedgehog.com>
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch from dd860c4 to 8bf6ba3 Compare August 28, 2026 06:39
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/spec-tooling branch from 24551ab to 3230698 Compare August 28, 2026 09:14
@daniel-noland
daniel-noland force-pushed the pr/daniel-noland/fuzz-net-headers branch from 8bf6ba3 to 4262cba Compare August 28, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean-up Code base clean-up, no functional change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants