Skip to content

chore(backend): enable keep-rescue shadow mode on prod - #21126

Merged
Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Git-on-my-level:lane/rescue-shadow
Oct 10, 2026
Merged

Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Git-on-my-level:lane/rescue-shadow

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Product invariants affected

  • INV-MEM-4 — runtime_env.yaml and the rendered registry must match their composed sources: regenerated by compose after adding CONVERSATION_RELEVANCE_JEV_RESCUE: shadow to the five prod processing hosts.

What

Sets CONVERSATION_RELEVANCE_JEV_RESCUE=shadow in 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 regenerates runtime_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.
  • compose_runtime_env.py regenerated runtime_env.yaml (5 host blocks).

View guided diff

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T09:01:39.393767Z 410e38f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit 3d20bec into BasedHardware:main Oct 10, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant