Skip to content

fix(model): let loadLocationStables honour forceMinimum - #409

Closed
Ryanmello07 wants to merge 1 commit into
urnetwork:mainfrom
Ryanmello07:feat/probe-location-force-minimum-upstream
Closed

fix(model): let loadLocationStables honour forceMinimum#409
Ryanmello07 wants to merge 1 commit into
urnetwork:mainfrom
Ryanmello07:feat/probe-location-force-minimum-upstream

Conversation

@Ryanmello07

Copy link
Copy Markdown
Contributor

loadLocationStables hardcoded forceMinimum=false on the read side, so a location whose every provider fails the minimums gate is invisible even to callers that explicitly bypass minimums. Location enumeration happens before provider selection, so force_minimum on find-providers2 cannot recover a location the listing never emitted — those providers can never be reached and never improve their standing.

The writer (UpdateClientScores -> exportClientScores, which loops for _, forceMinimum := range []bool{false, true}) already populates both key families, so this only chooses between them. No new data, no new keys.

Both existing callers — GetProviderLocations and FindProviderLocations — pass false explicitly, so user-facing location listing is byte-for-byte unchanged.

New test TestLoadLocationStablesHonoursForceMinimum: one connected+valid Public provider with no latency or speed samples (deterministically below the minimums); its country is absent under false and present under true.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QtgqtCmKJRXdsQ5ktiqwkg

The read side hardcoded forceMinimum=false, so a location where every
provider fails the minimums gate was invisible even to callers that
explicitly bypass minimums. Providers there could never be probed and so
could never graduate probation. The writer already populates both key
families; this only chooses between them. User-facing listing still
passes false.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QtgqtCmKJRXdsQ5ktiqwkg
@Ryanmello07

Copy link
Copy Markdown
Contributor Author

Superseded by #425, which consolidates this stack into a single branch rebased onto current main. The work is unchanged and included there — this PR's commits are in #425's history (or, where the chain rewrote them, their final form is). Closing to keep review in one place.

@Ryanmello07 Ryanmello07 closed this Aug 4, 2026
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