From 10f66ba8612d554483d2ba8de55b172d847365c4 Mon Sep 17 00:00:00 2001 From: giswqs Date: Sun, 15 Nov 2026 11:37:02 -0500 Subject: [PATCH] docs(tiles): clarify observed reach and malformed geocoder replies --- crates/tiles/src/address.rs | 5 +++-- crates/tiles/src/geocode.rs | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/tiles/src/address.rs b/crates/tiles/src/address.rs index 020c38566f..db24c8bb39 100644 --- a/crates/tiles/src/address.rs +++ b/crates/tiles/src/address.rs @@ -60,8 +60,9 @@ impl Origin { Ok(self) } - /// Retains this trusted origin's address while narrowing its observed reach. - /// This constructor is for in-process transport/UI code, never document deserialization. + /// Records the address and reach observed by trusted in-process transport/UI code. The + /// observed peer can be local even when the address's spelling looks public; this does not + /// narrow a previous origin. Never use document data as the observed reach. pub fn with_observed_reach(url: &str, reach: Reach) -> Result { check_reach(url, Reach::Local)?; if reach == Reach::Forbidden { diff --git a/crates/tiles/src/geocode.rs b/crates/tiles/src/geocode.rs index e259b84288..b2364bb20b 100644 --- a/crates/tiles/src/geocode.rs +++ b/crates/tiles/src/geocode.rs @@ -255,6 +255,8 @@ impl Geocoder { found.limited = entries.len().saturating_sub(i); break; } + // An overlong label is a malformed Census response, not a candidate with no usable + // position: refuse it whole rather than shorten or substitute its matched address. if self.kind == Kind::Census && e.get("matchedAddress").and_then(Value::as_str).is_some_and(|name| name.chars().nth(500).is_some()) {