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 frominternal/service/product/crud/product_crud.svc.go’spublishRecentView. - Evidence:
publishRecentViewspawns a goroutine overcontext.WithoutCancel(ctx)and callsRecentViewEventPublisher.Publish; on error, the only action taken islog.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 inproduct-catalogspecifically 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’srecent_viewsMongo collection. - Evidence:
recent_viewshas 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_viewsexists 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_viewsdocument, alongsidewishlistand every other per-shopper collection. No speculative work is warranted inuser-preference-serviceahead of that initiative actually starting. - Related requirement: SR-028 NFR-04; Technical Debt — Customer Settings Gaps TD-03.
Related Documents
- BRD-027 — Recently Viewed Products
- SR-028 — Recently Viewed Products: System Requirements
- ADR-00042 — Recently Viewed Products: Resilient Event-Stream Capture vs. a Synchronous Call From the UI
- Architecture — Recently Viewed Products: Component Topology and Data Flow
- Technical Debt — Customer Settings Gaps — owns the account-deletion backend work this entry depends on
- Microservices: product-catalog, user-preference-service