Skip to content

fix(port_strategy): fall back to full range when both range and ports are missing - #971

Open
delaysystem wants to merge 1 commit into
bee-san:masterfrom
delaysystem:auto-batch1/s3-pick-fallback-full-range
Open

delaysystem wants to merge 1 commit into
bee-san:masterfrom
delaysystem:auto-batch1/s3-pick-fallback-full-range

Conversation

@delaysystem

@delaysystem delaysystem commented Nov 8, 2026 •

Copy link
Copy Markdown

PortStrategy::pick(&None, None, _) unwrapped range and panicked. The CLI always defaults the range, but the type is public API (lib.rs documents library use) and the signature invites the call. Now it scans 1-65535 like the CLI default.

Explicit port lists (including empty) keep precedence over the range, locked by tests. All callers audited (main.rs, lib.rs example, tests, benches), none depends on the panic.

Tests: 4 new unit tests; full gates green (cargo test, both clippy gates deny-warnings, fmt, doc). Possible rebase touch with #961's strategy tests (complementary, not overlapping).

… are missing

PortStrategy::pick(&None, None, _) unwrapped the range and panicked.
The CLI always defaults the range, but the type is public API and
library callers can pass neither; scan 1-65535 then, like the CLI
default, instead of panicking. Explicit port lists (including empty
ones) keep their existing precedence.
@sonarqubecloud

sonarqubecloud Bot commented Nov 8, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant