-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Fix: Phishing Detection Dataset Discrepancies #1032
base: main
Are you sure you want to change the base?
Conversation
@@ -61,6 +61,22 @@ class PhishingDetectionDataStoreTests: XCTestCase { | |||
XCTAssertEqual(actualHashPrefix, expectedHashPrefix) | |||
} | |||
|
|||
func testWhenEmbeddedRevisionNewerThanOnDisk_ThenLoadEmbedded() async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should set the dataStore sets and revision to something else as well and then check which one of the two wins…
At the moment if loadRevisionFromDisk() < dataProvider.embeddedRevision { this line of code is not called at all from the test.
Also I would recommend to check both cases disk higher and embedded higher
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Steps work as described
I think we should keep the caching and if dos not work as it should means we are getting wrong values from the server… we should therefore update the server instead.
Please review the release process for BrowserServicesKit here.
Required:
Task/Issue URL: https://app.asana.com/0/1204023833050360/1208567121137949/f
iOS PR: duckduckgo/iOS#3469
macOS PR: duckduckgo/macos-browser#3440
What kind of version bump will this require?: Patch
Optional:
Tech Design URL:
CC:
Description:
In Implement desktop integration efficacy tests - 5-7 days it was discovered that Swift's client-side caching results in out-of-date datasets and significant dataset discrepancies between different clients. For example, it's very common for the same request to return different results from the backend, resulting in a client believing they are updating to a newer revision than they are. Over time, this compounds and results in disparate versions of the same dataset across different clients, putting users at risk of landing on newer phishing pages.
Fix:
Steps to test this PR:
echo "1650000" > "/System/Volumes/Data/Users/<user>/Library/Application Support/com.duckduckgo.macos.browser.debug/revision.txt"
cat "/System/Volumes/Data/Users/<user>/Library/Application Support/com.duckduckgo.macos.browser.debug/revision.txt"
OS Testing:
Internal references:
Software Engineering Expectations
Technical Design Template