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

オープン
#9,143 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
analytics

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
9.9k
フォーク
658
平均マージ
1日 15時間
マージ済み PR(30日)
171

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Flagsmith/flagsmith のほかの issue

Flagsmith/flagsmith の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。