Skip to content

baseline(#40): add h0-not-a-boundary region-subset trap (global-30x30 q5) - #87

Merged
cboettig merged 1 commit into
mainfrom
baseline/h0-region-subset-trap
Jul 15, 2026
Merged

baseline(#40): add h0-not-a-boundary region-subset trap (global-30x30 q5)#87
cboettig merged 1 commit into
mainfrom
baseline/h0-region-subset-trap

Conversation

@cboettig

Copy link
Copy Markdown
Member

Grow-on-fix addition to the #40 standing baseline, guarding the geo-agent #322/#325 fix.

Trap

Subsetting a global value dataset (carbon) to a state via WHERE h0 IN (…) renders whole res-0 base cells (~4.35M km² each), not the state — h0 is the hive partition key, not a boundary. Correct: clip via the census state hex mask at the finest shared resolution (h8).

New question (answer-mode, global-30x30 q5)

How much irrecoverable carbon (2024 layer) is stored in California?

  • gold: ≈ 400 Mt C (3.999e8 Mg C); cross-check FL ≈ 466 Mt C.
  • reject: ~2,543 Mt (2.543e9) — the h0-only whole-base-cell total (6.4× too high).
  • traps: h0-not-a-boundary, region-subset-finest-shared-res.

Operator-verified via duckdb-geo 2026-07-15 (v0.8.7); authoritative SQL in gold/global-30x30.md. golden.json regenerated via build_golden.py (30 questions).

The tool-mechanics halves of this work (#321 sql-alias, #326 schema-title-leak) are covered by deterministic pytest in mcp-data-server; this captures the behavioral region-subset trap that only shows up through a model.

… q5)

Grow-on-fix for the geo-agent #322/#325 fix (region subset via WHERE h0 IN (…)
renders whole res-0 base cells instead of the state). New answer-mode question
'How much irrecoverable carbon (2024) is stored in California?' guards traps
h0-not-a-boundary + region-subset-finest-shared-res.

Operator-verified via duckdb-geo (2026-07-15, v0.8.7):
- CA correct 3.999e8 Mg C (~400 Mt); h0-only trap 2.543e9 (6.4x too high)
- FL correct 4.658e8 Mg C (~466 Mt); h0-only trap 1.934e9 (single base cell)
Gold + authoritative SQL in gold/global-30x30.md; golden.json regenerated.
@cboettig
cboettig merged commit cdac5ba into main Jul 15, 2026
1 check passed
@cboettig
cboettig deleted the baseline/h0-region-subset-trap branch July 15, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant