Skip to content

feat(proto): Mark PathEvent as #[non_exhaustive]#648

Merged
matheus23 merged 3 commits into
mainfrom
matheus23/path-event-non-exhaustive
May 21, 2026
Merged

feat(proto): Mark PathEvent as #[non_exhaustive]#648
matheus23 merged 3 commits into
mainfrom
matheus23/path-event-non-exhaustive

Conversation

@matheus23

@matheus23 matheus23 commented May 12, 2026

Copy link
Copy Markdown
Member

Description

This is for future-proofing the API.

Closes #642

Breaking Changes

  • enum PathEvent and all of its cases are now marked as #[non_exhaustive]

Notes & open questions

I'm ignoring the _ => case, as anything else would mean we would "do something" in case e.g. noq is bound against a newer noq-proto.
In #[cfg(test)] however, I panic, as in that case the version we depend on must be up to date.

Change checklist

  • Self-review.

@matheus23 matheus23 self-assigned this May 12, 2026
@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/648/docs/noq/

Last updated: 2026-05-21T14:30:48Z

@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown

Performance Comparison Report

f82023fb1cda3d4fe1df9f581861420ec9be6a91 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5659.8 Mbps 7948.1 Mbps -28.8% 97.5% / 148.0%
medium-concurrent 5395.0 Mbps 8028.9 Mbps -32.8% 95.9% / 147.0%
medium-single 4384.6 Mbps 4580.7 Mbps -4.3% 92.0% / 101.0%
small-concurrent 3809.5 Mbps 5261.4 Mbps -27.6% 94.3% / 101.0%
small-single 3588.7 Mbps 4801.6 Mbps -25.3% 98.0% / 151.0%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3063.9 Mbps N/A N/A
lan 782.4 Mbps N/A N/A
lossy 69.8 Mbps N/A N/A
wan 83.8 Mbps N/A N/A

Summary

noq is 25.4% slower on average

---
fc551f37b2748b5fc85dcb1edc82e6f6cd797789 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5441.1 Mbps 7897.7 Mbps -31.1% 94.3% / 100.0%
medium-concurrent 5413.6 Mbps 7518.9 Mbps -28.0% 93.5% / 100.0%
medium-single 3816.1 Mbps 4700.2 Mbps -18.8% 94.5% / 102.0%
small-concurrent 3830.6 Mbps 5231.1 Mbps -26.8% 98.7% / 154.0%
small-single 3428.8 Mbps 4738.5 Mbps -27.6% 90.4% / 98.4%

Summary

noq is 27.1% slower on average

---
8d720019675f1cfff950e2f28ed02d60b806efcc - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5762.1 Mbps 7953.0 Mbps -27.5% 94.5% / 101.0%
medium-concurrent 5600.4 Mbps 7676.2 Mbps -27.0% 93.3% / 99.0%
medium-single 4032.3 Mbps 4589.5 Mbps -12.1% 94.7% / 101.0%
small-concurrent 3925.7 Mbps 5193.5 Mbps -24.4% 99.3% / 153.0%
small-single 3553.4 Mbps 4745.7 Mbps -25.1% 89.6% / 97.4%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3072.4 Mbps 3980.5 Mbps -22.8%
lan 782.4 Mbps 796.4 Mbps -1.8%
lossy 69.8 Mbps 55.9 Mbps +25.0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 23.4% slower on average

---
794f0f33663a5e56d51c12e2dd988eb0d10e6e5b - artifacts

No results available

---
09b22ded8600edcf7aab5bef7b23ab60c5f3bb78 - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5387.0 Mbps 7863.7 Mbps -31.5% 92.9% / 99.0%
medium-concurrent 5417.3 Mbps 7613.9 Mbps -28.8% 93.8% / 99.0%
medium-single 4153.1 Mbps 4749.5 Mbps -12.6% 94.6% / 101.0%
small-concurrent 3713.5 Mbps 5370.3 Mbps -30.8% 98.1% / 152.0%
small-single 3502.0 Mbps 4717.8 Mbps -25.8% 89.5% / 97.5%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3092.0 Mbps 4093.0 Mbps -24.5%
lan 782.4 Mbps 810.3 Mbps -3.4%
lossy 69.8 Mbps 55.9 Mbps +25.0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 25.9% slower on average

@n0bot n0bot Bot added this to iroh May 12, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh May 12, 2026
Comment thread noq-proto/src/connection/paths.rs
@dignifiedquire dignifiedquire moved this from 🚑 Needs Triage to 🏗 In progress in iroh May 19, 2026
@matheus23
matheus23 requested a review from flub May 20, 2026 13:05
@matheus23
matheus23 force-pushed the matheus23/path-event-non-exhaustive branch from 8d72001 to 794f0f3 Compare May 21, 2026 14:25
@matheus23
matheus23 force-pushed the matheus23/path-event-non-exhaustive branch from 794f0f3 to 09b22de Compare May 21, 2026 14:27
@matheus23
matheus23 enabled auto-merge May 21, 2026 14:27
@matheus23
matheus23 added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit be30bc5 May 21, 2026
38 of 39 checks passed
@matheus23
matheus23 deleted the matheus23/path-event-non-exhaustive branch May 21, 2026 15:03
@github-project-automation github-project-automation Bot moved this from 🏗 In progress to ✅ Done in iroh May 21, 2026
dignifiedquire pushed a commit to n0-computer/iroh that referenced this pull request May 22, 2026
## Description

Updates to the latest main, including `#[non_exhaustive]` changes to
`PathEvent`: n0-computer/noq#648

## Notes & open questions

Adding a `#[cfg(test)] panic!()` to ensure we keep the versions in noq
and iroh in sync and see iroh tests failing when we add more path
events.

## Change checklist
<!-- Remove any that are not relevant. -->
- [x] Self-review.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

PathEvent should be non-exhaustive

3 participants