Experimentation: detect exposures whose rendered variant differs from the assigned one (e.g. shared caches)

Aperta
#9,143 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
analytics

Direzione di ricerca

Start by reading the experimentation SDK exposure flow and the code that reports experiment results; the issue does not name specific files or tests. Determine where the SDK could report the rendered variant and how the platform compares it with the assignment. Done means mismatched exposures and renders can trigger a warning, with tests covering agreement and disagreement.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem. When a page is served from a shared cache whose key ignores the identity (a common nginx/CDN default with Cache-Control: public), visitors see a variant they weren't assigned, but getExperimentFlag still logs the exposure under their assignment. The split stays balanced, so the SRM check can't catch it, and results are silently biased.

Evidence. Controlled runs with a planted effect (3,000 visitors per run, three seeds): 45–47% of exposures were mislabelled; a true +2.9 pt effect reached Flagsmith as −0.4 pt (chance to win 37.4%). Write-up, data and repro: https://github.com/TheNandinee/cached-out

Workaround that works today. Fire an event when the treatment is actually rendered and attach it as a second metric. In a healthy experiment the control arm reads 0%; under the cache bug it read 39.6%.

Suggestion. A built-in 'render check': let the SDK send the rendered variant with the exposure (or a lightweight render event), and show a warning, like SRM, when exposures and renders disagree. A short docs note about caching server-rendered experiments would also help.

Lingua principale
Python
Stelle
9.9k
Fork
658
Merge medio
1g 15h
PR unite (30g)
171

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Flagsmith/flagsmith

Tutte le issue di Flagsmith/flagsmith

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.