Repository navigation
fix(monitoring): preserve live prod adapter and Parakeet HPA rules - #20567
Merged
Merged
Conversation
… shell Persist ADAPTER_REVIEW_DIR/ADAPTER_BEFORE/STACK_BEFORE to a gitignored env file and re-initialize context, helper and variables in the rollback block. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cluster call Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Git-on-my-level
marked this pull request as ready for review
October 4, 2026 07:39
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The prod adapter values omitted five live Parakeet rules. Upgrading with that file would remove metrics used by the prod Parakeet HPA, risking live STT admission. Restore all five exactly as live and retain
nllb_active_requests_totalfor the checked-in prod NLLB chart's concurrency HPA.The pinned prometheus-adapter 4.14.2 render preserves all 18 live rules and adds the NLLB rule (19 total). The only allowed config differences versus the 2026-10-04 read-only live capture are the two #20418
listen_track!="canary"selectors and that exact NLLB addition. Known NLLB repo-versus-live HPA drift: liveprod-omi-nllb-translationconsumes onlyResource:cpu(1 replica, maximum 2); repo prod values setrequestsPerPod: 4, which renders an Externalnllb_active_requests_totalmetric on the next deploy. An adapter rule with no matching series is harmless; retaining it protects that future deploy. This PR does not change the NLLB chart.Deployment arguments/image and both APIService specs match live after default service port normalization. The render adds two custom-metrics RBAC objects currently absent live: ClusterRole
prometheus-adapter-server-resourcesand ClusterRoleBindingprometheus-adapter-hpa-controller. Other rendered RBAC content and ServiceAccount match. Deployment differences are the config checksum, historical restart annotation and Kubernetes defaults; Service differences are assigned IPs/defaults. The manually created live custom APIService lacks this release's Helm ownership metadata, so the live comparator fails closed until David inspects and adopts it. No cluster writes were performed.The runbook gives David an explicit sequence: history → capture every existing rendered object's YAML in a local gitignored directory → validate the known-good rollback baseline and reject conflicting owners → adopt unowned APIService/other objects → pinned
helm upgrade --atomic→ listen/Parakeet metric and HPA post-checks → rollback on failed acceptance. It explicitly checks whether both RBAC additions are still new or now exist unowned. The rollback gate requires BOTH APIService specs plus exact live rules and Deployment arguments; a missing APIService blocks adoption/upgrade. Captured APIService and ConfigMap YAML provides a documented emergency recovery alternative for an incomplete historical/atomic rollback, followed by adapter restart and repeated post-checks; this does not waive the baseline gate. The prod-operator tier has no GKE writes, so David uses his authorized human context for the write steps. Agents use ro-prod only.The hermetic contract renders prod Parakeet, listen, pusher, VAD, diarizer, Deepgram engine/API and NLLB HPAs and checks every consumed Pods/External metric against the correct adapter rule list. The selector includes NLLB chart changes. Upgrade comparison permits only the reviewed canary/NLLB changes; rollback comparison remains exact and verifies both APIService specs before live ownership adoption.
Why isn't this a shared primitive instead? The prod values remain the shared cluster-wide rule source. This consumer/producer contract catches the observed prod-values/live incident before an incomplete Helm replacement; the comparator operates on captures without a cluster client.
Verification:
python -m pytest -q backend/tests/unit/test_monitoring_adapter_hpa_contract.py: 24 passed, including NLLB HPA/selector coverage, exact NLLB query validation, missing APIService rollback rejection, pre-adoption rollback review, and existing negative drift cases.make preflight: 31 checks passed each. All three runbook command blocks passbash -n; capture/adoption/recovery Python was exercised on fresh read-only captures and rejects conflicting owners or APIService service targets.Failure-Class: none
Failure-Class-Reason: First observed production adapter rule-inventory drift; no existing class captures this chart/live reconciliation contract.
Draft only. Do not merge or deploy from this PR. Repeat the review using the merged revision before David performs the upgrade.