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
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.

Loading
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