---
title: Risks and Technical Debt
summary: Prioritized architectural exposures and known compromises with actionable treatment and closure evidence.
owners:
  - architecture-enabling-team
badges:
  - content: Architecture
    backgroundColor: blue
    textColor: blue
---

This register separates uncertain future exposures from known compromises and missing verification, ranks them by likelihood and impact, and tracks mitigation through observable closure evidence. Review it when contracts, data ownership, security controls, or operational assumptions change; qualitative ratings are not risk acceptance.

<Admonition type="warning" title="Immediate attention">
  **R-03:** Confirm that every model and tool path enforces privacy and authorization controls; disable any path that fails verification.

**R-01:** Exercise duplicate delivery and timeout-after-side-effect cases; make uncertain outcomes visible and safe to reconcile.

**R-02:** Rehearse restoration and dependency-outage procedures for authoritative state before relying on recovery targets.

</Admonition>

## Architectural and operational risks

The likelihood and impact ratings are qualitative: **H** high, **M** medium, and **L** low. “Mitigating” means safeguards or treatment exist but closure evidence is incomplete.

| ID       | Risk                                                                                                                                                                                                                                                    | Affected Building Blocks / Quality Goals                                                              | Likelihood (H/M/L) | Impact (H/M/L) | Mitigation / Contingency                                                                                                                                                                                                                          | Status                                        |
| :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------- | :----------------: | :------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-------------------------------------------- |
| **R-03** | A model integration or tool path may bypass privacy screening or authorization, exposing personal data or allowing an unapproved action and causing a privacy incident or loss of customer trust.                                                       | Conversational, Reviews, MCP Tools; Security, Privacy, Correctness; QS-09, QS-10, QS-15               |         M          |       H        | Inventory every model and tool path; verify least privilege, sensitive-data handling, and fail-closed behavior with synthetic fixtures. Disable a path that fails verification and use a non-AI fallback until corrected.                         | Mitigating; full-path evidence open           |
| **R-01** | At-least-once delivery, retries, or ambiguous timeouts may repeat basket cleanup or external notification effects, creating duplicate customer-visible outcomes or difficult reconciliation.                                                            | Ordering, Finance, Basket, Notification; Correctness, Reliability, Operability; QS-02, QS-08          |         M          |       H        | Test duplicate delivery and timeout-after-effect cases. Define idempotency per operation and surface uncertain outcomes. Reconcile before replay when the prior effect cannot be determined.                                                      | Open                                          |
| **R-02** | A store, service, or external provider outage may exceed recovery expectations because availability, alerting, failover, and restore behavior have not been demonstrated under production-like conditions; recovery may lose data or prolong an outage. | All service-owned stores, Platform, external providers; Reliability, Operability; QS-06, QS-13, QS-14 |         M          |       H        | Run isolated outage and restore drills for each authoritative store; measure recovery and data loss against approved targets. Maintain provider-specific recovery steps and degrade affected customer journeys when dependencies are unavailable. | Open                                          |
| **R-05** | An undocumented consumer or semantic contract change may evade schema checks and break a dependent capability, causing failed requests or message processing.                                                                                           | All contract producers and consumers; Interoperability, Deployability; QS-03, QS-04                   |         M          |       H        | Maintain a producer-consumer inventory, review behavioral changes as well as schema changes, and require compatibility evidence before release. For a regression, roll back or use a staged version migration.                                    | Mitigating; unknown-consumer exposure remains |
| **R-04** | A backlog or dependency outage may leave derived search or rating views stale after authoritative data changes, misleading discovery even though catalog data remains authoritative for purchase decisions.                                             | Catalog, Scheduler, Catalog Ingestion, Reviews; Correctness, Reliability, Performance; QS-07          |         M          |       M        | Measure per-change projection lag, alert on growing backlog, and verify replay and rebuild behavior. Keep purchase decisions on authoritative catalog data; suppress or clearly degrade stale discovery results when needed.                      | Mitigating; freshness target unapproved       |

<Accordion title="Closure evidence for critical exposures">
	**R-03:** Record the inventory of model and tool paths and retain sanitized results showing that
	unauthorized calls are denied and synthetic sensitive data is not disclosed.

    **R-01:** Record duplicate and ambiguous-timeout outcomes, including the deduplication or
    compensation behavior and how operators determine whether replay is safe.

    **R-02:** Record one successful restore exercise per authoritative store and an outage exercise,
    including measured recovery time, data loss, and comparison with approved objectives.

</Accordion>

## Technical debt

These are known compromises or evidence gaps, not uncertain future events. Priority reflects the cost of leaving each item unresolved.

