guidance(#312): coarsening a coverage fraction is a mean over children, not MAX - #350
Conversation
…n, not MAX Features whose native H3 resolution is coarser than the layer they are overlaid on (ACE/plant-richness at res-8, connectivity at res-9, against the res-10 conserved layer) were over-counted by every shipping model except glm-5.2: they coarsened the conserved weight with MAX over the res-10 children, scoring a whole parent cell as conserved whenever one child was. The guide documented MAX only for the reduction *within* a cell (across overlapping units), which is correct, and said nothing about the second reduction *across child cells* when changing resolution. One keyword, two operations. Adds a gated subsection to Problem 3 stating both reductions in order, with the child-count divisor spelled out (7 per resolution step, 49 for res-10 -> res-8) and a worked res-8 example, plus a one-line pointer from "Joining Different Resolutions" — the section that steers models into coarsening in the first place. Verified against the report gold: the pattern gives 21.17% for ACE BioRank 5 (gold 21.09, MAX rollup 32.68) and 22.30% for channelized connectivity (gold 22.65, MAX rollup 25.58).
Gate result on dev: both rollup traps fixed, no baseline regressionValidated per Run: The two gates (numeric auto-grade, ±1.0 pp)
12/12 gate cells pass. For comparison, the 2026-07-31 measurement in #312 on the same two cells: sonnet-5 32.7/32.7 and 25.8/25.8, kimi-k3 21.2/32.7 and 25.8/25.8. The Baseline (same run — no collateral damage)
30/30 non-clarify baseline cells pass. The res-10 fractional path ( The one recurring miss, Aggregates: sonnet-5 15/16 (93.8%), kimi-k3 14/16 (87.5%), glm-5.2 14/16 (87.5%) — the deltas are entirely the clarify cell. Run records
Tooling this run requiredThe gate was not runnable as documented — the matrix runner had no MCP override and used the app config's production Not promoted to prod. Prod is still |
Prod moves from v0.8.10@sha256:df2ddd2 to v0.8.12@sha256:332d6df. Ships the #312 rollup fix (#350) — coarsening a coverage fraction is a mean over child cells, not MAX — gated on dev at main@7a4403e: 12/12 on the car-19 (res-8) and car-23 (res-9) benchmark cells across glm-5.2, kimi-k3 and claude-sonnet-5 at 2 trials, with 30/30 baseline. Also carries #348 (client-reachable STAC catalog URL), #347 (single outage runbook) and #349 (pin mcp SDK to 1.x), since v0.8.11 was tagged but never promoted.
Closes #312.
What was wrong
h3-guide.mddocumented the fractional-coverage overlay only for the same-resolution case, whereMAXreduces the overlapping units within one cell to a single weight. That is correct. But when the feature's native resolution is coarser than the overlay layer — ACE / plant-richness / freshwater-richness at res-8, connectivity at res-9, against the res-10 conserved layer — a second reduction is needed, across the child cells of each parent, and the guide said nothing about it. Models applied the same word one level up (GROUP BY h8 … MAX(w)), which says "if any res-10 sub-cell is conserved, the whole 0.74 km² res-8 cell is conserved."Measured in #312 on the shipping models: claude-sonnet-5 and kimi-k3 both returned 32.7% for ACE BioRank 5 (gold 21.09) and 25.8% for channelized connectivity (gold 22.65), in both trials. glm-5.2 passed both by never coarsening. The inflation scales with children per parent — ×1.55 at res-8 (49 children), ×1.15 at res-9 (7), ×1.00 at res-10 — which is why the CWHR habitat family has looked healthy throughout.
The change
One gated subsection in Problem 3, immediately after the existing overlay block, stating the two reductions in order with the divisor spelled out (
7per resolution step,49for res-10 → res-8) and a worked res-8 example. Plus a one-sentence pointer from Joining Different Resolutions — the section that steers a model into coarsening in the first place — distinguishing a measured quantity (SUM/AVG) from a coverage fraction (mean over children).Follows the prompt-artifact rules in
AGENTS.md: correct-shape SQL only (no ❌ block), aSkip unless …gate so the dominant same-resolution workload skims past, and the concrete dataset used only as an illustration of the general pattern.Ground truth
The pattern as written in the guide, run against the public catalog:
Both inside the ±1.0 pp tolerance on the benchmark cells.
Validation
Per
AGENTS.md→ Validating guidance changes: merge → dev picks up:main→ run theregressiontier fromgeo-agent-benchmarkagainst dev. The gates for this change arecar-19-ace-biorank5(trap: h3-rollup-mean-not-max-res8) andcar-23-channelized-connectivity(-res9), which ride in the same tier as the standing baseline, so fix and regression check share one run. Results posted below before any prod promotion.Not in scope
#312 also floats publishing res-8/res-9 GAP 1+2 companion assets of the conserved-areas layer so agents can join at the feature's native resolution without doing the rollup. That is a
data-workflowschange, not a guidance one, and is left for a separate issue.