Sever tracker-detection's remaining ties to :app internals - #9804
Draft
aibrahim- wants to merge 1 commit into
Conversation
aibrahim-
added this pull request to stack #9805
September 17, 2026 10:20
aibrahim-
force-pushed
the
feature/aibrahim/tracker-detection/phase2-severing-prep
branch
from
September 17, 2026 10:28
63139ab to
c736ba3
Compare
Four things stopped the tracker-detection code from being moved out of :app as-is; none of them change behaviour. Moshi: TdsTracker's Room type converters and TrackerDataLoader went through :app's JsonModule, and the TDS response was parsed by the app-wide Retrofit converter, which is why ActionJsonAdapter had to be registered globally. TrackerDetectionJsonModule now owns a Moshi with that adapter, reachable both through the graph (@TrackerDetectionMoshi) and statically for Room, and TrackerListService returns the raw body so the tracker-detection Moshi parses it. :app's global Moshi no longer references tracker-detection code. Pixels: BLOCKLIST_TDS_FAILURE moves from AppPixelName to a tracker-detection-owned TrackerDetectionPixelName. The pixel name on the wire is unchanged. removeSubdomain: its only caller is TdsEntityLookup, so it moves from :app to common-utils alongside baseHost, with its test. cachedEntityLookup: its wrapper sat in com.duckduckgo.app.pixels .remoteconfig and moves next to the other tracker-detection flags. AndroidBrowserConfigFeature already lives in its own module, so no flag-access workaround is needed; the other two toggles the tech design listed have since been removed. Asana: https://app.asana.com/1/137249556945/task/1216988837236386 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
aibrahim-
force-pushed
the
feature/aibrahim/tracker-detection/phase2-severing-prep
branch
from
September 22, 2026 10:09
c736ba3 to
48f3c15
Compare
This branch has not been deployed
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.
Task/Issue URL: https://app.asana.com/1/137249556945/task/1216988837236386
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/task/1216706645739239
API Proposals URL(s) (if applicable): None — no
-apipublic surface changes in this PRDescription
Last PR of Phase 2. Four things stopped the tracker-detection code from being lifted out of
:appas-is; none of them change behaviour.Moshi.
TdsTracker's Room type converters andTrackerDataLoaderboth went through:app'sJsonModule, and the TDS response was parsed by the app-wide Retrofit converter — which is the reasonActionJsonAdapterhad to be registered on the global Moshi in the first place.TrackerDetectionJsonModulenow owns a Moshi carrying that adapter, reachable both through the graph (@TrackerDetectionMoshi) and statically for Room, which constructs type converters itself.TrackerListService.tds()returns the rawResponseBodyso the tracker-detection Moshi parses it, and:app's global Moshi no longer references tracker-detection code at all.This is the one change in the stack that is more than a move, so: same bytes, same adapter, same failure path — the parse just happens in
RealTrackerDataDownloaderinstead of inside Retrofit.Pixels.
BLOCKLIST_TDS_FAILUREmoves fromAppPixelNameto a tracker-detection-ownedTrackerDetectionPixelName. The pixel name on the wire is unchanged (blocklist_experiment_tds_download_failure), so this is not a telemetry change.removeSubdomain. Its only caller isTdsEntityLookup, so it moves from:apptocommon-utilsalongsidebaseHost, with its test.RC flags. The
cachedEntityLookupwrapper sat incom.duckduckgo.app.pixels.remoteconfigand moves next to the other tracker-detection flags. Note for anyone comparing against the tech design: the flag problem it worried about is moot now —optimizeTrackerEvaluationV3andprecompileTdsRegexhave since been removed, andAndroidBrowserConfigFeaturenow lives in its own module, so no Option A/B workaround is needed.Steps to test this PR
TDS parsing still works from both sources
R.raw.tdsparse pathPIR process still gets tracker data
:pirprocessUI changes