Repository navigation
Track private download counts in D1 - #1311
Merged
Merged
Conversation
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.
Record private, unsampled download request events from both update Workers through a retry queue into D1. Timestamped records distinguish Agent payloads, Research redirects, HEAD, ranges, metadata and explicit probes; event IDs deduplicate queue retries. Collection failures leave the original download response unchanged.
Adds an authenticated, read-only hourly/daily query CLI and a dead-letter recovery guide. No application version, signed release bytes, routes, domains or installer targets change. Research downloads served directly by GitHub remain outside Worker coverage.
Validation: 37 Agent Worker tests, 49 Research Worker tests, 9 Python query tests, real workerd Queue-to-D1 delivery/duplicate/outage recovery, commit hooks, workflow lint and the Nix workflow/change-detection checks passed locally. Hosted CI was not awaited under the requested release policy.
Deployed both existing Workers while retaining the current Research asset bundle and Agent R2 binding. All 54 public byte/header/ETag preservation checks and eight additional Agent alias checks passed. Eleven marked production event classes reached D1; the private hourly query returned exactly the four controlled Agent GET alias requests. Probe traffic is excluded by default. Routes, custom domains and preview settings were verified unchanged.