← Back to Pull requests

Categories: nest kept BC categories under the HOVEN tree, hide cancelled ones #6

Open
unknown opened this pull request with 203 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 31, 2026 14:11 UTC
Author

The category sync created bc-cat-<code> categories at the top level only, so the storefront menu listed every BC category while HOVEN's own were empty (368 published products, all in BC categories).

  • src/lib/category-placement.js: a table from the handle the sync gives a category to its parent in HOVEN's tree, taken from the team's reviewed mapping (docs/category-mapping.md in devzizo/essentials-starter, PR #70/#72). Cancelled categories («مرتبة» and the perfume sub-category) are set inactive.

  • src/sync/items.js (category stage): a new category is created under its parent; an existing one is moved once. The parents are read in the same call as the categories, so nesting costs no extra request, and a missing parent is reported in the run's notes, not guessed. Categories without a placement are untouched (accessories and the other undecided ones stay as they are: hiding accessories would hide about half of the published products).

  • Not covered here: deleting the demo clothing categories and moving روب حمام/أطفال/عائلي under «الأرواب» (not BC categories; done in the Medusa admin).
  • Checked: npm test 39/39 (8 new). The category stage was also run twice against a local HTTP server standing in for Medusa: the first run nests, hides and creates as above; the second run writes nothing.

    Heads up: PR #4 already conflicts with the default branch in README.md and public/index.html (not from this PR). Together with this PR it also conflicts in src/sync/items.js (both edit the item sync), so whichever merges second needs a small rebase.

    🤖 Generated with Claude Code

    Diff: 203 lines (+152 / -51) across 2 files Reviewer: claude[bot] Review duration: 3m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.36) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 203 lines diff across 2 files
    0.36
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 77% · Reviewer familiarity: 35%
    41%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.318
    Real PR Conversation Timeline
    1 comments
    "Review active on #6"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 41.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.3% (MEDIUM) · Higher = larger blast radius
    36.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 41.1% · Lower = rushed or shallow review
    41.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.4% · Safe to merge
    21.4%