Skip to content

fix(dedup): USGS type+country fallback + genesis-only place matching - #72

Merged
nullhack merged 1 commit into
mainfrom
fix/dedup-usgs-fallback-and-genesis-places
Jul 29, 2026
Merged

fix(dedup): USGS type+country fallback + genesis-only place matching#72
nullhack merged 1 commit into
mainfrom
fix/dedup-usgs-fallback-and-genesis-places

Conversation

@nullhack

Copy link
Copy Markdown
Owner

Two dedup fixes:

  1. USGS adapter: find_existing_incident now falls back to type+country matching when event-ID family matching returns None. Fixes duplicate incidents for same-day earthquakes in the same country (e.g. Japan M6.8 + M5.6 treated as separate events).

  2. ContentStore: find_active_incident_by_type_country now checks the genesis report's places ONLY instead of all linked reports. Prevents place contamination when a multi-country report (e.g. ERCC ES+FR+TN) links to an incident and inflates its country set.

2 files changed, +18/-14 lines.

USGS adapter find_existing_incident now falls back to type+country
matching when event-ID family matching returns None. Fixes duplicate
incidents for same-day earthquakes in the same country (e.g. Japan
M6.8 + M5.6 treated as separate events).

ContentStore.find_active_incident_by_type_country now checks the genesis
report's places ONLY instead of all linked reports. Prevents place
contamination when a multi-country report (e.g. ERCC ES+FR+TN) links
to an incident and inflates its country set.
@nullhack
nullhack merged commit 8ea449e into main Jul 29, 2026
1 check passed
@nullhack
nullhack deleted the fix/dedup-usgs-fallback-and-genesis-places branch July 29, 2026 07:22
nullhack added a commit that referenced this pull request Aug 3, 2026
…dent

Contaminated by place-contamination bug (fixed in PR #72).
Reports moved to new incidents with proper search_keys.
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