Repository navigation
fix(shopping): keep chatgpt-shopping off brands that have Shopping disabled - #432
Merged
Merged
Conversation
…sabled Shopping tracking is opt-in per brand (#155), but nothing enforced the OFF side: the engine pickers offered chatgpt-shopping regardless of the pref (and default-checked it), fan-out Track copied it from the latest prompt's platforms, and the tracking worker ran whatever the stored arrays said. Two shopping-disabled brands accumulated it on 111 prompts — ~700 paid Cloro scrapes a week for data those brands can't see, with the rows leaking into analytics surfaces that don't exclude the platform yet. Three layers now enforce the pref: - prompt write actions (addPromptToSet, savePromptSet, updatePrompt) strip chatgpt-shopping when the brand's pref is off — one choke point covers manual adds, suggestion accepts and fan-out Track; the pref-ON auto-append behavior is unchanged - the tracking worker filters prompt.platforms by the pref at run time, so already-contaminated arrays stop producing scrapes immediately - the brand prompts page hides the ChatGPT Shopping engine when the pref is off
5 of 10 tasks
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.
Summary
Shopping tracking is opt-in per brand (#155), but nothing enforced the OFF side. Two shopping-disabled brands had accumulated
chatgpt-shoppingon 111 active prompts — roughly 700 paid Cloro scrapes a week for data those brands can't even see, with the rows leaking into analytics surfaces. How it spread: the engine pickers offered (and default-checked) ChatGPT Shopping regardless of the brand pref, fan-out Track copies the latest prompt's platforms verbatim, and the tracking worker runs whatever the stored arrays say.Three enforcement layers, so this can't regrow:
addPromptToSet,savePromptSet,updatePrompt) stripchatgpt-shoppingwhen the brand's pref is off — one server-side choke point covers manual adds, suggestion accepts and fan-out Track. The pref-ON behavior is unchanged:addPromptToSetstill auto-appends the platform, so fan-out Track on a Shopping-enabled brand keeps getting it.prompt.platformsby the brand pref at run time (same pattern as the plan-gated model filter), so already-contaminated arrays stop producing paid scrapes immediately on deploy.The existing 111 contaminated prompt rows were cleaned up separately (verified: 0 remaining on shopping-disabled brands; Shopping-enabled brands untouched).
Related Issue
Found while investigating the citations mismatch behind #429/#430.
Type of Change
How to Test
chatgpt-shoppinginprompts.platforms.chatgpt-shoppingappended automatically.platforms: [..., "chatgpt-shopping"]directly in the DB → a tracking run submits no shopping scrape and the progress total excludes it.Checklist
npx tsc --noEmitpasses