Stale Segment References in Sandbox Display After Production Deletion

Overview:
This KB article explains why segments that were removed from Production may still appear in a Sandbox environment and trigger :not-found errors when deletion is attempted. It provides guidance on resolving the issue and confirms the impact of promoting Sandbox changes to Production.


Issue Summary:
Customers may encounter a situation where:

  • Segments that were deleted in Production continue to appear in Sandbox after pulling changes.

  • Attempting to delete these segments in Sandbox triggers an error like:

{:amperity.prodigal.error/type :not-found,
 :amperity.prodigal.error/message "mx-segment mx-seg-sBK1MatE not found",
 :segment-id "mx-seg-sBK1MatE",
 :ken.trace/trace-id "2f39a60c2ddee57d2e52a5ae619d496f",
 :ken.trace/span-id "257d134a3007c3e4"}

Error Analysis:

  • :not-found indicates the requested segment does not exist in the backend system.

  • The segment ID in the error confirms which segment could not be located.

  • Trace IDs (ken.trace/trace-id and ken.trace/span-id) are used internally for debugging request flows.

  • This error typically occurs due to stale or cached UI references rather than actual existence of the segment in Sandbox.

Investigation Steps:

  1. Reviewed the Sandbox and Production segment lists and confirmed they are identical.

  2. Verified that the segment causing the error is no longer present in Sandbox.

  3. Determined that the :not-found error is caused by a stale reference in the UI.

Resolution:

  • Perform a hard refresh to clear UI cache:

    • Windows: Ctrl + Shift + R

    • Mac: Cmd + Shift + R

  • Clear browser cache: Settings → Privacy → Clear browsing data.

  • Test Sandbox in an Incognito/Private window or a different browser.

  • Logout and login again to refresh session data.

After performing these steps, stale segment references will be removed from the UI.

Impact on Sandbox Promotion:

  • Since the segments no longer exist in Sandbox, promoting the Sandbox to Production will not recreate missing segments.

  • The deletion error can be safely ignored if the segment is not visible after clearing the UI cache.