SCA-40: add digest-pinned Pusher chart-only recovery#10278
SCA-40: add digest-pinned Pusher chart-only recovery#10278Git-on-my-level wants to merge 14 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e4207e7da
ℹ️ 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".
Failure-Class: FC-runtime-image-boundary Co-authored-by: multica-agent <github@multica.ai>
3e4207e to
72281dc
Compare
…kflow The Hygiene CI check rejects deprecated Node-20 action versions. actions/upload-artifact@v4 was added by this PR; upgrade to v7 to match the repo-wide standard.
P1: normalize() did not strip API-server/controller-populated Deployment fields (revisionHistoryLimit, restartPolicy, dnsPolicy, schedulerName, terminationMessagePath/Policy, deployment.kubernetes.io/revision annotation) that are absent from helm template output. This caused allowed_recovery_drift() to always fail when comparing a live Deployment against a rendered chart. P2: validate_redis_source() used a sentinel object() default for the missing secretKeyRef key, so a post-repair env entry (where Kubernetes omits the key entirely after Helm applies secretKeyRef: null) was incorrectly flagged as a retained Secret source. Failure-Class: none
|
@codex review exact current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c4f7dffa7
ℹ️ 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".
Failure-Class: FC-runtime-image-boundary Co-authored-by: multica-agent <github@multica.ai>
Follow-up to the k8s defaults fix: normalize() still included Helm-managed annotations (meta.helm.sh/release-*) and cluster-added Service fields (internalTrafficPolicy) that are absent from helm template output. This would cause the drift comparison to fail on any existing Helm-managed release. Moved annotation stripping to normalize() for all kinds, added internalTrafficPolicy to VOLATILE_SERVICE_SPEC, and consolidated the Service volatile set. Failure-Class: none
…s_now assertion - Add missing desktop_rollback_beta.yml and desktop_breakglass_rollout_beta.yml to backend-unit-tests.yml paths triggers. - Update test_smoke_what_matters_now.py assertion to match $DEPLOY_CONTROL_SCRIPTS path prefix in gcp_backend.yml. Failure-Class: none Co-authored-by: multica-agent <github@multica.ai>
# Conflicts: # backend/scripts/verify_pusher_chart_only_recovery.py
|
@codex review exact current head |
|
@codex review exact current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bbd423534
ℹ️ 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".
Failure-Class: FC-runtime-image-boundary Co-authored-by: multica-agent <github@multica.ai>
|
Addressed Codex review feedback on
All 14 unit tests pass. The pre-existing |
|
@codex review exact current head |
|
@codex review exact current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f759f921e
ℹ️ 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".
Failure-Class: FC-runtime-image-boundary Co-authored-by: multica-agent <github@multica.ai>
|
@codex review exact current head |
|
@codex review exact current head |
Failure-Class: FC-runtime-image-boundary Co-authored-by: multica-agent <github@multica.ai>
|
@codex review exact current head |
|
@codex review exact current head |
Failure-Class: FC-runtime-image-boundary Co-authored-by: multica-agent <github@multica.ai>
|
@codex review exact current head |
|
@codex review exact current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7538a31b3
ℹ️ 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".
Root cause
Historical Pusher pods can retain a named
REDIS_DB_HOSTsecretKeyRefwhen Helm strategically merges the env list, even though the desired chart uses the shared backend ConfigMap. This producesCreateContainerConfigErrorwithout requiring a new application build.Contract
Normal
build-and-pushremains the default. A new explicit Pusher-onlychart-onlymode accepts only the selected environment's approved repository, an exactsha256:<64 lowercase hex>digest, and a declared Ready containment baseline. The chart renders eitherrepository:tagor exactlyrepository@digest, never both.chart-onlyskips Docker registry login, Buildx, build, push, and non-secret ConfigMap writes. It uses the admitted workflow source while retaining the caller-approved serving image digest.Safety and rollback
Before Helm mutation, the workflow captures the Helm revision plus Deployment/ReplicaSet/pod identity and validates target namespace/release, ConfigMap key presence without printing its value, Ready serving repository-and-digest image IDs, exact rendered digest, ConfigMap-only
REDIS_DB_HOST, and an allowlisted structural diff. Service/HPA/PDB/Ingress/ServiceAccount/BackendConfig, probes, resources, and all unrelated Deployment fields must be unchanged.It rechecks live ConfigMap/image identity immediately before apply, uploads only redacted evidence, waits for rollout, and post-verifies the exact digest and ConfigMap-only source. No automatic rollback is introduced: rollback means restoring the captured Helm revision/known seven-ready containment baseline, not claiming that the prior failed pods were healthy.
Verification
backend/.venv/bin/pytest -q backend/tests/unit/test_verify_pusher_chart_only_recovery.py backend/tests/unit/test_verify_pusher_config_references.py backend/tests/unit/test_verify_pusher_rollout_budget.py backend/tests/unit/test_workflow_contracts.py backend/tests/unit/test_llm_gateway_deploy_contract.py— 81 passedactionlint -ignore 'SC.*' .github/workflows/gcp_backend_pusher.ymlpython3 .github/scripts/check-deployment-concurrency.pypython3 .github/scripts/check-direct-backend-production-admission.pymake preflightDev rehearsal: dispatch only
service=pusher,deployment_mode=chart-onlywith the dev approved repository, an exact digest that matches all Ready serving Pusher image IDs, and a baseline no greater than the observed Ready count; review the redacted artifact before considering production.Production was not touched. No workflow dispatch, Helm mutation, or cluster mutation was performed.
Failure-Class: FC-runtime-image-boundary