Server locations: no user threshold

The public projection of a server's place showed only the country for
servers reporting fewer than 10 users. The owner never decided that
threshold: every located server now shows its city, coordinates (0.1°)
and network, and a CDN-fronted one still shows only its CDN, since the
address reached is the CDN's edge. Statistics:PublicCityMinUsers is
gone; the ROADMAP decision on server locations, CLAUDE.md and the
/stargazing explainer are corrected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-04 11:12:02 +02:00
1 parent 31d1d21d1e
commit eb7552e8f3
9 files changed
+56 -57

No files matched your search

+8 -8
View File
@@ -1,4 +1,4 @@
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Options;
using PrivaPub.Infrastructure.Geo;
using PrivaPub.Infrastructure.Statistics;
@@ -12,8 +12,8 @@ namespace PrivaPub.Domain.Statistics
{
public interface ISelfLocation
{
//where this server is, or default when it cannot tell; Configured when the owner set it (Statistics:Geo:Self)
Task<(InstanceGeo Geo, bool Configured)> Get(CancellationToken token);
//where this server is, or default when it cannot tell; Source is "configured" when the owner set it (Statistics:Geo:Self)
Task<InstanceGeo> Get(CancellationToken token);
}
// This server's own place, for the instance API (the client's globe draws every server from it). The owner may set it,
@@ -40,20 +40,20 @@ namespace PrivaPub.Domain.Statistics
_logger = logger;
}
public async Task<(InstanceGeo Geo, bool Configured)> Get(CancellationToken token)
public async Task<InstanceGeo> Get(CancellationToken token)
{
if (_options.CurrentValue.Geo.Self is { Latitude: { } latitude, Longitude: { } longitude } self)
return (new InstanceGeo
return new InstanceGeo
{
Country = self.Country,
City = self.City,
Latitude = Math.Round(latitude, 1),
Longitude = Math.Round(longitude, 1),
Source = "configured"
}, true);
};
if (DateTime.UtcNow - _locatedAt < Lifetime)
return (_located, false);
return _located;
await _gate.WaitAsync(token);
try
{
@@ -62,7 +62,7 @@ namespace PrivaPub.Domain.Statistics
_located = await Locate(token);
_locatedAt = DateTime.UtcNow;
}
return (_located, false);
return _located;
}
finally
{