Repository navigation
feat(deploy): feature activation manifest and read-only checker; conversations-v3 first (SCA-2967) - #25713
Conversation
…ersations-v3 first (SCA-2967) A manifest declares what a lever move needs from live serving state: services with the commits each must contain (ancestry), env keys set and equal across runtimes, gateway lanes, Cloud Tasks queues, scheduler jobs, and the required move order. activation_collect.py reads prod metadata read-only (status.traffic revisions, image source identity, GKE pods/ConfigMaps, queue and job lists); activation_check.py is a pure manifest + state -> satisfied/missing/unknown verdict. Unknown never counts as satisfied; requirements the activation does not own never change the exit. The conversations-v3 manifest reproduces every 2026-11-17 activation escape on its fixture and passes on a correct-state fixture. Not wired into any gate. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…8t185330-8905) - Invalid YAML or malformed state values exit 3 (invalid), not 1 (BLOCKED); the collector reports an invalid manifest cleanly. - An explicit empty env value is compared as itself, not folded into the code default (CONVERSATIONS_V3_STAGE='' falls through to the cohort, not beta). - env-equal is UNKNOWN when any serving unit of a runtime is unreadable. - The verdict shows the state's collected_at. - Collector: git merge-base and registry token failures become unknown; pods with unreadable digests are counted correctly; the app container is the named or port-bearing one; a malformed lanes file records lanes_error. - The gateway code default http://127.0.0.1:9080 also counts as unset. - Tests: Registry.source (label, index, tag fallback, ambiguity), exact YAML parsing in the drift test, defaulted keys checked against runtime_env. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Group running pods by image and their own environment evidence. Treat startup-resolved values as unknown when metadata cannot establish parity. Co-authored-by: multica-agent <[email protected]>
|
SCA-3606 correction is verified locally at On Publication is blocked by this worker’s expired GitHub credential. The connected app uses a different commit author email from the configured address. The verified commit is preserved in a Git bundle on SCA-3606. Estimated publication is within one hour of restored write access. Round-two review and CI on the new PR head are pending publication. SCA-3022 remains held for round-two SHIP and green CI. |
|
GitHub now reports SCA-3022 remains out of merge admission pending an independent round-two SHIP and green CI on this SHA. |
|
VERDICT: FIX — 9e33054 (round two) The mixed-generation correction is sound: it uses each running pod’s own environment declarations and groups by image plus environment, so older pods cannot inherit the current Deployment template’s values. The focused activation suite passes locally (40/40). P1 — ConfigMap-backed production requirements cannot establish READY. A read-only ro-prod collect/check on this head at 2026-11-21T18:29:30Z returned UNKNOWN with 0 missing requirements and 11 controlled unknowns (plus one advisory external unknown). Pusher and backend-listen evidence for task binding, task target, stage, and kill switch is unreadable at container startup. The production charts use ConfigMap-backed stage values, and production runtime config uses ConfigMap-backed task bindings. Although service ancestry, gateway lanes, queue, and scheduler checks pass, this wiring leaves no path to prove readiness. Keep the fail-closed behavior, but add sound per-pod evidence for allowlisted non-secret values or immutable/versioned config evidence that proves each pod’s startup configuration, while preserving mixed-generation separation. Hosted CI is still running on this SHA. Keep SCA-3022 out of merge admission until the readiness gap is resolved and CI is green. |
Allow Release to pin the conversations-v3 bindings per rollout with a reviewed Helm values layer. Verify the collector can prove the resulting pod values and continues to fail closed for legacy pods. Keep the runtime manifest drift test inside the fast-unit CPU budget. Co-authored-by: multica-agent <[email protected]>
Preserve backend-listen Secret references and reject collisions with the non-secret startup allowlist. Co-authored-by: multica-agent <[email protected]>
|
VERDICT: SHIP — 0a0bc6a (independent round two) Reviewed the new chart support and the merge with main. Both pusher and backend-listen templates accept exactly the seven allowlisted values, require explicit literal strings, and place them in each pod template. The render tests verify the values override legacy ConfigMap bindings, while envFrom and all non-allowlisted env entries are preserved. Backend-listen rejects collisions with privateEnv and privateSecretEnv; Secret values stay in Secret Manager and the collector records only Secret references. The same-digest mixed-generation cases behave correctly: pinned rendered pods can evaluate READY, while a legacy pod still serving yields UNKNOWN; literal skew blocks. The 2026-11-17 replay fixture remains BLOCKED for the expected stale gateway lanes and missing pusher task project/location. The shard-7 change uses PyYAML's LibYAML safe loader when available (SafeLoader fallback); locally the focused suite passes 46/46, and hosted Backend unit shard 7/8 is SUCCESS. CI currently has no unfinished or failing checks. This SHIP covers the checker/chart implementation. The rendered READY is pre-rollout evidence; live readiness still requires Release's approved configuration-only rollout through both production Helm paths and a post-convergence read-only ro-prod check. |
|
SCA-3606 verification is complete at On |
Require exact project, environment and feature identity before evaluating serving evidence. Collect only against the declared project, region and GKE cluster, and block reads using a conflicting target. Co-authored-by: multica-agent <[email protected]>
|
VERDICT: SHIP — e75d91e (fresh independent review) This fixes the identity false pass found on 0a0bc6a. The checker now requires state project, environment, and feature identity and compares each exactly with the manifest before evaluating serving evidence. Missing, malformed, or mismatched identity fails with exit 3; matching ready-state coverage still reaches READY. The manifest requires its project, region, and (for GKE) cluster. Conflicting explicit --project, --region, or --cluster options are rejected before subprocess collection or output replacement. Collection uses manifest targets, checks programmatic project/region before reads, and isolates GKE credentials in a temporary kubeconfig instead of ambient KUBECONFIG. Independent verification: focused activation tests pass 73/73; target-conflict regressions and identity regressions are included. The 2026-11-17 fixture remains BLOCKED for stale gateway lanes and missing pusher task bindings. git diff --check is clean. Hosted CI has no failures but is still running on this SHA, so SCA-3022 must remain out of merge admission until CI is green and applicable source-merge approval is present. |
Require the collector region and cluster to match the manifest in snapshots. Verify both production chart renders retain fail-closed startup evidence when mutable configuration references cannot establish what a container consumed. Co-authored-by: multica-agent <[email protected]>
|
SCA-3606 addresses the 22:49 UTC finding at the current head On |
|
SHIP — reviewed exact PR head
Hosted CI was still running at review time (13 checks in progress, no failures reported). This SHIP is code-review evidence only; merge admission remains held pending green CI and applicable authorization. |
What changed and why
SCA-2967. Activating conversations-v3 for TestFlight on 2026-11-17 needed several services to move in a fixed order: backend Cloud Run, then llm-gateway, then pusher, then listen. Nothing encoded that order, and each gap was found in prod or by luck:
SYNC_TASKS_PROJECT/SYNC_TASKS_LOCATIONthat listen sets;conversations-v3queue and the v3 scheduler jobs did not exist.KB evidence:
evidence/2026-11-17-v3-testflight-activation-escapes.md(#7, #8) and2026-11-17-delivery-debt-from-v3-rollout.md(D1, D8).This PR adds a feature activation manifest (data) and a read-only tool that checks it against live serving state. The first manifest is conversations-v3. The tool is not wired into any gate.
backend/deploy/activation/conversations-v3.yamllists:Each entry has a
whythat points at the code or incident behind it. The format is inbackend/deploy/activation/README.md.backend/scripts/activation_check.pyis pure: manifest + state JSON in, verdict out. Each requirement issatisfied,missing,unknownordeferred.0READY;1BLOCKED (a controlled requirement is missing);2UNKNOWN (nothing missing, but a controlled requirement could not be read);3invalid input.unknownnever counts as satisfied.controlled: false(the backfill queue), and anything listed undernot_checked(Firestore indexes, owned by the index readiness gate). They are always reported, and the report says who owns them, but they never change the exit code.--before <service>checks only the requirements due before that service moves.collected_at.backend/scripts/activation_collect.pyreads prod metadata only:status.traffic, never the spec.listcall per location.Serving identity comes from the image: its OCI
org.opencontainers.image.revisionlabel, else its commit tag. The prod pusher digest is looked up in the dev registry it was promoted from.OMI_BACKEND_RELEASE_SHAis only recorded, asrelease_env: env merges never remove a value, so it can name a release the revision does not serve.The collector never reads Secrets and records only the env keys the manifest names. The checker's report prints key and runtime names, never values.
v3 requirements
backend,backend-sync,backend-sync-backfill,backend-integration,desktop-backend→ 2.llm-gateway→ 3.pusher→ 4.backend-listen→ lever (CONVERSATIONS_V3_STAGE/CONVERSATIONS_V3)backend,backend-integration,backend-listen): #25500, #25588, #25658, #25661. Builder hosts (backend-sync,backend-sync-backfill): the same plus #25691.llm-gateway: #25500 (v3 lanes).pusher: #25500 (v3-aware finalization), #25658 (admission)omi:auto:conversation-v3-outline,-summary,-summary-open,omi:auto:conv-action-itemsv3-task-binding:SYNC_TASKS_PROJECT/LOCATION/INVOKER_SAset and equal on the six writers.v3-task-target:CONVERSATIONS_V3_TASKS_URLorSYNC_TASKS_HANDLER_URL.v3-stage:CONVERSATIONS_V3_STAGEequal on the writers and desktop (code defaultbetafor an absent key).v3-kill-switch:CONVERSATIONS_V3equal.v3-gateway-endpoint:OMI_LLM_GATEWAY_URLonbackendandbackend-sync; the placeholdershttp://127.0.0.1:9and:9080count as unsetconversations-v3(controlled);conversations-v3-backfill(controlled: false)conversations-v3-sweep,conversations-v3-legacy-users(ENABLED)How Release calls it (not in this PR)
Before each step of the train, and before a stage or kill-switch move:
source ~/.local/bin/gcp-agent-env.sh ro-prod && git fetch origin.python3 backend/scripts/activation_collect.py --manifest backend/deploy/activation/<feature>.yaml --cluster prod-omi-gke --promoted-from-gcloud-config ~/.config/gcloud-agent/ro-dev --out state.json.python3 backend/scripts/activation_check.py --manifest … --state state.json --before <service|activate> --json.Only controlled requirements affect the exit code, so the check trips only on signals the activation controls. The meta-repo train (
omi-deploy-prod/train.sh) can call these two scripts from its release checkout; that wiring is a separate change.Product invariants affected
none
How it was verified
backend/.venv/bin/python -m pytest -q backend/tests/unit/test_activation_manifest.py: 38 passed.2026-11-17 fixture (
backend/tests/unit/fixtures/activation/state-2026-11-17.json):verdict=BLOCKED, exit 1, satisfied=63, missing=14, unknown=1. Missing:service:llm-gateway:contains:012329830a9e, plus the three laneslane:omi:auto:conversation-v3-outline/-summary/-summary-open;service:pusher:contains:012329830a9eand:156b50921d7e;env:v3-task-binding:pusher:SYNC_TASKS_PROJECTand:SYNC_TASKS_LOCATION, with their twoenv-equalresults;queue:conversations-v3,scheduler-job:conversations-v3-sweep,scheduler-job:conversations-v3-legacy-users;The one unknown is the advisory Firestore-index item. With
--before backend-listen, the gateway, pusher and infra gaps still block, and listen's own 10 requirements are deferred.Correct-state fixture (
state-ready.json):verdict=READY, exit 0, satisfied=77, missing=0; the only unknown is the advisory Firestore-index item.Current prod, collected 2026-11-18T19:24:59Z with the read-only
ro-prodidentity, plusro-devfor the dev-registry tag only. Metadata reads only, no writes.verdict=READY, exit 0: satisfied=77, missing=0, unknown=1 (advisoryexternal:firestore-indexes).conversations-v3queue is RUNNING, and both v3 jobs are ENABLED.backend-listen, and prod (listen serving 44d0a4f) reported it missing. Short-task extraction runs only on the sync task handler, so that requirement now applies to the builder hosts only.scripts/pr-preflight --pr-body-filepassed, and so didpython3 .github/scripts/check_release_rings.py(the scope panel warned against reusing the forbidden "release ring" names).Panels
Scope
scope-20261118t174316-a7fd: only glm-flash completed; luna failed to launch (journal busy) and deepseek failed. Taken from it:activationnaming;runtime_env(handled by a drift test).Two of its claims were contradicted by live reads, and I resolved them that way:
OMI_BACKEND_RELEASE_SHAis the true marker. Image identity is used instead, per the documented env-merge misread.Review
review-20261118t185330-8905(FIX-FIRST; deepseek and glm-flash; luna failed to launch):Tests
backend/tests/unit/test_activation_manifest.pycovers:any_ofand Secret refs.status.trafficand never the spec; never reads Secrets; resolves ConfigMap andenvFrom; resolves promoted digests; failed reads become unknown; pod digest counting; container choice;Registry.source(label, index, tag fallback, ambiguity); only Google registry hosts.ops/prod.yaml,scheduler/jobs.yamlandgenerated_route_overrides.yaml. Every required env key is declared for each runtime in the composed prodruntime_env.yaml; this would have caught pusher's missing task binding at PR time.UI evidence
UI-Evidence: none -- backend tooling, no UI
Failure class (fixes)
Failure-Class: none
🤖 Generated with Claude Code