fix(ingestion): merge the split Bee's Knees and LOUD brand rows #512
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 327 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.347
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #512"
general
weight: 0.35
mattmck
What
A data migration that folds two split brands back into one row each.
On dev, all 565 Bee's Knees shades sit on a brand row named
Bee's Knees(the store's vendor spelling), while the seededBee's Knees Lacquerrow is empty.LOUD(61 shades) /Loud Lacquer(empty) is the same case.Why an alias alone does not fix it
name_canonicalbeforebrand_alias(ingestion-repo.ts), so the vendor-named row keeps winning.20261106120000000seeds the alias only when no brand already has the vendor's exact name, so it skipped both.What the migration does, per pair
brand_id.brand_aliasin every handled case. Idempotent. Down is a no-op (the deleted row was empty).Tested
Run against the local database inside rolled-back transactions:
Bee's Knees Lacquerwith 565 shades, aliasBee's Knees, profile kept; second run changes nothingLOUDalias is addedFull test suite green in the commit hook.
After deploy
Bee's Knees Lacquerhas 565 active shades andLoud Lacquer61.LeMiniMacaronShopifyfrom the Sources tab so the brand-store correction moves its shades fromLe Mini Macaron EuropetoLe Mini Macaron.🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Improved consistency for Bee’s Knees and Loud Lacquer brand listings by consolidating eligible duplicate entries and preserving their aliases and ingest information.
When only one spelling exists, the listing is updated or its alternate spelling is recorded as an alias.
When consolidation isn’t possible because the canonical listing contains products or both entries have ingest profiles, the existing entries remain unchanged.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->