Skip to content

Prepare v2.1.2 release#142

Merged
HadenSmith merged 7 commits into
mainfrom
bug-fixes-and-enhancements
Jul 9, 2026
Merged

Prepare v2.1.2 release#142
HadenSmith merged 7 commits into
mainfrom
bug-fixes-and-enhancements

Conversation

@HadenSmith

Copy link
Copy Markdown
Collaborator

Summary

  • Refresh package, citation, CodeMeta, and snapshot metadata for the v2.1.2 release.
  • Improve time-series download reliability on restricted and IPv6-unfriendly networks.
  • Add RunningStatistics.Clone() and fix Combine() / + aliasing when one operand is empty.
  • Expand deterministic and integration coverage for download handling, duplicate timestamps, IPv4 preference, and series mutation behavior.

Validation

  • dotnet restore
  • dotnet build Numerics/Numerics.csproj -c Release /p:Version=2.1.2
  • dotnet test -c Release with VSTEST_CONNECTION_TIMEOUT=600
  • dotnet pack Numerics/Numerics.csproj -c Release /p:Version=2.1.2 --no-build -o ./packages
  • Inspected packages/RMC.Numerics.2.1.2.nupkg metadata and confirmed version 2.1.2, root README.md, and the NuGet release notes.

…rands

Combine(a, b) returned the non-empty operand instance directly when the
other operand was empty, so the result shared state with its input.
Combine and the + operator now always return a new independent instance.
Added unit tests proving Clone independence and that Combine no longer
aliases its operands.
GHCN downloads had slowed from about 2 seconds to over 2 minutes, and commit
bf0f28d had raised the GHCN per-attempt timeout to 240 seconds on the belief
that NOAA NCEI takes that long to send response headers. Measurement showed
the server is not slow: www.ncei.noaa.gov now publishes six IPv6 (AAAA) DNS
records, and on networks that silently drop IPv6 traffic every HttpClient
connection walked all six dead addresses sequentially (about 21 seconds of
TCP timeout each, 126 seconds measured on both net481 and net10) before
reaching a working IPv4 address, while curl fetched the same station file in
under 2 seconds. api.waterdata.usgs.gov carries two AAAA records (about 42
seconds); the other providers have none, which is why GHCN was hit worst.

The fix makes every downloader connection prefer IPv4 while keeping IPv6 as
a fallback. On modern targets a SocketsHttpHandler.ConnectCallback resolves
DNS, orders IPv4 first, and bounds each address attempt at 5 seconds. On
.NET Framework, where the handler offers no connect hook, a ServicePoint
BindIPEndPointDelegate throws for IPv6 remote endpoints so the service point
skips immediately to IPv4; this is guarded by Socket.OSSupportsIPv4 so
IPv6-only machines keep working. Cold-connection time to first byte drops
from 126 seconds to under half a second on both stacks. With connects fixed,
the GHCN timeout returns to 60 seconds and its remark no longer blames NCEI.

Also included: BOM reuses one static browser-headered client instead of
building two clients per call, so the station lookup and values request share
pooled connections; Series.Clear() no longer removes elements one at a time
through two full equality scans each (O(n squared) on a 50k-point download,
the parse-side cost behind f522295's dedup pass); and Series.RemoveAt(index)
now removes the requested index instead of the first equal element, which
silently deleted the wrong ordinate when duplicate values existed.

Verified with 1789 deterministic tests and 31 live integration tests passing
on both net481 and net10.0, plus new unit tests for the address ordering, the
bind delegate, and the Series contracts. The GHCN full-period integration
tests now carry 60-second ceilings so a connect regression fails loudly
instead of quietly taking minutes.
@HadenSmith HadenSmith marked this pull request as ready for review July 9, 2026 21:26
@HadenSmith HadenSmith merged commit b24037a into main Jul 9, 2026
1 check passed
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