#107090·posthog

chore(signals): turn on the inbox ranking scoring sweep in prod-us

Author: andrewm4894Created Sep 25, 2026Updated Sep 25, 2026
Labelsself-driving

Context

#106907 (issue #106847) added the inbox ranking scoring sweep (products/signals/backend/ranking/sweep.py). Its schedule, inbox-ranking-scoring-sweep-schedule, runs every 15 minutes on VIDEO_EXPORT_TASK_QUEUE, which the signals Temporal worker serves.

The schedule exists in every environment. INBOX_RANKING_SCORING_ENABLED gates the work, and it defaults to False, so every tick returns skipped_reason="disabled" and writes nothing.

This issue turns the sweep on in prod-us.

Blocked by

#107087 must land first, and a serving manifest must exist. Until then the sweep would only return skipped_reason="no manifest". That is harmless, but it tells us nothing.

Before starting, confirm all of these from the #107087 verification steps:

  • the inbox_ranking_serving_manifest_published event fired for a report_embeddings served key;
  • inbox_ranking/serving/manifest.json exists in the prod-us object-storage bucket.

Change

This is a deployment config change in PostHog/charts. There is no code change in this repo.

In apps/temporal-worker-video-export/values.prod-us.yaml, add to env:

yaml
  # Turns on the inbox ranking scoring sweep (products/signals/backend/ranking/sweep.py).
  INBOX_RANKING_SCORING_ENABLED: "true"
  • prod-us only. prod-eu and dev have no inbox ranking dataset, so no manifest exists there, and the sweep would skip every tick.
  • Keep the defaults for INBOX_RANKING_SCORING_INTERVAL_MINUTES (15), INBOX_RANKING_SCORING_MAX_AGE_DAYS (30) and INBOX_RANKING_SCORING_MAX_REPORTS_PER_TICK (2000). The first ticks work through the backlog of reports that have no score, up to the cap each tick.
  • The worker already has the app object-storage bucket from the shared Django chart values, and xgboost is a main dependency, so no other worker change is needed.

Verify after deploy

Within one or two ticks:

  1. The worker logs inbox_ranking_sweep_finished with scored above zero, failed_teams at 0, and a manifest_version that matches the published manifest.
  2. ranking_score artefacts appear on recent reports, each with a served_key that names the report_embeddings champion.
  3. candidates falls tick over tick as the backlog clears, then holds near the rate of new or edited reports. A report that already has a score is not scored again until its vector or the manifest version changes.
  4. artefact_count on the inbox list does not change for scored reports. #106907 excludes ranking_score rows from it.

To roll back, remove the env entry or set it to "false". The next tick then skips. The artefacts already written stay, and no user-facing surface reads them. Once #107078 lands, the staff-only API field reads them.

Out of scope

  • Using the score to order or filter the inbox.
  • Stamping scores onto impressions.
  • Turning the sweep on outside prod-us.