The checkout-failure page fires, and the Express middleware feature flag check needs to explain which handler ran. In this design scenario, the on-call sees a breached SLO threshold and a rollout in progress, but the dashboard cannot attribute failed attempts to a treatment. Record the flag decision once, before entering the checkout handler, and carry it into the outcome event; rolling back won't reconstruct a missing attribution record.
Short answer: put the feature flag check in Express middleware, cache it briefly, and attach the observed value to every checkout outcome before assigning cost to a team or release. Use a boolean check for route access and a value lookup for plan limits or UI variants. Keep authorization on the server; a browser flag is a presentation hint, not an entitlement decision.
The useful signal should have fired earlier: an outcome event with the selected flag value, release revision, and cost owner.…