feat(content): v0.5.8-state_511_atis -- central_normalizer with Photon nearest_town + composer bypass + SB->S route normalization

First per-adapter content formatter in the meshai-side central_normalizer library (per Central response to schema-divergence + nearest-town reports). state_511_atis (94% of Idaho 511 work-zone traffic) now produces clean wire strings like "🚧 SH-55, near McCall: both directions, emergency repairs" instead of the previous "🚧 ROADS: Work Zone, US-ID. routine -- roadwork".

Implementation: nearest_town(lat, lon) calls Photon directly at 100.64.0.24:2322/reverse with osm_tag=place + client-side filter for city/town/village/hamlet (Navi passthrough route documented in Central response does not exist on current Navi instance). H3-cell-7 LRU cache. Town fallback chain: _enriched.geocoder.city -> nearest_town(coords) -> drop segment. Composer bypass via event.data["_meshai_precomposed"] flag -- renderer owns full wire string for normalized events. SB->S route normalization. distance<1mi -> "near X".

Tests: 535 passed (was 511, +24 net). Synthetic probe over 25 bucket-B + 8 fixture envelopes confirmed 23/25 + 8/8 produce clean output; 2/25 fell back to None (drop segment) on Photon index gaps near Boise/Cascade. Matt eyeballed and approved.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt Johnson 2026-06-04 21:38:40 +00:00
commit 7751a40c6c
15 changed files with 1801 additions and 0 deletions

View file

@ -0,0 +1,60 @@
{
"id": "ID:Construction:33902",
"source": "central.echo6.co",
"type": "central.work_zone.state_511_atis.v1",
"time": "2026-05-28T14:54:00+00:00",
"datacontenttype": "application/json",
"centralschemaversion": "1.0",
"centralcategory": "work_zone.state_511_atis",
"centralseverity": 1,
"specversion": "1.0",
"data": {
"id": "ID:Construction:33902",
"adapter": "state_511_atis",
"category": "work_zone.state_511_atis",
"time": "2026-05-28T14:54:00Z",
"expires": "2026-05-29T15:00:00Z",
"severity": 1,
"geo": {
"centroid": [
-112.358931947559,
43.2045296484166
],
"bbox": null,
"regions": [
"US-ID"
],
"primary_region": "US-ID",
"geometry": null
},
"data": {
"roadway_name": "I-15",
"description": "Road construction on I-15 Southbound from MM (93) to MM (89). 1 Right lane closed. 5/29/2026 10:00 AM to 5/29/2026 3:00 PM Fri: 10:00 AM - 3:00 PM Width Restriction: 19ft Speed Restriction: 65mph Activities: Mandatory Speed Limit in Force, Use Caution.<div class='cellSpacer'><i><b>Comments:</b></i> Pile Driving on North West side of the Interstate for bridge foundations. South Bound right lane closed.</div>",
"event_sub_type": "roadConstruction",
"direction": "South",
"location_description": "I-15-BL | I-15-BL",
"county": "Bingham",
"state": "Idaho",
"start_date": "5/29/26, 10:00 AM",
"last_updated": "5/28/26, 2:54 PM",
"is_full_closure": false,
"layer": "Construction",
"state_code": "ID",
"latitude": 43.2045296484166,
"longitude": -112.358931947559,
"_enriched": {
"geocoder": {
"name": "Jensen Grove Disc Golf Park",
"city": "Blackfoot",
"county": "Bingham",
"state": "Idaho",
"country": "United States",
"postal_code": "83221",
"timezone": "America/Boise",
"landclass": null,
"elevation_m": 1366.6015625
}
}
}
}
}

View file

