PR Summary

What problems was I solving

The iptoasn.com IPv4-to-ASN feed (and potentially the Spamhaus ASNDROP blocklist) contains 4-byte ASN values in the RFC 6996 private-use range (4,200,000,000–4,294,967,294). These exceed the signed int4 maximum of 2,147,483,647, so page_analytics_service.asn_ranges.asn and page_analytics_service.asn_blocklist.asn could not accept that data before it was even loaded.

What user-facing changes did I ship

None. This is an internal schema correction for ASN reference data. The asnDailyRefreshWorkflow has not yet completed successfully, so the affected tables are empty and the migration runs with no data rewrite.

How I implemented it

Added migration 059.do.fix-asn-column-types.sql to ALTER both asn columns to bigint. Updated the baseline page_analytics_service.sql schema dump and regenerated the Sapatos TypeScript schema so reads use db.Int8String and inserts accept number | bigint | db.Int8String. Updated the migration-hash snapshot test so the new migration and revised baseline dump are covered by the contract test.

Description for the changelog

Fixed the asn column type from int4 to bigint in page_analytics_service.asn_ranges and page_analytics_service.asn_blocklist to support 4-byte ASN values in the iptoasn.com dataset. Updated the baseline schema dump, generated Sapatos types, and migration hash tests accordingly.

page-analytics-service: bigint ASN columns

high3 files
Change the asn column type from int4 to int8 in asn_ranges and asn_blocklist, updating the numbered migration, baseline schema dump, and generated Sapatos types.

page-analytics-service: migration contract tests

low1 file
Update expected SHA-256 hashes for the new bigint ASN migration and baseline schema in the migration contract test.