Repository navigation
Verify the real USGS API path and fix withdrawal ordering - #4
Merged
Merged
Conversation
Zacharon
marked this pull request as ready for review
October 21, 2026 20:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The USGS path now has real local HTTP evidence: an explicitly authorized live run loaded 332 official source features into a new SQLite database, all 332 matched a later source snapshot by content hash, all 332 returned through
/api/events, and a saved-snapshot replay wrote no revisions.This exposed two correction-ordering defects: newer withdrawals were ignored after the first deletion, allowing an intervening older active record to resurface; invalid source update clocks could also bypass ordering. The patch advances withdrawal watermarks and rejects invalid source update times. It also preserves structured USGS measurements and source IDs in allowlisted API metadata, retaining existing Forge IDs and the shared envelope.
Validation: 153 tests discovered, 129 passed and 24 PostgreSQL cases skipped locally. The new regression checks fail against the original implementation. Added persistent fixture CLI→reopened SQLite→WSGI coverage and extended PostgreSQL 16 CI to run the USGS cases. Local live HTTP and repeated ingestion passed. Corrections/withdrawals use labeled synthetic fixtures; no live changes were fabricated. CI now passed on Python 3.11 and 3.12, and the PostgreSQL 16 job passed, including all 11 USGS ingestion cases. PostgreSQL coverage uses deterministic fixtures; live PostgreSQL ingestion and hosted Live Map integration remain unrun. No live defaults or publication/privacy gates changed.
Detailed evidence and remaining limits:
docs/USGS_REAL_DATA_VERIFICATION_2026-10-20.md.CI evidence: https://github.com/Zacharon/osint-forge/actions/runs/39377608372