@ -0,0 +1,60 @@
{
"id": "ID:Construction:33202",
"source": "central.echo6.co",
"type": "central.work_zone.state_511_atis.v1",
"time": "2026-05-21T10:40:00+00:00",
"datacontenttype": "application/json",
"centralschemaversion": "1.0",
"centralcategory": "work_zone.state_511_atis",
"centralseverity": 1,
"specversion": "1.0",
"data": {
"id": "ID:Construction:33202",
"adapter": "state_511_atis",
"category": "work_zone.state_511_atis",
"time": "2026-05-21T10:40:00Z",
"expires": "2026-06-05T16:30:00Z",
"severity": 1,
"geo": {
"centroid": [
-111.622569529543,
42.3143070666171
],
"bbox": null,
"regions": [
"US-ID"
],
"primary_region": "US-ID",
"geometry": null
},
"data": {
"roadway_name": "SH-36",
"description": "Paving Operations on SH-36 from MM (17) to MM (18). 6/1/2026 6:00 AM to 6/5/2026 4:30 PM Mon, Tue, Wed, Thu, Fri: Active all day Width Restriction: 10ft Activities: Pilot Car in Operation, Reduced to Single Lane, Alternating Direction of Travel, Use Caution, Warning.",
"event_sub_type": "pavingOperations",
"direction": "Unknown",
"location_description": "NF-441 | NF-444",
"county": "Franklin",
"state": "Idaho",
"start_date": "6/1/26, 6:00 AM",
"last_updated": "5/21/26, 10:40 AM",
"is_full_closure": false,
"layer": "Construction",
"state_code": "ID",
"latitude": 42.3143070666171,
"longitude": -111.622569529543,
"_enriched": {
"geocoder": {
"name": "Cache Nf Road 444",
"city": null,
"county": "Franklin",
"state": "Idaho",
"country": "United States",
"postal_code": null,
"timezone": "America/Boise",
"landclass": "Cache National Forest",
"elevation_m": 2035.1875
}
}
}
}
}

View file

@ -0,0 +1,60 @@
{
"id": "ID:Construction:33281",
"source": "central.echo6.co",
"type": "central.work_zone.state_511_atis.v1",
"time": "2026-05-29T08:03:00+00:00",
"datacontenttype": "application/json",
"centralschemaversion": "1.0",
"centralcategory": "work_zone.state_511_atis",
"centralseverity": 1,
"specversion": "1.0",
"data": {
"id": "ID:Construction:33281",
"adapter": "state_511_atis",
"category": "work_zone.state_511_atis",
"time": "2026-05-29T08:03:00Z",
"expires": "2026-06-03T17:00:00Z",
"severity": 1,
"geo": {
"centroid": [
-112.388532253628,
43.1524044098836
],
"bbox": null,
"regions": [
"US-ID"
],
"primary_region": "US-ID",
"geometry": null
},
"data": {
"roadway_name": "I-15",
"description": "Bridge construction on I-15 Northbound from MM (89) to MM (93). 1 Right lane closed. 6/1/2026 7:00 AM to 6/3/2026 5:00 PM Mon: Paused all day, Tue, Wed: 7:00 AM - 5:00 PM Speed Restriction: 65mph Activities: Mandatory Speed Limit in Force, Use Caution.<div class='cellSpacer'><i><b>Comments:</b></i> North Bound right lane closed with speed reduction to 65 mph.\n</div>",
"event_sub_type": "bridgeConstruction",
"direction": "North",
"location_description": "I-15-BL | Snake River",
"county": "Bingham",
"state": "Idaho",
"start_date": "6/1/26, 7:00 AM",
"last_updated": "5/29/26, 8:03 AM",
"is_full_closure": false,
"layer": "Construction",
"state_code": "ID",
"latitude": 43.1524044098836,
"longitude": -112.388532253628,
"_enriched": {
"geocoder": {
"name": "North Treaty Highway",
"city": null,
"county": "Bingham",
"state": "Idaho",
"country": "United States",
"postal_code": null,
"timezone": "America/Boise",
"landclass": "Fort Hall Reservation",
"elevation_m": 1367.98828125
}
}
}
}
}

View file

@ -0,0 +1,60 @@
{
"id": "ID:Construction:33897",
"source": "central.echo6.co",
"type": "central.work_zone.state_511_atis.v1",
"time": "2026-05-28T14:38:00+00:00",
"datacontenttype": "application/json",
"centralschemaversion": "1.0",
"centralcategory": "work_zone.state_511_atis",
"centralseverity": 1,
"specversion": "1.0",
"data": {
"id": "ID:Construction:33897",
"adapter": "state_511_atis",
"category": "work_zone.state_511_atis",
"time": "2026-05-28T14:38:00Z",
"expires": "2026-06-02T17:00:00Z",
"severity": 1,
"geo": {
"centroid": [
-116.411904551719,
48.5439764820932
],
"bbox": null,
"regions": [
"US-ID"
],
"primary_region": "US-ID",
"geometry": null
},
"data": {
"roadway_name": "US-95",
"description": "Utility work on US-95 Southbound near MM (495). 6/2/2026 9:00 AM to 6/2/2026 5:00 PM Tue: Active all day Activities: Use Caution.",
"event_sub_type": "utilityWork",
"direction": "South",
"location_description": "Dusty Ln",
"county": "Boundary",
"state": "Idaho",
"start_date": "6/2/26, 9:00 AM",
"last_updated": "5/28/26, 2:38 PM",
"is_full_closure": false,
"layer": "Construction",
"state_code": "ID",
"latitude": 48.5439764820932,
"longitude": -116.411904551719,
"_enriched": {
"geocoder": {
"name": null,
"city": "Naples",
"county": "Boundary",
"state": "ID",
"country": "United States",
"postal_code": "83847",
"timezone": "America/Los_Angeles",
"landclass": null,
"elevation_m": 659.62890625
}
}
}
}
}

