Technical Debt — Storefront Merchandising Section Accuracy Gaps
By Engineering Team•September 29, 2026•3 min read
| Metadata | Details |
|---|---|
| System | Storefront Product Discovery Sections |
| Document ID | TD-2026-SPD-007 |
| Author | Engineering Team |
| Status | Open |
This document tracks known implementation gaps in the shop screen’s product-discovery sections as first-class, ongoing debt items. SR-008 links here rather than restating gap detail, so the requirement text itself doesn’t quietly read as an already-met guarantee. See ADR-00016 for why these interim approaches were accepted rather than blocking section delivery on a recommendation engine.
TD-01 — Top Products ranks by recency, not real popularity
- Status: Open
- Severity: Medium — the section’s label promises “top,” but today’s ranking has no relationship to sales, views, or any popularity signal.
- Affected component:
product-catalog—GetTopProductsByCategory’s MongoDB aggregation (groups published products per category, selects the most recentlyupdated_atproduct per category). - Evidence: No
likes, sales-count, or view-count field exists on the product document in MongoDB, andinventory-service’s PostgreSQL schema has nocategory_idto group by, so a genuine cross-service popularity ranking isn’t possible with today’s schema. Ranking byupdated_atper category was the confirmed interim decision — seeshop-service’s own service-layer notes on this section. - Impact: A shopper opening “Top Products” sees whichever product in each category was most recently edited, not the category’s actual best seller — a mismatch between the section’s label and its real content.
- Remediation direction: Requires a real popularity signal (sales count, view count, or similar) to exist in either data store before this section can rank on anything other than recency — see TD-05, the root blocker.
- Related requirement: SR-008 FR-02
TD-02 — Most Popular is an interim heuristic with a hardcoded likes value
- Status: Open
- Severity: Medium — same root cause as TD-01, plus a hardcoded display field.
- Affected component:
shop-service’sMostPopularSectionjoin logic, reusingproduct-catalog’sGetTopProductsByCategory/GetNewArrivalswith a different limit/offset thanTopProductSection. - Evidence: The section’s product-facing
likesfield is hardcoded to0for every product, since no real like/popularity count exists in any schema; the offset/limit shift fromTopProductSectionexists purely to avoid rendering an identical list under two labels, not because it reflects a genuinely different selection criterion. - Impact: “Most Popular” and “Top Products” are, structurally, the same query with different pagination — a shopper who notices the overlap loses trust in both labels; the always-
0likes count is also visibly wrong if ever surfaced to a shopper as a real number. - Remediation direction: Same prerequisite as TD-01 — a real popularity signal. Once one exists, this section should be redefined against a criterion genuinely distinct from Top Products’ (e.g. views/adds-to-cart vs. sales count) rather than remaining a pagination offset of the same query.
- Related requirement: SR-008 FR-03
TD-03 — Just For You has no real per-shopper personalization signal
- Status: Open
- Severity: High — this section’s entire value proposition is personalization, and today it delivers none.
- Affected component:
shop-service’s call intoproduct-catalog’sGetJustForYou, and the section’s own selection logic. - Evidence:
GetJustForYouacceptstarget_demographics/tagsfilters, butshop-servicecalls it with neither populated today, so the query always falls through to its recency-sorted fallback — every shopper receives the identical, non-personalized result. - Impact: A section explicitly labeled as personal to the shopper is, in practice, indistinguishable from a generic recency-sorted list — the largest gap between a section’s label and its real content among all six sections.
- Remediation direction: A genuine recommendation engine for this section is this platform’s intended long-term direction (see ADR-00016), gated on TD-05’s event-tracking pipeline existing first so there is real per-shopper signal to personalize against.
- Related requirement: SR-008 FR-04
TD-04 — Cross-service join mismatches silently drop products with no visible signal
- Status: Open
- Severity: Low — a data-quality/observability gap, not a correctness issue for what does render.
- Affected component:
shop-service’s per-section join logic betweenproduct-catalog(MongoDB detail) andinventory-service(PostgreSQL pricing), bymongo_product_id. - Evidence: When a product id returned by one side of a join has no counterpart on the other (e.g. a product mid-migration with no pricing row yet), it is dropped from the section’s result and logged at info level only — no warning, alert, or merchandising-facing signal exists anywhere that a section is silently smaller than it should be.
- Impact: A merchandiser or operator has no way to notice that a section quietly lost a product due to a data-sync gap rather than a deliberate exclusion; a systemic issue (e.g. a batch of products missing pricing rows) could go unnoticed for an extended period.
- Remediation direction: Promote the drop from an info-level log to a metric (count of dropped joins per section, per tenant) so a systemic mismatch is visible on a dashboard rather than only discoverable by reading logs.
- Related requirement: SR-008 FR-08
TD-05 — No shopper-behavior event pipeline exists (root blocker)
- Status: Open
- Severity: High — the prerequisite blocking a real fix for TD-01, TD-02, and TD-03.
- Affected component: Platform-wide — no service in this monorepo captures shopper views, clicks, or purchase events today.
- Evidence: Neither
product-catalog’s MongoDB schema norinventory-service’s PostgreSQL schema has any view-count, click-count, or sales-aggregate field; no Pub/Sub topic or event pipeline for shopper behavior exists anywhere in the platform’s current architecture. - Impact: Top Products, Most Popular, and Just For You cannot move beyond their current recency/heuristic proxies without this pipeline existing first — it is the single shared dependency behind three of this document’s five entries.
- Remediation direction: Scope a dedicated event-tracking pipeline (capturing product views/clicks/purchases per shopper) as its own future project, per ADR-00016’s explicit deferral — not something any one section’s fix should attempt to solve in isolation.
- Related requirement: SR-008 NFR-02
Related Documents
- BRD-008 — Storefront Product Discovery Sections
- SR-008 — Storefront Product Discovery Sections System Requirements
- ADR-00016 — Query-Time Computation vs. a Dedicated Recommendation Engine for Storefront Merchandising Sections
- Architecture: shop-service — Mobile Storefront Screen Delivery (GraphQL)
- Microservices: shop-service, product-catalog, inventory-service