| ID        | Technical Debt Item                                                                                                                                                                                       | Affected Scope                                              | Business / Technical Impact                                                                                                        | Remediation Plan                                                                                                                                                                                                                               | Priority |
| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: |
| **TD-01** | The duplicate-request guard does not make the complete checkout operation an atomic exactly-once transaction; a concurrent request or failure after key creation can leave an outcome requiring recovery. | Ordering checkout and downstream effects                    | A retry may be blocked after incomplete work, or an ambiguous result may lead to repeated downstream effects.                      | Document the actual guarantee; test concurrent requests and failures after request registration; choose and implement explicit recovery or compensation semantics. Link: [[doc\|arc42/10-quality-requirements/002-quality-scenarios]] (QS-02). |   High   |
| **TD-02** | The production operations profile is incomplete: service-specific alerts, scaling limits, ingress protections, and store recovery procedures are not all finalized and rehearsed.                         | Platform operations and service owners                      | Incidents may go undetected or take longer to contain and recover; configured infrastructure alone does not demonstrate readiness. | Assign an owner to each operating control, finalize thresholds and runbooks, and rehearse the procedures in the target environment. Link: [[doc\|arc42/10-quality-requirements/002-quality-scenarios]] (QS-06, QS-13, QS-14).                  |   High   |
| **TD-03** | Numerical quality budgets remain proposals rather than owner-approved service commitments.                                                                                                                | Product, service owners, and operations                     | Teams cannot consistently judge release readiness or resolve trade-offs against shared targets.                                    | Assign decision owners and approve or revise measurement conditions and thresholds before using them as release gates. Link: [[doc\|arc42/10-quality-requirements/002-quality-scenarios]] (QS-04 through QS-17).                               |  Medium  |
| **TD-04** | No recorded pass/fail evaluation evidence exists for the quality scenario set under frozen conditions.                                                                                                    | All quality attributes                                      | Architecture reviews cannot distinguish implemented mechanisms from demonstrated end-to-end outcomes.                              | Evaluate scenarios by risk, record conditions and measured results, and track failures to an owner and retest trigger. Link: [[doc\|arc42/10-quality-requirements/002-quality-scenarios]] (QS-01 through QS-17).                               |   High   |
| **TD-05** | Critical cross-service persistence workflows and the customer checkout journey lack sufficient automated integration and end-to-end verification.                                                         | Ordering, Finance, Catalog, Shopping, and customer commerce | Regressions across persistence, messaging, and customer-visible behavior may pass unit or contract checks.                         | Add isolated integration coverage for checkout, saga, and persistence boundaries; add customer-journey and accessibility checks for checkout. Link: [[doc\|arc42/10-quality-requirements/002-quality-scenarios]] (QS-01, QS-11, QS-12, QS-16). |   High   |
| **TD-06** | Older architecture records still describe persistence choices that have been superseded for Reviews, Finance, Notification, and Chat.                                                                     | Architecture records and operational guidance               | Contributors may follow obsolete ownership or recovery assumptions, resulting in incorrect changes or incident procedures.         | Mark superseded records clearly, link each to its current decision, and review related guidance when persistence changes. Reference: [[doc\|arc42/09-architecture-decisions]].                                                                 |  Medium  |

### Known Contract and Runtime Quirks

Concrete contract/runtime mismatches discovered during post-rewrite catalog verification. Service-level engineering invariants and workarounds live alongside each owning service.

| ID        | Quirk / Mismatch                                                                                                             | Affected Resources                                                                                     | Impact                                                                                  | Remediation Direction                                                                                                               |
| :-------- | :--------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------- |
| **TD-07** | Image upload pre-processor expects a different multipart field shape than the endpoint validator under certain payloads.     | [[command\|CreateBook]], [[service\|catalog-api]]                                                      | Valid client uploads may fail validation unexpectedly.                                  | Align pre-processor binding and endpoint validation rules; add contract regression tests.                                           |
| **TD-08** | Publisher creation and update enforce inconsistent maximum name lengths.                                                     | [[command\|CreatePublisher]], [[command\|UpdatePublisher]], [[service\|catalog-api]]                   | Names accepted on creation can be rejected on update.                                   | Unify max-length constraints across create/update validators.                                                                       |
| **TD-09** | Creating a buyer with an existing identifier surfaces a database duplicate-key violation as `500` instead of `409`.          | [[command\|CreateBuyer]], [[service\|order-api]]                                                       | Clients treat `500` as transient and retry instead of reconciling existing buyer state. | Map duplicate-key exceptions to `409 Conflict` ProblemDetails.                                                                      |
| **TD-10** | [[query\|GetBasketGrpc]] returns an empty basket rather than `NotFound`, and checkout does not reject an empty item list.    | [[command\|CreateOrder]], [[query\|GetBasketGrpc]], [[service\|order-api]], [[service\|basket-api]]    | Empty baskets can persist as `201 Created` orders with zero line items.                 | Reject empty-item checkouts with `400 Bad Request` before persistence.                                                              |
| **TD-11** | Deleting a buyer with existing orders triggers an `ON DELETE SET NULL` foreign-key conflict against non-nullable `buyer_id`. | [[command\|DeleteBuyer]], [[service\|order-api]]                                                       | Buyer deletion fails at runtime when historical orders exist.                           | Enforce explicit pre-check (`409 Conflict`) or soft-delete semantics before persistence.                                            |
| **TD-12** | OpenAPI metadata declares `404` as `application/problem+json`, while runtime returns `application/json`.                     | [[service\|order-api]], [[service\|catalog-api]], [[service\|rating-api]], [[command\|DeleteFeedback]] | Strict schema-validating clients may fail to parse `404` error bodies.                  | Standardize `404` responses on RFC 9457 `application/problem+json` (see [[adr\|adr-bw-011-shared-validation-and-error-contracts]]). |

## Review and acceptance

- Reassess likelihood and impact when new evidence changes an assumption; do not lower a rating solely because a safeguard has been configured.
- Close a risk only when its mitigation evidence is recorded or an accountable decision-maker accepts the residual exposure with a review date.
- Reprioritize debt when customer impact, operational exposure, or the cost of remediation changes.

## Related architecture documentation

- [[doc|arc42/09-architecture-decisions]] — Decision status and rationale, including superseding decisions.
- [[doc|arc42/10-quality-requirements/002-quality-scenarios]] — Measurable acceptance criteria cited by this register.

## Changelog

- Rewrote `index.mdx` to rank assessable architectural risks separately from known technical debt, add impacts and actionable treatments, and define closure evidence.