View file

@ -0,0 +1,60 @@
{
"id": "ID:Construction:33908",
"source": "central.echo6.co",
"type": "central.work_zone.state_511_atis.v1",
"time": "2026-05-28T15:37:00+00:00",
"datacontenttype": "application/json",
"centralschemaversion": "1.0",
"centralcategory": "work_zone.state_511_atis",
"centralseverity": 1,
"specversion": "1.0",
"data": {
"id": "ID:Construction:33908",
"adapter": "state_511_atis",
"category": "work_zone.state_511_atis",
"time": "2026-05-28T15:37:00Z",
"expires": "2026-06-13T18:00:00Z",
"severity": 1,
"geo": {
"centroid": [
-116.804061047849,
47.74449
],
"bbox": null,
"regions": [
"US-ID"
],
"primary_region": "US-ID",
"geometry": null
},
"data": {
"roadway_name": "W Prairie Ave",
"description": "Minor Paving Operations on W Prairie Ave Both Directions from N Ramsey Rd to N Government Way. Lanes Alternating. 5/28/2026 7:00 AM to 6/13/2026 6:00 PM Mon, Tue, Wed, Thu, Fri: Active all day, Sat, Sun: Paused all day<div class='cellSpacer'><i><b>Comments:</b></i> Lakes Highway District is performing paving operations. US-95 will have the left turn lanes reduced to one left turn lane in both directions, and there will be alternating lane closures on Prairie Ave. reducing to one lane in both directions. Reduce your speed and lookout for workers on the roadway.</div>",
"event_sub_type": "pavingOperations",
"direction": "Both",
"location_description": "N Ramsey Rd | N Government Way",
"county": "Kootenai",
"state": "Idaho",
"start_date": "5/28/26, 7:00 AM",
"last_updated": "5/28/26, 3:37 PM",
"is_full_closure": false,
"layer": "Construction",
"state_code": "ID",
"latitude": 47.74449,
"longitude": -116.804061047849,
"_enriched": {
"geocoder": {
"name": "Sandpiper Way",
"city": "Hayden",
"county": "Kootenai",
"state": "Idaho",
"country": "United States",
"postal_code": "83835",
"timezone": "America/Los_Angeles",
"landclass": null,
"elevation_m": 695.83984375
}
}
}
}
}

View file

@ -0,0 +1,60 @@
{
"id": "ID:Construction:33930",
"source": "central.echo6.co",
"type": "central.work_zone.state_511_atis.v1",
"time": "2026-05-28T17:22:00+00:00",
"datacontenttype": "application/json",
"centralschemaversion": "1.0",
"centralcategory": "work_zone.state_511_atis",
"centralseverity": 1,
"specversion": "1.0",
"data": {
"id": "ID:Construction:33930",
"adapter": "state_511_atis",
"category": "work_zone.state_511_atis",
"time": "2026-05-28T17:22:00Z",
"expires": "2026-05-29T08:00:00Z",
"severity": 1,
"geo": {
"centroid": [
-116.09759,
44.9065083834611
],
"bbox": null,
"regions": [
"US-ID"
],
"primary_region": "US-ID",
"geometry": null
},
"data": {
"roadway_name": "SH-55",
"description": "Emergency repairs on SH-55 Both Directions near Washington St. 5/28/2026 5:00 PM to 5/29/2026 8:00 AM Thu, Fri: Active all day<div class='cellSpacer'><i><b>Comments:</b></i> Emergency fiber repair</div>",
"event_sub_type": "emergencyRepairs",
"direction": "Both",
"location_description": "Washington St",
"county": "Valley",
"state": "Idaho",
"start_date": "5/28/26, 5:00 PM",
"last_updated": "5/28/26, 5:22 PM",
"is_full_closure": false,
"layer": "Construction",
"state_code": "ID",
"latitude": 44.9065083834611,
"longitude": -116.09759,
"_enriched": {
"geocoder": {
"name": "Shell",
"city": "McCall",
"county": "Valley",
"state": "ID",
"country": "United States",
"postal_code": "83638",
"timezone": "America/Boise",
"landclass": null,
"elevation_m": 1537.4609375
}
}
}
}
}

