UPG-100: six zones printed an EMPTY packet — the fetch lacked its selector fields

MEASURED, not inferred. The packet fetch requested
slug,name,country_code,population,religion,image_url(+language,gsec) while SIX
of the 27 printable zones select on wagf fields it never asked for:

  west-africa, east-africa, central-africa   wagf_block
  europe                                     wagf_region
  southern-africa-islands                    union of two wagf_block
  oceania-indonesia                          union of wagf_region + country_code

Proved with the real evaluator: a wagf_block selector returns 0 members on
packet rows and 1 on map rows. So those packets resolved to nobody and printed
empty — while the SAME selectors resolved correctly on the map, whose fetch
(:1988) has carried wagf_region,wagf_block all along. One file, two fetches,
two different field sets, and only one of them agreed with the data.

★ oceania-indonesia IS THE DANGEROUS ONE. Its union still matched country_code
IDN, so it did not print empty — it printed a PLAUSIBLE packet silently missing
every Oceania group. An empty packet is noticed on the first page; a packet
that is quietly 40% short is not. Same shape as the 514-of-1009 join gospel
measured today: a result that returns HALF looks like a smaller dataset, while
one that returns NOTHING gets caught immediately.

Verified after the fix: west-africa resolves its wagf_block row, and
oceania-indonesia now finds BOTH branches rather than only IDN.

Found while answering dx-shepherd's question about 9 selectorless zones. Those
9 turned out not to be in clusters.json at all — they are grouping/colour keys
in zone-regions.json and groupings.json, so no packet can be asked to print
them. All 27 zones that ARE printable have selectors; the defect was never a
missing selector, it was a missing FIELD.
This commit is contained in:
Doxa Maps 2026-09-28 13:37:09 +00:00
parent 926cc1fe89
commit ed40117b9a

View file

@ -1366,7 +1366,15 @@ async function packetRecords(zone) {
// API ('2% or Greater but Less than 5%'), so interpolating it would leave every non-English packet
// half-English in its widest column (sr measured this across 12,379 rows). primary_language is the
// same field poster-wall already fetches (:171), so this adds no new API surface.
const fields = 'slug,name,country_code,population,religion,image_url,primary_language,imb_gsec';
// ★ wagf_region + wagf_block ARE SELECTOR INPUTS, not display fields. SIX of the 27 printable
// zones select on them — west-africa / east-africa / central-africa (wagf_block), europe
// (wagf_region), southern-africa-islands (union of two wagf_block) and oceania-indonesia (union of
// wagf_region + country_code). Without them here, evaluate() matched NOTHING on packet rows and
// those packets printed EMPTY, while the same selectors resolved correctly on the map — whose
// fetch (:1988) has always carried both. Measured: a wagf_block selector returns 0 members on
// packet rows and 1 on map rows. oceania-indonesia was the worst of the six because its union
// still matched IDN, so it printed a PLAUSIBLE packet that was silently missing all of Oceania.
const fields = 'slug,name,country_code,wagf_region,wagf_block,population,religion,image_url,primary_language,imb_gsec';
const resp = await fetch(`${API_BASE}/api/people-groups/list?fields=${fields}&lang=${packetLang()}`,
{ cache: 'no-store' });
if (!resp.ok) throw new Error(`people-groups fetch failed (${resp.status})`);
@ -1597,7 +1605,15 @@ async function selectionAsList() {
// API ('2% or Greater but Less than 5%'), so interpolating it would leave every non-English packet
// half-English in its widest column (sr measured this across 12,379 rows). primary_language is the
// same field poster-wall already fetches (:171), so this adds no new API surface.
const fields = 'slug,name,country_code,population,religion,image_url,primary_language,imb_gsec';
// ★ wagf_region + wagf_block ARE SELECTOR INPUTS, not display fields. SIX of the 27 printable
// zones select on them — west-africa / east-africa / central-africa (wagf_block), europe
// (wagf_region), southern-africa-islands (union of two wagf_block) and oceania-indonesia (union of
// wagf_region + country_code). Without them here, evaluate() matched NOTHING on packet rows and
// those packets printed EMPTY, while the same selectors resolved correctly on the map — whose
// fetch (:1988) has always carried both. Measured: a wagf_block selector returns 0 members on
// packet rows and 1 on map rows. oceania-indonesia was the worst of the six because its union
// still matched IDN, so it printed a PLAUSIBLE packet that was silently missing all of Oceania.
const fields = 'slug,name,country_code,wagf_region,wagf_block,population,religion,image_url,primary_language,imb_gsec';
const resp = await fetch(`${API_BASE}/api/people-groups/list?fields=${fields}&lang=${packetLang()}`,
{ cache: 'no-store' });
if (!resp.ok) throw new Error(`people-groups fetch failed (${resp.status})`);