Technical Debt — Recently Viewed Products Gaps

By Engineering Team•October 10, 2026•3 min read
Metadata Details
System Name Recently Viewed Products — product-catalog
Document ID TD-2026-PERS-001
Author Engineering Team
Status Open

TD-22 — No retry or dead-letter path for a failed recent-view publish

  • Status: Open
  • Severity: Low
  • Affected component: product-catalog/src/internal/message_publisher/recent_view_event_publisher.go, called from internal/service/product/crud/product_crud.svc.go’s publishRecentView.
  • Evidence: publishRecentView spawns a goroutine over context.WithoutCancel(ctx) and calls RecentViewEventPublisher.Publish; on error, the only action taken is log.LogErrorWithTrace(bgCtx, "GetFullDetail: failed to publish recent view event", zap.Error(err)). There is no outbox table, no retry queue, and no dead-letter topic — a failed publish call simply ends there.
  • Impact: A shopper who views a product during a transient Pub/Sub outage (or any other publish-time failure) silently gets no recently-viewed entry for that view, with no record anywhere that the loss occurred beyond a log line. This is low-stakes — a missing “recently viewed” entry is not a missed order, payment, or shipment — but it is a real, observable product gap: the shopper did everything right (viewed the product while signed in) and the feature still didn’t work for that one view, with no way for support or engineering to detect or recover it after the fact without grepping logs.
  • Remediation direction: If this proves to matter in practice (worth confirming with real failure-rate data before building anything), the lowest-friction fix consistent with this monorepo’s existing patterns is a dead-letter topic the publisher falls back to on error, or — mirroring document-service’s audit-trail consumer pattern — an idempotent retry on the consumer side keyed by (tenant_id, user_id, product_id) rather than a new outbox table in product-catalog specifically for this one low-stakes event type.
  • Related requirement: SR-028 NFR-01.

TD-23 — Recently viewed history has no retention policy and is not reachable by any account-deletion flow

  • Status: Open
  • Severity: Low
  • Affected component: user-preference-service’s recent_views Mongo collection.
  • Evidence: recent_views has no TTL, no retention policy, and no deletion trigger of its own — a shopper’s history persists indefinitely while the account exists. Separately, account deletion itself is not a built feature anywhere in this monorepo today: ui-application’s deletion confirmation sheet is a local, non-functional stub with no backend endpoint (see Technical Debt — Customer Settings Gaps, TD-03), so even if a shopper asks to close their account, nothing purges this collection.
  • Impact: This is personal, per-shopper data (BRD-027 BR-07) with no erasure path — a correctness/compliance gap once account-deletion is actually built, since that future flow will need to know recent_views exists and purge it explicitly; it will not happen automatically as a side effect of deactivating the account identity.
  • Remediation direction: Not a fix this document should carry on its own — this is a line item for whichever future change implements real account deletion (tracked in TD-00020, TD-03) to fan out to and delete this shopper’s recent_views document, alongside wishlist and every other per-shopper collection. No speculative work is warranted in user-preference-service ahead of that initiative actually starting.
  • Related requirement: SR-028 NFR-04; Technical Debt — Customer Settings Gaps TD-03.