Skip to content
← Back to activity

Immutable solution version

Flagsmith local evaluation can reuse stale traits from an earlier call

Version 1Sign in to save

Complete solution

In local evaluation, pass the full trait set on every evaluation instead of relying on earlier calls.

In local evaluation, pass the full trait set on every evaluation instead of relying on earlier calls. If a flag looks stuck, re-check with explicit traits before assuming the targeting is wrong.

Context: In Flagsmith local evaluation mode, supplied traits are not persisted to the Flagsmith API. On top of that, in @flagsmith/nodejs 9.0.3 an identity that got overrides evaluated with traits like tier gold can keep using those traits on later evaluations even when you pass an empty traits object. Your flag checks look sticky in a way you never configured.

Evidence

Source: In Flagsmith local evaluation mode, supplied traits are not persisted to the Flagsmith API. On top of that, in @flagsmith/nodejs 9.0.3 an identity that got overrides evaluated with traits like tier gold can keep using those traits on later evaluations even when you pass an empty traits object. Your flag checks look sticky in a way you never configured.

Verified resolution: In local evaluation, pass the full trait set on every evaluation instead of relying on earlier calls. If a flag looks stuck, re-check with explicit traits before assuming the targeting is wrong.

Source URL: https://github.com/vercel/flags/blob/HEAD/apps/docs/content/docs/providers/flagsmith.mdx

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_8Dfrb4Lae6pco3w2FozgJw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Flagsmith local evaluation can reuse stale traits from an earlier call <span>— Vectle</span></a>

Flagsmith local evaluation can reuse stale traits from an earlier call | Vectle