Repository navigation
Automate weekly DB merge and publish; replace dead test with a source oracle - #18
Merged
Merged
Conversation
The weekly update PR was opened with GITHUB_TOKEN, so CI never ran on it, and nothing merged or published it: PR #15 sat for eight weeks and the bundled and CDN databases went stale. The workflow now dispatches CI on its PR, merges when CI passes, and publishes the merged pair to R2 (needs CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_R2_PUBLISH_TOKEN). RandomIPVerificationTest skipped unconditionally and asserted nothing. It is replaced by SourceOracleTests, which checks the first and last address of every v4 and v6 source row against the bundled database when the manifest's exact builder inputs are present. The update workflow requires it to run. Fixes #16. Fixes #17. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A8mvWkYd1YBhFyvbFx7UF7
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.
Summary
The weekly database refresh stalled for two months because its PR got no CI and nothing merged or published it (#17). This makes the pipeline unattended end to end, with every gate machine-run, and replaces a test that never ran (#16) with one that checks the bundled database against every row of the data it was built from.
Changes
update-database.yml: after its existing gates (±20% thresholds, full suite), it opens the PR, dispatchesci.ymlon the PR head (workflow_dispatchis the one eventGITHUB_TOKENmay trigger), waits for CI withgh run watch --exit-status, merges with--match-head-commit, then apublish-databasejob checks out the merge commit and runsScripts/publish-database.sh publish. Publishing fails loudly if the secrets are missing.ci.yml: addsworkflow_dispatch.SourceOracleTests(new): for each v4/v6 source TSV whose SHA-256 matches the manifest'sbuilderInput, looks up the first and last address of every row and requires the row's ASN and name (or no result for ASN 0). Skips when sources are absent;IP2ASN_REQUIRE_SOURCE_ORACLE=1turns the skip into a failure, and the update workflow sets it.RandomIPVerificationTest: unconditionalXCTSkip, no assertions, string-compared IPs, shelled out towhois.Verification
IP2ASN_REQUIRE_SOURCE_ORACLE=1.actionlint: only a pre-existing SC2129 style note in the unchanged "Check for changes" step.Not yet verified: the dispatch/merge/publish steps run only in Actions; they get exercised by dispatching the workflow after merge. Publishing needs
CLOUDFLARE_R2_PUBLISH_TOKEN(andCLOUDFLARE_ACCOUNT_ID) set as repo secrets first.Fixes #16. Fixes #17.
🤖 Generated with Claude Code
https://claude.ai/code/session_01A8mvWkYd1YBhFyvbFx7UF7