fix(LLMO-4058): use type 'base' instead of 'url' in brand_sites writes [PROD REGRESSION]#2200
Closed
irenelagno wants to merge 3 commits intomainfrom
Closed
fix(LLMO-4058): use type 'base' instead of 'url' in brand_sites writes [PROD REGRESSION]#2200irenelagno wants to merge 3 commits intomainfrom
irenelagno wants to merge 3 commits intomainfrom
Conversation
The brand_sites_type_check constraint (added in #2149) only allows 'base' and 'localized'. All brand URL callsites were still passing type: 'url', causing upsertBrand to fail silently and leaving v2 onboarded sites without an active brand — which in turn caused the DRS brand-presence scheduler to 422. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
Fix cherry-picked into PR #2171 — closing this duplicate. |
…s URLs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
This PR will trigger a patch release when merged. |
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.
PR #2149 (merged 2026-04-09) added
brand_sites_type_checkwhich only allows'base'and'localized'. All brand URL callsites still passedtype: 'url', causingupsertBrandto throw a constraint violation on every v2 onboarding since April 9.The error is silently caught as a
WARN, so onboarding completes — but no brand row exists in PostgREST. Downstream effect:spacecat-audit-workercan't resolvebrandId→ DRS brand-presence scheduler returns 422 for all affected sites.Affected on prod: any org with
brandalf=truefeature flag that triggered an onboarding after April 9.What changed
4 callsites changed
type: 'url'→type: 'base':src/controllers/llmo/llmo-onboarding.jsbuildInitialCustomerConfigV2(brand update path)src/controllers/llmo/llmo-onboarding.jsensureInitialCustomerConfigV2(add-brand path)src/controllers/llmo/llmo-onboarding.jsperformLlmoOnboarding(v2upsertBrandcall)src/support/customer-config-mapper.jsconvertV1ToV2Test plan
npm test(4 previously-failing assertions now updated)brands+brand_siteswithtype = 'base'🤖 Generated with Claude Code