Skip to content

Add support for breakageData parameter#7614

Merged
GuiltyDolphin merged 4 commits intodevelopfrom
gd-breakageData
Feb 26, 2026
Merged

Add support for breakageData parameter#7614
GuiltyDolphin merged 4 commits intodevelopfrom
gd-breakageData

Conversation

@GuiltyDolphin
Copy link
Copy Markdown
Member

@GuiltyDolphin GuiltyDolphin commented Jan 28, 2026

Task/Issue URL: https://app.asana.com/1/137249556945/project/1212311623899110/task/1213015238129927?focus=true

Description

Adds support for the breakageData parameter which is passed from CSS.

The parameter is returned as part of the Content Scope Scripts breakage reporting feature as a pre-encoded string which should then be passed along as-is to the breakage report request without further encoding.

Steps to test this PR

Covered by unit tests and reference tests (duckduckgo/privacy-reference-tests#156).

I've manually tested the change and can see the breakageData parameter populated correctly.

  1. Make sure you're using the latest Content Scope Scripts
  2. Set the state of webDetection, webInterferenceDetection, and breakageReporting to "enabled" in the remote config
  3. Visit https://duckduckgo.com/?q=disable%20adblocker
  4. Add logcat filtering for breakageData
  5. Make a breakage report. Verify that you can see the populated parameter (e.g., breakageData=%7B%22webDetection%22%3A%5B%7B%22detectorId%22%3A%22adwalls.generic_en%22%2C%22detected%22%3Atrue%7D%5D%2C%22detectorData%22%3A%7B%22botDetection%22%3A%7B%22detected%22%3Afalse%2C%22type%22%3A%22botDetection%22%2C%22results%22%3A%5B%5D%7D%2C%22fraudDetection%22%3A%7B%22detected%22%3Afalse%2C%22type%22%3A%22fraudDetection%22%2C%22results%22%3A%5B%5D%7D%2C%22adwallDetection%22%3A%7B%22detected%22%3Atrue%2C%22type%22%3A%22adwallDetection%22%2C%22results%22%3A%5B%7B%22detected%22%3Atrue%2C%22detectorId%22%3A%22generic%22%7D%5D%7D%2C%22youtubeAds%22%3A%7B%22detected%22%3Afalse%2C%22type%22%3A%22youtubeAds%22%2C%22results%22%3A%5B%5D%7D%7D%7D&test=1)

Note

Medium Risk
Medium risk because it changes the broken-site reporting payload and encoding path; incorrect handling could break report submission or produce malformed analytics data.

Overview
Adds end-to-end support for a new breakageData field in broken-site reporting, captured from content-scope-scripts and stored in BrokenSiteContext.

Plumbs breakageData through report construction (BrokenSiteData/BrokenSite) and updates the sender to include it in encodedParams without re-encoding (treating it as pre-encoded). Updates unit/reference tests to cover null vs present breakageData behavior.

Written by Cursor Bugbot for commit ace8968. This will update automatically on new commits. Configure here.

@GuiltyDolphin GuiltyDolphin marked this pull request as ready for review January 29, 2026 11:08
@GuiltyDolphin GuiltyDolphin self-assigned this Feb 2, 2026
Copy link
Copy Markdown
Collaborator

@CrisBarreiro CrisBarreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I'll assist with testing

Copy link
Copy Markdown
Collaborator

@CrisBarreiro CrisBarreiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GuiltyDolphin, Android doesn't send the entire JSON payload to C-S-S, as other platforms do. As a result, we don't handle the RC flags for breakageReporting, breakageDetection, or other detectors, nor send it to C-S-S. For this to work, you'd need process those flags and send its config to C-S-S through implementations of ContentScopeConfigPlugin

@GuiltyDolphin GuiltyDolphin marked this pull request as draft February 25, 2026 13:40
@GuiltyDolphin GuiltyDolphin marked this pull request as ready for review February 25, 2026 15:52
@GuiltyDolphin
Copy link
Copy Markdown
Member Author

Thanks @CrisBarreiro. I applied the changes you suggested and have re-tested.

@GuiltyDolphin GuiltyDolphin merged commit ef08eb2 into develop Feb 26, 2026
12 checks passed
@GuiltyDolphin GuiltyDolphin deleted the gd-breakageData branch February 26, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants