Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

analyzing-experiment-precompute-canary

БесплатноБез исполняемых скриптовНе проверен

Analyzes the experiment precompute result-consistency canary across prod-US and prod-EU through the PostHog MCP. Checks health gauges and structured…

PostHogот PostHog★ 41 278 звёзд на GitHub

Об этом скилле

Analyzing the experiment precompute canary

Job to be done

Tell the user, with evidence, whether experiment precomputed results are consistent in production — in both prod-US and prod-EU — and when they aren't, hand them an actionable report: which metric diverged, by how much, which divergence class it is, and the next step. Classify only what the data supports (stability vs correctness; for correctness, whether counts or only values diverged) — do not assert a ClickHouse-level mechanism as fact. Read-only investigation; never mutate anything.

Background: what the canary is and why this matters

Experiment results are served from precomputed ClickHouse cache tables. A class of multi-node read-your-writes bugs (one fixed in PR #62854: a precomputed read not seeing its own writes; also cache content drifting from the events table) is only observable in production. The canary guards against it: a daily Temporal workflow (experiment-precompute-canary) samples experiment metrics on precompute-enabled teams and runs each metric three times — twice forced through the precomputed path (runs a, b), once forced through a direct events scan (run c) — then compares:

  • Stability (a vs b): two precomputed reads seconds apart must agree. Funnels strict (0.1%); mean/ratio sums get the loose tolerance because they join live event values; their exposure counts stay strict. Retention resolves both of its numbers from metric events, so both get the loose tolerance.
  • Correctness (b vs c): the precomputed read must agree with the events table (loose 2%). Since PR #87880 (2026-08-25), sum deviations also need to clear an absolute per-variant floor (MIN_CORRECTNESS_SUM_DELTA = 100, raw metric units) — sub-floor gaps are excluded from the reported deviation and the gauges entirely, so sparse metrics (tens of conversions on millions of exposures) no longer page on a handful of events' worth of expected live-vs-frozen drift. Exposure counts are never floored.

Tolerances in code: STRICT_TOLERANCE = 0.001, LOOSE_TOLERANCE = 0.02, low-volume floor MIN_EXPOSURES_PER_VARIANT = 100, correctness sum floor MIN_CORRECTNESS_SUM_DELTA = 100.0. Source of truth: products/experiments/backend/temporal/canary_logic.py (read it if anything here seems stale).

Outcome taxonomy (per metric): pass | divergence | path_flip | error | skipped.

Prerequisites — check first

This skill uses the PostHog MCP for metrics and logs in both regions. US and EU use separate internal PostHog projects on separate PostHog instances. Select the internal project on each region's connection before querying:

  • prod-US: use the US PostHog connection. US metrics carry environment="prod-us".
  • prod-EU: use a separate PostHog MCP connection to the EU instance. Run the same tools there.

Discover labels and filter or check environment where it exists. An environment filter does not switch projects or instances. Report a region as "not checked" if its tools or data are unavailable. Say why.

If only one region's MCP is set up, analyze that one and clearly flag the other as uncovered.

Fallback: People on managed devices with an existing Grafana MCP connection can use it. It supports metrics and logs. See tools/infra-scripts/mcp/README.md for its setup.

The three Prometheus metrics

Pushed via pushgateway under job experiment_precompute_canary. If a bare name returns nothing, add {job="experiment_precompute_canary"} or browse metrics named experiment_precompute_canary*.

Metric Meaning Healthy
experiment_precompute_canary_outcomes one series per outcome label (last run) mostly pass (+ some skipped); divergence == 0
experiment_precompute_canary_max_deviation check="stability" and check="correctness" stability ≈ 0; correctness small (≤ a few %)
experiment_precompute_canary_last_run_timestamp unix ts of last completed run recent — time() - <this> small; stale (>~48h) means the canary itself is broken

The structured logs (PostHog) — for the deep dive

The canary emits these log events (the message string is the structured event name; rich context is in fields):

  • experiment_precompute_canary_divergence (error) — the money log. Fields: team_id, experiment_id, metric_uuid, metric_type, stability_deviation, correctness_deviation, runs (list of {label, query_id, is_precomputed, variants} — per-variant sum + number_of_samples for runs a/b/c).
  • `experiment_precompu
Полный SKILL.md на GitHub

Установить analyzing-experiment-precompute-canary в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл analyzing-experiment-precompute-canary?

Analyzes the experiment precompute result-consistency canary across prod-US and prod-EU through the PostHog MCP. Checks health gauges and structured divergence or failure logs to identify the team, experiment, metric, and deviation. Classifies stability versus correctness issues and whether exposure counts or only values differ. Hands off precise steps for ClickHouse investigation when the mechanism needs further checks. Use when checking the canary, investigating a divergence or alert, or verifying precomputed experiment results in production. Read-only. No payload decryption or ClickHouse access.

Как установить скилл analyzing-experiment-precompute-canary?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл analyzing-experiment-precompute-canary запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить analyzing-experiment-precompute-canary с