Mark page-world extension writes with EXTENSION source
The previous cleanup deleted every isExtensionCaller() site, including the one in cookie/storage detectors that did fire reliably for the residual case: page-world extensions (MV3 main world, userscripts with @grant none) whose stack contains a chrome-/moz-/safari-web-extension frame at the synchronous write. Recover that signal for free by returning fromExtension from getInitiatorURL (it already walks the stack and discards extension frames via continue), and have the cookie and storage detectors report source: "extension" instead of "script" when the flag is set. End-to-end plumbing reuses the existing source column: extend the cookie_source Postgres enum with EXTENSION, add the CookieSourceExtension constant with a doc block describing each bucket's actual semantics, add the handler.go switch cases, expose EXTENSION on the GraphQL and MCP CookieSource enums, and add the Extension option to the console source filter. Update bestSource in the pattern analysis worker so a glob merging only extension-attributed exact patterns is no longer silently rolled up to PRE_EXISTING. New precedence is SCRIPT > EXTENSION > PRE_EXISTING, matching the upsert SQL's "page-script wins" rule and the asymmetric signal strength of each bucket. Out of scope: any behavioural use of EXTENSION (auto-exclusion, denylist classification, dashboard surfacing) -- that belongs in the follow-up backend denylist plan. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -32,6 +32,10 @@ enum CookieSource
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.CookieSourcePreExisting"
|
||||
)
|
||||
EXTENSION
|
||||
@goEnum(
|
||||
value: "go.probo.inc/probo/pkg/coredata.CookieSourceExtension"
|
||||
)
|
||||
}
|
||||
|
||||
enum TrackerType
|
||||
|
||||
Reference in New Issue
Block a user