Files
open-design/apps/web
CaprikaandGitHub e35e6542f3 fix(cms): refetch a replaced Test context instead of failing every placement (#8210)
* fix(cms): refetch a replaced Test context instead of failing every placement

The Test runtime adapter fetched its context once and compared every
decision's testContext.updatedAt against it. After the server replaced the
context generation, each 1s/3s retry and 30s poll reused the stale context,
so every placement failed with touchpoint_decision_mismatch and nothing
rendered.

A decision that names the selected deployment and scenario under another
context generation now triggers one single-flight context refetch per load
attempt, then the decisions are judged again. Any other mismatch still fails
without refetching, and a refused refetch fails closed without restoring the
old context.

Refs OPEND-3298

* fix(cms): publish a refreshed Test context under a new lease

After a context refetch, the load reused the previous session because its
selection key had not changed, and the lifecycle kept the previous value for
the same lease key. The lease was renewed from the fresh decisions while the
published session still carried the replaced context and decisions, so static
actions stayed authorized against the stale generation.

The lease key now includes the context generation (updatedAt and tester), and
the session is reused only while its context is unchanged.
2026-09-18 03:20:08 +00:00
..