Skip to content

fix auto-retry tolerance range validation - #271

Closed
snapetech wants to merge 1 commit into
mainfrom
agent/fix-auto-retry-tolerance-range
Closed

fix auto-retry tolerance range validation#271
snapetech wants to merge 1 commit into
mainfrom
agent/fix-auto-retry-tolerance-range

Conversation

@snapetech

Copy link
Copy Markdown
Owner

What changed

  • use a double-typed RangeAttribute for the download auto-retry alternate-source size tolerance
  • add controller validation coverage for fractional values immediately outside the documented 0–100 percent range
  • document the fix in the Unreleased changelog

Why

The property is a double, but its range annotation used integer operands. RangeAttribute converted fractional values to integers during validation, so values such as -0.1 and 100.1 rounded into the accepted range.

Impact

YAML validation and startup validation now reject every fractional tolerance below 0 or above 100 instead of accepting values close to the boundaries.

Validation

dotnet test tests/slskd.Tests.Unit/slskd.Tests.Unit.csproj -c Release --filter 'FullyQualifiedName~OptionsControllerTests' --no-restore

@snapetech snapetech closed this Jul 17, 2026
@snapetech
snapetech deleted the agent/fix-auto-retry-tolerance-range branch July 24, 2026 17:36
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