1
0

fix: the merged board asked for weather in the middle of the state, and got a 400

`carriesMetroDetail` is true of it, so it watched at `entry.city.center` —
37.30, -119.25, which is Sierra foothills five hundred kilometres from
either station this deployment serves. Found by loading the deployed
build and reading the network log, not by any test.

Aircraft from two regions merge because they are disjoint objects in one
sky; two weather observations do not. A board cannot be foggy at the
Golden Gate and clear over Riverside at once, and applying either one
statewide is a worse lie than the climatology model. So the merged board
takes the model, which is the rule the comment above it already stated.
This commit is contained in:
2026-08-24 16:50:26 -07:00
parent aa3085afab
commit 86033046ae
+32 -1
View File
@@ -2465,8 +2465,39 @@ function activateBoard(record: MountedBoard): void {
// are: one honest station cannot describe a 600 km corridor. California uses // are: one honest station cannot describe a 600 km corridor. California uses
// the local climatology model; the detailed SF and SoCal boards keep their // the local climatology model; the detailed SF and SoCal boards keep their
// live observations. // live observations.
//
/*
* And the merged board uses climatology too, which took a 400 in production
* to notice.
*
* `carriesMetroDetail` is true of it it carries both metros' districts
* so it asked, at `entry.city.center`, which is the middle of the *state*:
* `GET /api/v1/weather?lat=37.30&lng=-119.25` `400 bad_request, "Nothing
* this deployment serves is near 37.3,-119.25"`. The API is right. What it
* serves is San Francisco and the Southland, five hundred and sixty
* kilometres apart, and the point midway between them is farm country in the
* Sierra foothills that no station on this deployment describes.
*
* The sky already had this problem and solved it by asking per source
* (`skyRegions`, above). Weather does not get the same answer, because the
* two feeds are not the same shape: aircraft from two regions *merge* they
* are disjoint sets of objects in one sky and two observations do not. One
* board cannot be simultaneously foggy at the Golden Gate and clear over
* Riverside, and picking either one and applying it statewide is a worse lie
* than the climatology model, which at least varies with latitude and season.
*
* So this follows the rule the comment above already states rather than
* inventing an exception to it: a board that spans more than one served
* region takes the model. The metros keep their live observations on their
* own boards, and the day the atmosphere is regional rather than per board,
* this is the line that changes.
*/
const spansManyWeatherRegions = ONE_CALIFORNIA && id === "california";
weatherWatch = weatherWatch =
carriesMetroDetail(entry.city) && access.can.liveEnvironment && access.feeds?.weather carriesMetroDetail(entry.city) &&
!spansManyWeatherRegions &&
access.can.liveEnvironment &&
access.feeds?.weather
? tera.watchWeather(entry.city.center, () => { ? tera.watchWeather(entry.city.center, () => {
updateSun(); updateSun();
renderChrome(); renderChrome();