Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c148bd6
Add diagnostics pixels for harmony but keep legacy as source of truth
CrisBarreiro Mar 2, 2026
aba25a9
Improve pixel definitions
CrisBarreiro Mar 2, 2026
ca0737e
Document addHarmonyFixes
CrisBarreiro Mar 2, 2026
57790a4
Fix migration by allowing different legacy and harmony file names
CrisBarreiro Mar 2, 2026
42f21f3
Fix pixel being fired if harmony prefs are null
CrisBarreiro Mar 2, 2026
b419c86
Future proof getKey so that we can read easily from harmony later
CrisBarreiro Mar 3, 2026
3638d99
Put write guard behind feature flag
CrisBarreiro Mar 3, 2026
7fe9b7d
Handle secure storage exceptions
CrisBarreiro Mar 3, 2026
115db76
Don't swallow exceptions
CrisBarreiro Mar 3, 2026
a8c20d1
Add initialUseHarmonyValue as a pixel param
CrisBarreiro Mar 4, 2026
c1e02f3
Remove addHarmonyFixes
CrisBarreiro Mar 4, 2026
fedebb0
Don't open legacy prefs twice
CrisBarreiro Mar 4, 2026
5fe7303
Refactor SharedPreferencesProviderImpl to avoid duplicate code
CrisBarreiro Mar 4, 2026
2a9f0bb
Also pixel key missing from legacy
CrisBarreiro Mar 5, 2026
d296cf7
Add readFromHarmony pixel param (+4 squashed commits)
CrisBarreiro Mar 3, 2026
6e4c513
Pixel/send exception if necessary file is unavailable
CrisBarreiro Mar 5, 2026
ad9bb4d
Extract pixel params
CrisBarreiro Mar 5, 2026
7bb9af5
Remove caching
CrisBarreiro Mar 5, 2026
80f0303
Rollback write to legacy if harmony write failed
CrisBarreiro Mar 5, 2026
94d5f99
Still fire AUTOFILL_STORE_KEY_ALREADY_EXISTS if addWriteGuard is disa…
CrisBarreiro Mar 5, 2026
1dcd3a6
Only heal legacy after harmony failure if writeGuard is enabled
CrisBarreiro Mar 5, 2026
67b1986
Fix null file check being too aggressive
CrisBarreiro Mar 5, 2026
1f17bfa
Fire pixel before throwing exception
CrisBarreiro Mar 5, 2026
74d9d1c
Fix too aggressive pixel and add AUTOFILL_HARMONY_UPDATE_KEY_ROLLBACK…
CrisBarreiro Mar 5, 2026
32f4dcd
Guard rollback behind writeGuard and throw exception on legacy key mi…
CrisBarreiro Mar 5, 2026
b4beb88
Only enable readGuard, writeGuard and readFromHarmony if useHarmony i…
CrisBarreiro Mar 5, 2026
66cf219
Simplify flags setup
CrisBarreiro Mar 5, 2026
8b5a98b
Remove redundant check
CrisBarreiro Mar 5, 2026
e4977f4
Fix pixel definitions
CrisBarreiro Mar 5, 2026
cd183f2
Revert changes upstream
CrisBarreiro Mar 5, 2026
7d29446
Fix FakeSharedPreferencesProvider
CrisBarreiro Mar 5, 2026
a7199a6
Remove atb on new pixels
CrisBarreiro Mar 5, 2026
d7c6fb5
Add tests
CrisBarreiro Mar 5, 2026
bfef26a
Fix test failures
CrisBarreiro Mar 5, 2026
325e3fc
Don't swallow cancelation exceptions
CrisBarreiro Mar 5, 2026
a2a93b2
Fix harmony prefs being initialized even if useHarmony was null
CrisBarreiro Mar 5, 2026
fff312a
Wrap throwable as SecureStorageException when getKey failed
CrisBarreiro Mar 5, 2026
b0e388f
Only throw exception for AUTOFILL_PREFERENCES_UPDATE_KEY_FAILED if us…
CrisBarreiro Mar 5, 2026
0155222
Also wrap AUTOFILL_HARMONY_PREFERENCES_UPDATE_KEY_FAILED
CrisBarreiro Mar 5, 2026
d0f306e
Avoid duplicated pixels when prefs are null on getKey
CrisBarreiro Mar 5, 2026
dbf064c
Remove testing changes
CrisBarreiro Mar 5, 2026
244b223
Prevent corruption on updateKey even if harmony is null
CrisBarreiro Mar 5, 2026
8fca375
Update tests after fixes
CrisBarreiro Mar 5, 2026
8b5a0f9
Fix AUTOFILL_PREFERENCES_KEY_MISSING fired on null prefs
CrisBarreiro Mar 6, 2026
c7d3974
Fix lint issues
CrisBarreiro Mar 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
302 changes: 302 additions & 0 deletions PixelDefinitions/pixels/autofill.json5
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@
"key": "error",
"description": "The stacktrace for the error thrown, sanitized to remove potentially sensitive data",
"type": "string"
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
}
]
},
Expand All @@ -24,6 +42,24 @@
"key": "error",
"description": "The stacktrace for the error thrown, sanitized to remove potentially sensitive data",
"type": "string"
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
}
]
},
Expand All @@ -34,10 +70,34 @@
"suffixes": ["form_factor"],
"parameters": [
"appVersion",
{
"key": "key",
"description": "The name of the key that failed to update",
"type": "string",
"enum": ["KEY_GENERATED_PASSWORD", "KEY_L1KEY", "KEY_PASSWORD_SALT", "KEY_ENCRYPTED_L2KEY", "KEY_ENCRYPTED_L2KEY_IV"]
},
{
"key": "error",
"description": "The stacktrace for the error thrown, sanitized to remove potentially sensitive data",
"type": "string"
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
}
]
},
Expand All @@ -48,10 +108,34 @@
"suffixes": ["form_factor"],
"parameters": [
"appVersion",
{
"key": "key",
"description": "The name of the key that failed to update in Harmony",
"type": "string",
"enum": ["KEY_GENERATED_PASSWORD", "KEY_L1KEY", "KEY_PASSWORD_SALT", "KEY_ENCRYPTED_L2KEY", "KEY_ENCRYPTED_L2KEY_IV"]
},
{
"key": "error",
"description": "The stacktrace for the error thrown, sanitized to remove potentially sensitive data",
"type": "string"
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
}
]
},
Expand All @@ -62,10 +146,34 @@
"suffixes": ["form_factor"],
"parameters": [
"appVersion",
{
"key": "key",
"description": "The name of the key that failed to read from Harmony",
"type": "string",
"enum": ["KEY_GENERATED_PASSWORD", "KEY_L1KEY", "KEY_PASSWORD_SALT", "KEY_ENCRYPTED_L2KEY", "KEY_ENCRYPTED_L2KEY_IV"]
},
{
"key": "error",
"description": "The stacktrace for the error thrown, sanitized to remove potentially sensitive data",
"type": "string"
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
}
]
},
Expand All @@ -76,10 +184,204 @@
"suffixes": ["form_factor"],
"parameters": [
"appVersion",
{
"key": "key",
"description": "The name of the key that failed to read from legacy",
"type": "string",
"enum": ["KEY_GENERATED_PASSWORD", "KEY_L1KEY", "KEY_PASSWORD_SALT", "KEY_ENCRYPTED_L2KEY", "KEY_ENCRYPTED_L2KEY_IV"]
},
{
"key": "error",
"description": "The stacktrace for the error thrown, sanitized to remove potentially sensitive data",
"type": "string"
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
}
]
},
"autofill_harmony_key_mismatch": {
"description": "Harmony and legacy preferences both have non-null values for the same key but they differ (daily unique)",
"owners": ["CrisBarreiro"],
"triggers": ["exception"],
"suffixes": ["form_factor"],
"parameters": [
"appVersion",
{
"key": "key",
"description": "The name of the key that has a mismatch between Harmony and legacy",
"type": "string",
"enum": ["KEY_GENERATED_PASSWORD", "KEY_L1KEY", "KEY_PASSWORD_SALT", "KEY_ENCRYPTED_L2KEY", "KEY_ENCRYPTED_L2KEY_IV"]
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
}
]
},
"autofill_harmony_key_missing": {
"description": "Harmony preferences returns null for a key that exists in legacy preferences (daily unique)",
"owners": ["CrisBarreiro"],
"triggers": ["exception"],
"suffixes": ["form_factor"],
"parameters": [
"appVersion",
{
"key": "key",
"description": "The name of the key that is missing from Harmony",
"type": "string",
"enum": ["KEY_GENERATED_PASSWORD", "KEY_L1KEY", "KEY_PASSWORD_SALT", "KEY_ENCRYPTED_L2KEY", "KEY_ENCRYPTED_L2KEY_IV"]
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
}
]
},
"autofill_preferences_key_missing": {
"description": "Legacy preferences returns null for a key that exists in harmony preferences (daily unique)",
"owners": ["CrisBarreiro"],
"triggers": ["exception"],
"suffixes": ["form_factor"],
"parameters": [
"appVersion",
{
"key": "key",
"description": "The name of the key that is missing from legacy preferences",
"type": "string",
"enum": ["KEY_GENERATED_PASSWORD", "KEY_L1KEY", "KEY_PASSWORD_SALT", "KEY_ENCRYPTED_L2KEY", "KEY_ENCRYPTED_L2KEY_IV"]
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
}
]
},
"autofill_store_key_already_exists": {
"description": "Write guard blocked an attempt to overwrite an existing encryption key — prevents irreversible credential corruption (daily unique)",
"owners": ["CrisBarreiro"],
"triggers": ["exception"],
"suffixes": ["form_factor"],
"parameters": [
"appVersion",
{
"key": "key",
"description": "The name of the key that already exists and was protected from overwrite",
"type": "string",
"enum": ["KEY_GENERATED_PASSWORD", "KEY_L1KEY", "KEY_PASSWORD_SALT", "KEY_ENCRYPTED_L2KEY", "KEY_ENCRYPTED_L2KEY_IV"]
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
}
]
},
"autofill_harmony_update_key_rollback_failed": {
"description": "Rolling back legacy key write after Harmony write failure also failed (daily unique)",
"owners": ["CrisBarreiro"],
"triggers": ["exception"],
"suffixes": ["form_factor"],
"parameters": [
"appVersion",
{
"key": "key",
"description": "The name of the key that failed to rollback",
"type": "string",
"enum": ["KEY_GENERATED_PASSWORD", "KEY_L1KEY", "KEY_PASSWORD_SALT", "KEY_ENCRYPTED_L2KEY", "KEY_ENCRYPTED_L2KEY_IV"]
},
{
"key": "error",
"description": "The stacktrace for the rollback error, sanitized to remove potentially sensitive data",
"type": "string"
},
{
"key": "useHarmony",
"description": "Whether the useHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
},
{
"key": "initialHarmonyValue",
"description": "The value of useHarmony flag when harmony preferences were first initialized",
"type": "string",
"enum": ["true", "false", "null"]
},
{
"key": "readFromHarmony",
"description": "Whether the readFromHarmony feature flag is enabled",
"type": "string",
"enum": ["true", "false"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Four null_file pixels missing from pixel definitions file

Medium Severity

Four new pixels — AUTOFILL_PREFERENCES_UPDATE_KEY_NULL_FILE, AUTOFILL_HARMONY_PREFERENCES_UPDATE_KEY_NULL_FILE, AUTOFILL_PREFERENCES_GET_KEY_NULL_FILE, and AUTOFILL_HARMONY_PREFERENCES_GET_KEY_NULL_FILE — are defined in AutofillPixelNames.kt, registered in PixelParamRemovalInterceptor.kt, and actively fired from SecureStorageKeyStore.kt, but have no corresponding entry in autofill.json5. All other new pixels added in this PR are properly defined there. The project has a validate-ddg-pixel-defs CI script that validates definitions, so these omissions may block validation or result in undocumented anonymous measurements.


Please tell me if this was useful or not with a 👍 or 👎.

Additional Locations (1)

Fix in Cursor Fix in Web

}
]
},
Expand Down
Loading
Loading