Repository navigation
Separate blocked-request counts from saved detection rows - #132
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.
A request from an already-blocked IP returns 403 before scoring, so it creates no new detection row. The dashboard previously showed saved detections and the size of the IP block list without a separate request-denial count. This adds explicit local request accounting and labels those measures separately.
A fresh trap can create a finding and an IP block; subsequent denied requests now increment Blocked requests without writing duplicate findings. Throttles, challenges and withheld enforcement are separate outcomes. The dashboard shows today's UTC counts, Statistics compares matching UTC calendar windows, and the Detections page explains that rows are findings rather than requests. Dashboard finding/IP summaries are read fresh alongside the new counters.
The new schema stores only UTC hour, a closed outcome enum and an atomic count. One request contributes once, even when several monitor decisions occur. Actual denial counts require the corresponding final HTTP status. Setup tests, nonces/permission failures, CLI maintenance, decoy responses and earlier Wordfence denials are excluded. Schema installation is retryable, tracking start is visible, no historical counts are invented, retention is 30 calendar days and uninstall removes the new storage. No protection decisions or cloud reporting contracts change.
Validation:
Both disposable containers were removed. This is an unreleased implementation; no marketplace/CDN release was published. Browser JavaScript, vendor signature feeds and full multisite integration remain outside this validation. Definitions, compact measurements and repeatable fixtures are included.