feat(ingestion): retailer mode, Harlow & Co, Beyond Polish, Hypnotic Polish, vendor-code aliases and source image removal (brand sources Phase B) #503
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 524 lines diff across 6 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.375
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #503"
general
weight: 0.35
mattmck
Summary
Phase B of the brand-sources ingestion plan (
docs/superpowers/plans/2026-11-08-brand-sources-ingestion.md, Tasks 4–9b, 19 commits), stacked on #502 (Phase A). Retailer mode for the generic Shopify connector and the three multi-brand retailers from the evaluation (docs/brand-sources-evaluation-2026-11.md).lib/connectors/retailer-title.ts):parseRetailerTitle(title, brand, extraPrefixes?)readsBrand - Shade - Line #CODEtitles (vendor prefix, product line, dotted / glued vendor codes ≥ 2 chars, sizes, set detection withisRetailerSetSegment, end-anchored so "Set Sail" stays a shade).shopify-generic.ts): retailer/feed sources resolve the vendor throughmetadata.vendorAliases(resolveRetailerVendor; a vendor-less product is skipped,metadata.vendorlessSkipped), parse the listing title, and emit records withfinishes: [],collections: [],listingTitle,productLine,vendorCode,discontinued,kind; pipe tag markers (|| Top Coat) are stripped. Polish Pickup keeps its own parser. New envSHOPIFY_CONNECTOR_PAGE_DELAY_MS(default 1000, Terraform-wired) paces multi-page catalogs.HarlowAndCoShopify, enabled, CAD, migration20261108120000000), Beyond Polish (BeyondPolishShopify, enabled, USD,includeGel false,maxPages 100, migration20261108130000000), Hypnotic Polish (HypnoticPolishShopify, disabled / pending approval, EUR, migration20261108140000000), each with a store filter, a fixture and tests; Beyond Polish has an end-to-end fake-DB ingest test over a real-pull fixture. NoimagesPermittedon any of them: no images stored until the owner records the store's OK.vendorCodeand raw title becomeshade_aliasrows, so a scanned OPI bottle labelled NLB83 matches through catalog search.docs/queries/reseller-duplicates.sqlis the post-run duplicate audit.POST /api/images-admin/source-images/remove,npm run remove:source-images, Backfills tab): for a disabled source, unlink and delete its catalog images and blobs in keyset batches; labeled / color-feature images and shared blobs are kept.Not done here (owner checklist)
metadata.imagesPermitted = trueand re-run.INGESTION_WORKER_TIME_BUDGET_MS), then rundocs/queries/reseller-duplicates.sqland record the per-brand counts.Test plan
npm run build:functions && npm run test --workspace=swatchwatch-functions(3330 tests, 3328 pass, 2 skipped)npm run typecheck,npm run lint🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Added retailer listing support for Harlow & Co. and Beyond Polish, with improved shade, product-line, vendor-code, and brand recognition. Hypnotic Polish is available as a disabled, pending-approval source.
Added an admin tool and command-line option to remove images from disabled sources, with dry-run mode, batch processing, progress reporting, and safeguards for shared or labeled images.
Added configurable Shopify page limits and request delays, including per-source page-limit overrides.
Bug Fixes
Improved image-removal reports to preserve batch failures and resume progress when a batch encounters errors.
Documentation
Expanded guidance for retailer sources, Shopify settings, and image cleanup workflows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->