Conversation
Two corrections to the scoring cascade. Both change which rule id is recorded rather than the scores themselves. top_*_rule_id was argMax(rule_id, blocked). On a measurement that is not blocked the key is 0 on every row, so argMax kept whichever row it saw first. Every web_connectivity measurement carries one row per resolved IP plus one per redirect hop, and the redirect rows hold only HTTP, so they scored no_tls_data and were winning that tie. Rules now carry an Evidence level and are ranked on it before the score. DNS scoring was restricted to the system resolver and its window partitioned without the resolver, so every DNS signal was constant across a measurement and a row whose address came from another resolver inherited the system resolver's verdict. dns_untrusted is replaced by endpoint_untrusted, which additionally requires that nothing independent vouches for the address: either the control returned it too, or somebody completed a valid handshake for the expected name on it. RULES_VERSION goes to 2, so rows written before and after are distinguishable. Measured over a 10-minute production window (9,731 measurements), rescoring with the new code moves no *_blocked score and three rule ids, all tcp: endpoint_untrusted -> none. The new condition is strictly narrower than the one it replaces, so it can only unmask rows, never mask new ones. It is close to a no-op until web_connectivity 0.5 measurements reach the pipeline, which is what makes it safe to land first. Reprocessing steps are in the migration notes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #173 +/- ##
==========================================
+ Coverage 77.87% 83.77% +5.90%
==========================================
Files 33 89 +56
Lines 1939 5714 +3775
==========================================
+ Hits 1510 4787 +3277
- Misses 429 927 +498
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Two corrections to the scoring cascade. Both change which rule id is recorded rather than the scores themselves.
top_*_rule_id was argMax(rule_id, blocked). On a measurement that is not blocked the key is 0 on every row, so argMax kept whichever row it saw first. Every web_connectivity measurement carries one row per resolved IP plus one per redirect hop, and the redirect rows hold only HTTP, so they scored no_tls_data and were winning that tie. Rules now carry an Evidence level and are ranked on it before the score.
DNS scoring was restricted to the system resolver and its window partitioned without the resolver, so every DNS signal was constant across a measurement and a row whose address came from another resolver inherited the system resolver's verdict. dns_untrusted is replaced by endpoint_untrusted, which additionally requires that nothing independent vouches for the address: either the control returned it too, or somebody completed a valid handshake for the expected name on it.
RULES_VERSION goes to 2, so rows written before and after are distinguishable. Measured over a 10-minute production window (9,731 measurements), rescoring with the new code moves no *_blocked score and three rule ids, all tcp: endpoint_untrusted -> none. The new condition is strictly narrower than the one it replaces, so it can only unmask rows, never mask new ones. It is close to a no-op until web_connectivity 0.5 measurements reach the pipeline, which is what makes it safe to land first. Reprocessing steps are in the migration notes.