Skip to content

listen: raise prod HPA minReplicas 12→30 before live stage 2 - #22461

Merged
Git-on-my-level merged 4 commits into
mainfrom
listen/prod-hpa-min-30
Oct 19, 2026
Merged

Git-on-my-level merged 4 commits into
mainfrom
listen/prod-hpa-min-30

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

What changed and why

Raises the prod listen HPA minReplicas from 12 to 30 (backend/charts/backend-listen/prod_omi_backend_listen_values.yaml, autoscaling.minReplicas; maxReplicas stays 60).

A floor of 30 means a roll at the HPA floor takes 10 waves x 300s = 3000s. test_backend_listen_rollout_wait_can_cover_a_real_rollout pins that, so the listen kubectl rollout status --timeout (.github/workflows/gcp_backend_listen_helm.yml, .github/actions/deploy-backend-stack/action.yml) and the prod chart progressDeadlineSeconds go from 1800 to 3000. The two helm rollback --wait --timeout values in the same workflow go from 30m to 50m so a rollback at the 30-pod floor is not cut off.

Why: the live stage-1 read (data/run-2026-10-13-two-lane-nemotron/live-stage1-read-0845Z.md in omi-workspace) found listen admission overflow at 4.04% (102 of 2,535) against a 1.38% baseline (29 of 2,117). Stage 1 is not the cause. The HPA scaled prod-omi-backend-listen down from 39 to 27 pods (window capacity 624 to 432 at 16 per pod). The fleet was only about half full (about 225 active of 432), so the overflow is per-pod imbalance: 2-5 of 27 pods sat at 14 or more of 16 windows at once. At 39 pods post-flip overflow was 0%. Stage 2 adds Parakeet-first load, so the floor must rise first. The HPA's second metric currently reads about 21.2/22.

Rollback: revert this PR (minReplicas back to 12) and redeploy the listen chart.

Note for the reviewer: prod_omi_backend_listen_cronjob.yaml (separate manifest, not changed here) patches the live HPA minReplicas to 10 at 01:00 UTC and to 30 at 11:00 UTC. If that CronJob is deployed, it overrides this value overnight; this PR does not touch it.

Product invariants affected

INV-DATA-1 (path match only): this PR edits .github/workflows/gcp_backend_listen_helm.yml, which matches the invariant's gcp_*.yml glob. The edit changes only wait durations in that workflow: the listen kubectl rollout status --timeout (1800s to 3000s) and the two helm rollback --wait --timeout values (30m to 50m). It does not change any routing authority, Firebase/Firestore project, release ring, environment selector or artifact identity, so none of the invariant's MUST NOT clauses are touched. No other invariant applies.

How it was verified

Chart value change only; no live system was touched. scripts/pr-preflight --lane local --base origin/main --pr-body-file <body> passed: 19 checks, including product-invariants and failure-class-protocol. This verifies the repo contract only; the live effect (overflow back under 1%) is a post-deploy read, to be taken 1h after the change.

Tests

No new test. backend/tests/unit/test_verify_backend_release_vector.py::test_backend_listen_rollout_wait_can_cover_a_real_rollout derives its bound from minReplicas and failed in CI at 1800s; it and test_listen_helm_env_overrides.py now pass locally (59 passed). Existing chart-contract tests that read this values file are run in CI.

UI evidence

UI-Evidence: none -- chart value change, no UI

Failure class (fixes)

Failure-Class: none

Failure-Class: none

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T10:18:27.498841Z 66db041 New commits
ℹ️ 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: da9229fa6f

ℹ️ 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".

(dev is `{ maxUnavailable: 0, maxSurge: 1 }`).
- `terminationGracePeriodSeconds: 120` in both charts.
- prod autoscaling `minReplicas: 12`, `maxReplicas: 40`,
- prod autoscaling `minReplicas: 30`, `maxReplicas: 60`,

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 Restore the pusher HPA values in its runbook

This section explicitly records inputs verified against prod_omi_pusher_values.yaml, but that file still configures minReplicas: 12 and maxReplicas: 40; only the backend-listen chart was changed to 30/60. The new text therefore gives pusher operators a nonexistent 60-pod ceiling and even contradicts the 40-pod rollout calculation immediately above it. Keep this line at 12/40 or document the listener change in a listener-specific runbook instead.

Useful? React with 👍 / 👎.

…d floor

Failure-Class: none

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@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: 0c7ee42a25

ℹ️ 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".

# See gcp_backend.yml: 300s cannot cover a full backend-listen roll; a
# stalled rollout still fails on progressDeadlineSeconds.
if ! kubectl -n ${{ vars.ENV }}-omi-backend rollout status deploy/${{ vars.ENV }}-omi-backend-listen --timeout=1800s; then
if ! kubectl -n ${{ vars.ENV }}-omi-backend rollout status deploy/${{ vars.ENV }}-omi-backend-listen --timeout=3000s; then

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 Add headroom above the modeled rollout duration

When production is at the 30-replica floor and replacement pods consume nearly the full 300-second startup allowance, the modeled ten waves already consume all 3000 seconds. kubectl rollout status --timeout applies that timeout to the overall watch, so scheduling, node-autoscaler, image-pull, or readiness overhead can make this workflow—and the identical timeout in .github/actions/deploy-backend-stack/action.yml—report a healthy rollout as failed. Set the CLI timeout above the modeled minimum rather than equal to it.

AGENTS.md reference: .github/AGENTS.md:L26-L26

Useful? React with 👍 / 👎.

Git-on-my-level and others added 2 commits October 19, 2026 16:47
@Git-on-my-level
Git-on-my-level merged commit 583d448 into main Oct 19, 2026
60 checks passed
@Git-on-my-level
Git-on-my-level deleted the listen/prod-hpa-min-30 branch October 19, 2026 10:44
Git-on-my-level added a commit that referenced this pull request Oct 19, 2026
, #22362, #22461, #22471 sync)

- config/feature-flags.yaml: kept both new rows (LISTEN_LOOP_METRICS_ENABLED from main,
  ENRICHMENT_ROUTE from integration); rendered doc regenerated.
- #21932 moved the legacy sync runner's 500/503 into _run_sync_job_attempt: known gaps and the
  task-target KNOWN set gain the four _run_sync_job_attempt keys (legacy, leave with C11), drop
  the _run_sync_job_body/503 keys and recover_quarantine/503 (fixed by #22476).
Git-on-my-level added a commit that referenced this pull request Oct 19, 2026
…00s (#22623)

A 40-pod floor rolls in 14 waves of 3 pods at a 300s startup budget, so the
rollout wait and progressDeadlineSeconds rise to 4200s and the helm rollback
wait to 70m, as #22461 did for the 30-pod floor.

Failure-Class: none

Co-authored-by: Claude Opus 5.5 <[email protected]>
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