Skip to content

ADR-005: Login cart merge deferred to checkout

Status: accepted 7 September 2026; superseded by ADR-014 on 5 October 2026: storefront customers are guests, so there is no login cart merge.

MergeCartOnLogin should move a guest’s cart into their account when they log in. Re-testing with the shared session domain showed it still does nothing: Laravel regenerates the session identifier before the Login event fires, so the listener searches for the guest cart under the new identifier. The listener also falls back to the user’s current workspace when the login host has no tenant, which conflicts with the host-first tenancy rule.

Leave the merge unfixed and visible. A skipped feature test documents the behaviour and its cause. The merge contract (which workspace, which cart wins, how conflicts resolve) is decided together with storefront checkout in Stage 3, where it matters.

  • A customer who adds to a cart as a guest and then logs in currently starts with an empty cart. No customer can check out yet, so nothing is lost today.
  • Any Stage 3 design must not read tenant identity from the user record.