chore(signals): turn on the inbox ranking scoring sweep in prod-us
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_publishedevent fired for areport_embeddingsserved key; inbox_ranking/serving/manifest.jsonexists 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:
# 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) andINBOX_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
xgboostis a main dependency, so no other worker change is needed.
Verify after deploy
Within one or two ticks:
- The worker logs
inbox_ranking_sweep_finishedwithscoredabove zero,failed_teamsat 0, and amanifest_versionthat matches the published manifest. ranking_scoreartefacts appear on recent reports, each with aserved_keythat names thereport_embeddingschampion.candidatesfalls 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.artefact_counton the inbox list does not change for scored reports. #106907 excludesranking_scorerows 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.
Source: PostHog/posthog