fix(functions): treat polish sets and bundles as non-polish, catch more accessories (#347) #452
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 388 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.357
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #452"
general
weight: 0.35
mattmck
Non-polish products were still showing on dev (e.g. shades 973 "$2 Mystery 3D Nail Art", 847 "Nail Care Buffer, 3 Pack", 1107 "2025 Nail Lacquer Countdown Box Overpours"). This tightens the product-category rules and treats polish sets/bundles as non-polish.
Decision: sets are non-polish (for now)
A set should ideally put each of its polishes in the owner's inventory, but identifying them from photos isn't reliable. Sets are classified
accessorywith evidenceset: skipped at ingestion (even when a Shopify store filter keeps the product) and hidden by the product-category backfill like accessories. No new category, no migration. Expanding a set later can match the polish names in its description text against the brand's catalog.Rules (audit query first, classifier mirrors it)
bundle,bundles-sets,collection-set,gift-set, ...).How it was checked
classifyProductCategoryagree on all 521 local shades.npm test(functions 2483 pass, all workspaces green via the hook).After merge
Dev's catalog was never reclassified: stamping plates, stickers, nippers and buffers are still
colorthere. Runnpm run backfill:product-category --workspace=swatchwatch-functions -- --out report.jsonagainst dev (dry run), review, then--write.Refs #347
🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Multi-polish sets and bundles are now classified as accessories rather than individual nail polishes, including when store-specific filters would otherwise allow them through.
Nail-art products and products with certain accessory terms are more consistently recognized as accessories.
Improved set detection helps distinguish collections from single polishes with similar names.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->