Repository navigation
chore(backend): enable keep-rescue shadow mode on prod - #21126
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 410e38f203
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| value: '0' | ||
| category: rollout | ||
| CONVERSATION_RELEVANCE_JEV_RESCUE: | ||
| value: 'shadow' |
There was a problem hiding this comment.
Isolate rescue shadows from live Jev telemetry
Whenever an R03/R08 discard hits a newly enabled host, relevance_rescue.score_segments() calls jev_discard_probability(), which invokes ask_jev() with its default record_decision_metrics=True; this increments omi_jev_decision_total{lane="conversation_relevance"} and its latency histogram even though shadow does not make the live decision. The existing shadow path explicitly passes False (backend/utils/conversations/jev_shadow.py:190-198), and jev_client.py:99-101 says this is required to avoid inflating the live lane. Because production Jev is already at 100%, these rule-discard samples will corrupt its failure/latency evidence; use a shadow-specific client/accounting context before setting this value.
Useful? React with 👍 / 👎.
| value: '0' | ||
| category: rollout | ||
| CONVERSATION_RELEVANCE_JEV_RESCUE: | ||
| value: 'shadow' |
There was a problem hiding this comment.
Export outcomes before scoring on sync workers
On the backend-sync (and analogous backfill) block, this starts scoring but there is nowhere for the rescue outcome to go: record_rescue() only increments omi_conversation_relevance_rescue_total, while the production deploy attaches the GMP sidecar to backend at .github/actions/deploy-backend-stack/action.yml:628-648 and deploys sync separately at lines 697-716; the experiment runbook confirms sync/backfill have no exporter (backend/docs/experiments/EXP-004-jev-relevance-owner-ramp.md:294-300). Thus these workers pay the calls and latency while their rescue/discard/error results are lost and fleet readouts are biased; leave the flag off there or add durable/exported telemetry.
Useful? React with 👍 / 👎.
| | `CAPTURE_JEV_SHADOW_USER_DAILY_CAP` | Per-user daily Jev capture shadow call budget | backend | env | closed | — | — | — | — | pending | 2026-10-18 | David | | ||
| | `CONVERSATION_RELEVANCE_JEV_PERCENT` | Jev conversation percentage after keep-all; production stage 4 is 100% (2026-10-06); ramp 1 -> 10 -> 50 -> 100; unset is 100 when enabled | backend | env | closed | — | 0 (backend-listen (chart), cloud_run/backend, cloud_run/backend-sync, gke/backend-listen, gke/pusher, pusher (chart)) | 100 (backend-listen (chart), cloud_run/backend, cloud_run/backend-sync, cloud_run/backend-sync-backfill, gke/backend-listen, gke/pusher, pusher (chart)) | — | ship | 2026-10-21 | dazheng | | ||
| | `CONVERSATION_RELEVANCE_JEV_RESCUE` | R03/R08 JEV keep-rescue: off default; shadow observes; on rescues; invalid config off | backend | env | closed | — | — | — | — | pending | 2026-11-08 | dazheng | | ||
| | `CONVERSATION_RELEVANCE_JEV_RESCUE` | R03/R08 JEV keep-rescue: off default; shadow observes; on rescues; invalid config off | backend | env | closed | — | — | shadow (backend-listen (chart), cloud_run/backend, cloud_run/backend-sync, cloud_run/backend-sync-backfill, gke/backend-listen, gke/pusher, pusher (chart)) | — | pending | 2026-11-08 | dazheng | |
There was a problem hiding this comment.
Record the production activation in experiment sources
Although this generated row now advertises a prod shadow declaration, the canonical config/feature-flags.yaml:10 still states “Offline synthetic pilot only; no deploy declarations enable it,” and the linked benchmarks/jev-vs-rules/RESULTS-NOTES.md:3-9 says production remains off and the pilot does not authorize scoring. After this commit those statements are false, leaving operators with contradictory authorization and readout documentation for a live experiment; append the production activation, authorization, and monitoring plan to the canonical entry/prereg, then regenerate the registry.
Useful? React with 👍 / 👎.
Product invariants affected
CONVERSATION_RELEVANCE_JEV_RESCUE: shadowto the five prod processing hosts.What
Sets
CONVERSATION_RELEVANCE_JEV_RESCUE=shadowin the prod overlay (all five processing hosts: gke backend-listen, gke pusher, cloud_run backend/backend-sync/backend-sync-backfill) and the listen/pusher prod chart values, then regeneratesruntime_env.yaml.Shadow mode scores R03/R08 rule discards and emits
omi_conversation_relevance_rescue_total{mode,rule,outcome}without changing any serialized decision. Authorized by David 2026-10-09 ("Let's flip rescue to shadow mode on prod"). The offline pilot (benchmarks/jev-vs-rules) was approved the same day; production scoring stays reversible by a one-line revert.Tests
test_backend_runtime_env_validator.py+test_verify_pusher_config_references.py: 189 passed.