View file

@ -0,0 +1,60 @@
{
"id": "ID:Construction:32196",
"source": "central.echo6.co",
"type": "central.work_zone.state_511_atis.v1",
"time": "2026-05-11T15:13:00+00:00",
"datacontenttype": "application/json",
"centralschemaversion": "1.0",
"centralcategory": "work_zone.state_511_atis",
"centralseverity": 1,
"specversion": "1.0",
"data": {
"id": "ID:Construction:32196",
"adapter": "state_511_atis",
"category": "work_zone.state_511_atis",
"time": "2026-05-11T15:13:00Z",
"expires": "2026-06-02T16:00:00Z",
"severity": 1,
"geo": {
"centroid": [
-116.89192200007,
48.1805200000001
],
"bbox": null,
"regions": [
"US-ID"
],
"primary_region": "US-ID",
"geometry": null
},
"data": {
"roadway_name": "US-2",
"description": "Minor Road construction on US-2 Eastbound from Keyser Ln to N Riley Creek Rd. 6/1/2026 6:30 AM to 6/2/2026 4:00 PM Mon: 5:00 AM - 3:00 PM, Tue: 5:30 AM - 3:00 PM Activities: Reduced to Single Lane, Alternating Direction of Travel. Expect Delays: Under 15 minutes<div class='cellSpacer'><i><b>Comments:</b></i> road work flaggers in area</div>",
"event_sub_type": "roadConstruction",
"direction": "East",
"location_description": "Keyser Ln | N Riley Creek Rd",
"county": "Bonner",
"state": "Idaho",
"start_date": "6/1/26, 6:30 AM",
"last_updated": "5/11/26, 3:13 PM",
"is_full_closure": false,
"layer": "Construction",
"state_code": "ID",
"latitude": 48.1805200000001,
"longitude": -116.89192200007,
"_enriched": {
"geocoder": {
"name": "Priest River Park",
"city": null,
"county": "Bonner",
"state": "Idaho",
"country": "United States",
"postal_code": null,
"timezone": "America/Los_Angeles",
"landclass": null,
"elevation_m": 633.83984375
}
}
}
}
}

View file

@ -0,0 +1,60 @@
{
"id": "ID:Construction:33655",
"source": "central.echo6.co",
"type": "central.work_zone.state_511_atis.v1",
"time": "2026-05-26T07:32:00+00:00",
"datacontenttype": "application/json",
"centralschemaversion": "1.0",
"centralcategory": "work_zone.state_511_atis",
"centralseverity": 1,
"specversion": "1.0",
"data": {
"id": "ID:Construction:33655",
"adapter": "state_511_atis",
"category": "work_zone.state_511_atis",
"time": "2026-05-26T07:32:00Z",
"expires": "2026-06-01T18:00:00Z",
"severity": 1,
"geo": {
"centroid": [
-116.893994470776,
47.8013806004727
],
"bbox": null,
"regions": [
"US-ID"
],
"primary_region": "US-ID",
"geometry": null
},
"data": {
"roadway_name": "SH-41",
"description": "Minor Utility work on SH-41 Southbound near W Boekel Rd. Lane Shift Left. 6/1/2026 7:00 AM to 6/1/2026 6:00 PM Mon: Active all day<div class='cellSpacer'><i><b>Comments:</b></i> Southbound traffic will be shifted to accommodate for Avista to work on power poles. Reduce your speed and lookout for workers on the roadway.</div>",
"event_sub_type": "utilityWork",
"direction": "South",
"location_description": "W Boekel Rd",
"county": "Kootenai",
"state": "Idaho",
"start_date": "6/1/26, 7:00 AM",
"last_updated": "5/26/26, 7:32 AM",
"is_full_closure": false,
"layer": "Construction",
"state_code": "ID",
"latitude": 47.8013806004727,
"longitude": -116.893994470776,
"_enriched": {
"geocoder": {
"name": "American Eagle Automotive",
"city": "Rathdrum",
"county": "Kootenai",
"state": "Idaho",
"country": "United States",
"postal_code": "83858",
"timezone": "America/Los_Angeles",
"landclass": null,
"elevation_m": 673.84765625
}
}
}
}
}