backend-listen prod: explicit SERVER_BATCH_ONLY_MOBILE_PERCENT=0

Merged
GI
1d ago
+39-2

Summary

Make the mobile server-batch-only cohort (ruling 73b217) an explicit, reviewed value on the prod listen chart: SERVER_BATCH_ONLY_MOBILE_PERCENT=0.

Until now the variable was absent from backend-listen, so the code default (0, in config/server_batch.py) applied silently. With an explicit value:

  • the paired 25% step becomes a one-line values PR ("0" → "25") that rides a normal listen roll pinned to the morning image;
  • rollback is the same line set back to "0".

No behavior change: the value stays 0.

Changes

  • backend/charts/backend-listen/prod_omi_backend_listen_values.yaml: adds SERVER_BATCH_ONLY_MOBILE_PERCENT: "0" next to BATCH_PIPELINE_PERCENT. This is the single declaration: the feature-flag registry forbids a new ramp flag in two sources, existing duplicates are allowlisted only until 2026-11-20 (workstream B), and the listen roll applies this values file (helm -f).
  • backend/docs/feature-flag-registry.md: regenerated (scripts/render_feature_flag_registry.py --as-of 2026-10-22). Only this flag's row changes, now recording the listen declaration of 0.
  • config/deployment-setting-classification.json: classifies SERVER_BATCH_ONLY_MOBILE_PERCENT as config, a non-secret setting (like BATCH_PIPELINE_PERCENT), for the deployment secret-boundary ratchet.
  • backend/scripts/verify_pusher_cohost_env_diff.py: adds the flag to LISTEN_ONLY_ALLOWED["prod"] with a reason. Consumer audit (confirmed by review): the only reader is server_batch.selected(), reached via request_eligible() and via eligible() ← create_in_progress_conversation, both called only from routers/listen; pusher's finalizer uses owned()/has_audio(). Pusher never admits capture, so it does not get the value.
  • backend/tests/unit/test_backend_listen_helm_defaults.py: test_prod_listen_carries_an_explicit_zero_mobile_batch_only_percent. It asserts exactly one explicit "0" in the prod values, and that the value reaches the rendered container env in helm template.

No .github change; the existing listen deploy workflow applies chart values.

Verification

  • pytest tests/unit/test_backend_listen_helm_defaults.py tests/unit/test_backend_runtime_env_validator.py: 160 passed. The runtime env validator confirms the manifest/values alignment.
  • backend/scripts/pre-deploy-check.sh (static): 341 passed, "pre-deploy checks passed".
  • scripts/check_feature_flag_registry.py: "feature-flag registry: OK". runtime_env.yaml is unchanged from main.
  • Independent Luna review (one round, read-only): SHIP. Its P3 (name both listen paths in the allowlist reason) is fixed in d3171960e5e.
  • Pre-push gate passed on every push; no skip hatches.

Product invariants affected

  • INV-MEM-4: not affected. This only adds a listen env value that stays 0; no memory intake, consolidation or promotion path changes.

Failure class (fixes)

Not a fix; no declaration required.

Rollout

Ramp, deploy and merge decisions are lead-owned (two-lane rollout lead). This PR is MERGE READY only. The 25% step is a later separate values PR, applied after the batch Cloud Run services serve 25% (paired-step order).

šŸ¤– Generated with Claude Code