Onboarding guide
Operational Scripts & Runbooks
This chapter covers every operational script and runbook in MMCA.ADC: the one-time Azure
bootstrap, the database-per-service cutover story (how the legacy AtlDevCon monolith DB was split
into four per-service databases, and why its scripts no longer exist), the disaster-recovery
posture, the automated restore drill, the day-2 alert-triage runbook, the staged SQL
managed-identity migration, the archive-and-drop of the legacy database, the Play Store asset
pipeline, and the mobile store-submission runbook. For each artifact you will learn what it does,
when an operator runs it, a step-by-step walkthrough with line cites, and why each gate or design
choice exists. Architecture rubric categories are tagged inline; cross-links reach the IaC and CI/CD
chapters and the ADRs that recorded the underlying decisions.
Architectural context. The database-per-service split (ADR-006) and the resilience/recovery posture (ADR-009) are the two decisions that make this chapter necessary. Read both ADRs before running any of these scripts against production.
Which repo. Every file cited here lives in
MMCA.ADC.MMCA.Storeships same-named twins (infra/DISASTER-RECOVERY.md,infra/OPERATIONS.md,infra/SQL-MANAGED-IDENTITY.md,.github/workflows/dr-drill.yml,scripts/dr-restore-drill.ps1) with different contents. The quick tell: ADC's copies name theacc-rgresource group and the fourADC_*databases; Store's nameib_rg,MMCAStoreand threeStore_*databases (MMCA.Store/infra/DISASTER-RECOVERY.md:19,:26,:39-40). Reading the wrong one hands an operator the other application's recovery procedure. The two differ in substance too: Store keeps its legacyMMCAStorebacpac, and its one manual import turns storage shared-key access on for the import and off again as soon as it succeeds (MMCA.Store/infra/DISASTER-RECOVERY.md:44-77); Store has noazure-setup.shand documents its deploy-identity bootstrap as runbook steps (MMCA.Store/infra/OPERATIONS.md:619); and both apps carry a credential-compromise runbook and a JWKS signing-key overlap procedure (MMCA.Store/infra/OPERATIONS.md:548,:585; ADC's are walked below).
What
scripts/actually contains today. Five files and one folder:azure-setup.sh,dr-restore-drill.ps1,play-store-capture.ps1,play-store-compose.ps1,set-local-jwt-secrets.ps1, andsecurity/(bootstrap-identities.ps1,check-template-policy.ps1).set-local-jwt-secrets.ps1is a local-development helper rather than an operational runbook and is not walked here, andcheck-template-policy.ps1is a CI check on templates (the workflow lint is MMCA.Common's sharedlint-workflowsaction, not a script here). The other,bootstrap-identities.ps1, is operational: the out-of-band bootstrap for one identity per app. It creates the six per-app identities and every grant they need (AcrPull, Key Vault Secrets User on each secret an app reads, Storage Blob Data Contributor on the containers each app writes, and for the four services Service Bus Data Sender and Receiver plus a Redis access-policy assignment), and prints the per-database SQL users to create (scripts/security/bootstrap-identities.ps1:3-30). Its procedure is the "One identity per app (AI-1)" section ofSQL-MANAGED-IDENTITY.md, walked below. The one-time cutover scripts and their workflow were deleted once the cutover completed (see the cutover section below), so do not go looking for them.
azure-setup.sh, One-time Azure bootstrap
File: MMCA.ADC/scripts/azure-setup.sh (226 lines)
What it is. A bash script that creates every Azure identity and OIDC credential the GitHub
Actions deploy pipeline needs. It is idempotent: every step checks for existing state before
creating anything (azure-setup.sh:12, "Idempotent: safe to re-run").
When to run. Once per environment: when standing up a fresh Azure deployment for the first
time, or when rebuilding after a disaster recovery scenario where the identity objects were lost.
Never run it as part of a regular deploy; deploy.yml consumes the outputs but never re-runs this
script.
[Rubric §11, Security] assesses whether secrets are managed safely and whether OIDC / managed identities replace long-lived credentials. This script is the bootstrap for that posture: it creates a User-Assigned Managed Identity (UAMI) and federated GitHub OIDC credentials so the pipeline never holds a client secret.
[Rubric §17, DevOps & Deployment] assesses whether the provisioning and deployment pipeline is
automated, repeatable, and documented. The bootstrap being a single idempotent script that also
prints its own post-run checklist (azure-setup.sh:186-226) is the embodiment of that principle.
Walkthrough
Configuration block (azure-setup.sh:26-35). Hard-codes the target subscription
(4513b073-3a04-4f5c-b272-bbcc329b2d49), tenant (c6369020-..., QiMata Technologies), resource
group (acc-rg), location (eastus2), UAMI name (mmca-adc-github-deploy) and the GitHub
coordinates (org ivanball, repo ADC, branch main, environment production). Edit these before
running in a different environment. The inline comment at azure-setup.sh:32 is the one that saves
an hour: the GitHub repo is named ADC, not MMCA.ADC, and an OIDC subject built from the wrong
repo name authenticates nothing.
Why UAMI instead of an App Registration (azure-setup.sh:6-10). AAD App Registration creation
is blocked in the QiMata tenant for non-admin users (Graph Authorization_RequestDenied). UAMIs are
ARM resources, so RG-level Contributor plus role-assignment rights is sufficient to create them. The
choice is forced by tenant policy, not preference.
Resource group (azure-setup.sh:43-47). az group create is a no-op when the group already
exists. The comment (azure-setup.sh:40-42) notes that acc-rg is shared with unrelated production
resources and that the create call is kept only for disaster recovery. That shared-RG fact is what
makes mode=Complete forbidden for every Bicep deploy in this repo: Complete mode deletes resources
absent from the template, which here would mean someone else's production.
UAMI creation and ID retrieval (azure-setup.sh:49-65). Creates the identity, then queries both
clientId (azure-setup.sh:56-59) and principalId (azure-setup.sh:60-63) and echoes them. The
clientId becomes the GitHub secret AZURE_CLIENT_ID; the principalId is what the role
assignments below key on.
assign_role and the az-cli 2.84.x workaround (azure-setup.sh:69-100). Azure CLI 2.84.x
returns a spurious MissingSubscription error on az role assignment create even when the write
succeeds (azure-setup.sh:70-72). The function therefore hits the ARM REST API directly with
az rest PUT (azure-setup.sh:89-98). It also checks for an existing assignment first (an
az rest GET plus a JMESPath filter, azure-setup.sh:81-87), so a re-run is a no-op rather than a
duplicate grant.
Role assignments (azure-setup.sh:102-105). Two roles are granted to the UAMI at RG scope:
Contributor(GUIDb24988ac-...), which deploys ARM/Bicep and manages Container Apps, SQL and the rest.AcrPush(GUID8311e382-...), which pushes container images. The ACR admin user is disabled (DISASTER-RECOVERY.md:82), so the UAMI'sAcrPushis the only image-push path that exists.
Note what is deliberately absent: Microsoft.Authorization/roleAssignments/write. That omission is
a least-privilege decision with a visible downstream consequence: every data-plane grant the apps
need is applied out of band by an operator who holds role-assignment rights, either by hand (the
avatar grant, section 6 of the mobile runbook below) or through
scripts/security/bootstrap-identities.ps1 for the per-app identities
(bootstrap-identities.ps1:10-14).
Federated credential (azure-setup.sh:107-184). One OIDC federated credential is created on the
UAMI: github-env-production, subject repo:ivanball/ADC:environment:production
(azure-setup.sh:171-172). Every workflow job that runs azure/login declares
environment: production (the deploy's foundation, build-images and deploy jobs, cost-guard, the
load tests and dr-drill), which is the subject GitHub mints for it (azure-setup.sh:108-116).
There is deliberately no branch-scoped ref:refs/heads/main credential: it would let a job without
the environment, and so without the environment's branch policy, mint a production token. A job
that fails azure/login with AADSTS700213 is missing environment: production, and the fix belongs
in that job, never in a second credential. When the retired github-ref-main credential still
exists, the script reports it and prints the delete command, but leaves the deletion to the operator
(azure-setup.sh:174-184).
create_or_replace_fic (azure-setup.sh:124-169) does what its name says: it reads the existing
credential's subject, keeps it when it matches, replaces it with az identity federated-credential update when it differs, and creates the credential only when the read reports not-found. Any other
read failure stops the script instead of falling through to a create that would mask the real error
(azure-setup.sh:153-157). The issuer https://token.actions.githubusercontent.com and the audience
api://AzureADTokenExchange are fixed (azure-setup.sh:117-118). The subject string is the entire
security boundary here: it is why a fork, or any other repo, cannot mint a token Azure will accept.
Post-run checklist (azure-setup.sh:186-226). The script prints everything the operator must
still do by hand: create the GitHub environment, add seven required secrets (AZURE_CLIENT_ID,
AZURE_TENANT_ID, AZURE_SUBSCRIPTION_ID, SQL_ADMIN_PASSWORD, JWT_RSA_PRIVATE_KEY_PEM,
JWT_RSA_PUBLIC_KEY_PEM, GRPC_SERVICE_TOKEN_SIGNING_KEY; azure-setup.sh:197-203), two required
variables (AZURE_RESOURCE_GROUP and ALERT_EMAIL, azure-setup.sh:208-209), then the optional
secrets (OAUTH_GITHUB_CLIENT_ID, OAUTH_GITHUB_CLIENT_SECRET, ANTHROPIC_API_KEY,
SMTP_PASSWORD) and optional variables (SMTP_HOST, SMTP_PORT, SMTP_FROM, SMTP_USERNAME).
There is no HS256 fallback signing key in that list: RS256 is the only signing path, which is why
both RSA PEMs are listed as required.
Every required entry matches a deploy guard. The checklist warns that the deploy refuses to
start when a required secret or variable is unset (azure-setup.sh:211-212), and the guards sit in
deploy.yml's parameters step: ALERT_EMAIL (deploy.yml:1784-1785; main.bicep:154 declares
alertEmailAddress with no default, because alerts that notify nobody are silent failures), both
RSA PEMs (deploy.yml:1793), and the gRPC service-token key (deploy.yml:1803; main.bicep:74
has no default either, since Engagement, Identity and Notification share it to sign and validate
service-to-service gRPC tokens). Following the printed checklist exactly gets a first deploy past
all of them. One soft spot remains in assign_role: its existence check discards the GET's errors
(azure-setup.sh:81-84), so a transient read failure falls through to the PUT.
The database-per-service cutover, and why its scripts are gone
Before the surviving artifacts make sense, the story behind them does.
Before ADR-006. All four modules (Identity, Conference, Engagement, Notification)
pointed at a single shared SQL database called AtlDevCon. That caused an outbox race: every
service's OutboxProcessor polled the same dbo.OutboxMessages table and could claim another
service's rows, producing duplicate dispatch (the defect documented in ADR-006, fixed 2026-06-07).
The ADR-006 decision. Adopt database-per-service. Each service owns ADC_Identity,
ADC_Conference, ADC_Engagement or ADC_Notification, locally on the Aspire SQL container and in
Azure as four Basic-tier databases on the same SQL server, generated from a single
serviceDatabaseNames array (main.bicep:1428, :1435-1447, Basic 5 DTU with a 2 GB cap each). Cross-service
references become scalar IDs (no cross-database foreign keys); CrossDataSourceDegradeConvention
removes FK constraints at the EF level; consistency flows through the outbox and broker
(ADR-003).
[Rubric §8, Data Architecture] assesses data modeling quality, isolation, and whether services own
their own schema. The per-service database design addresses this directly: each service has its own
schema, its own migrations project
(Source/Hosting/MMCA.ADC.Migrations.SqlServer.{Identity,Conference,Engagement,Notification}), and
its own dbo.OutboxMessages, so no service ever sees another's rows. The template states the
ownership rule as an invariant rather than a convention: each service is the sole migrator of
exactly one of these databases, and adding a service means adding its name to that array
(main.bicep:1421-1428).
The three-commit rollout, and what remains of it. The Azure cutover was structured as three
commits to prevent data loss: commit 1 provisioned the four ADC_* databases empty while the apps
kept reading AtlDevCon; a one-time manual workflow then migrated and copied the data with
row-count verification; commit 2 flipped the container-app connection strings; commit 3 downgraded
AtlDevCon to the Basic archive SKU.
All of it landed, and the finished state is what the template now declares:
- Per-service connection strings are built once from a shared base and injected per app
(
main.bicep:250-267), reaching each container app as a Key Vault secret reference (main.bicep:2464is Identity'sDataSources__Identity__SQLServerConnectionString). - The comment at
main.bicep:250-253records the invariant plainly: each service connects only to its own database, andAtlDevConis no longer referenced by any app. - Those four databases are now the whole application data estate, and the template says so in as
many words (
main.bicep:1421-1422).
AtlDevCon itself is gone (2026-09-02). The archive database that the cutover left behind was
exported to the bacpac blob sql-archive/AtlDevCon-20260902.bacpac in storage account
adcprodstpys4way4uzb3g, then dropped by hand, and its sqlDatabase resource was removed from the
template. What sits at main.bicep:1408-1417 today is a comment block, not a resource: it records
the drop, and then that the bacpac itself was deleted on 2026-10-03, so no restore path remains
(main.bicep:1413-1414). Reading that block is the fastest way to learn that the "NEVER delete"
instruction older documents carry was deliberately superseded rather than forgotten. The archive
section below summarizes the record.
The same comment block carries a warning worth internalizing before you touch anything in acc-rg:
an unrelated SQL server named atldevcon in westus2 lives in this shared resource group, it
predates MMCA, and it has never hosted an ADC database (main.bicep:1415-1417, repeated at
DISASTER-RECOVERY.md:33-37). It is not the archive and must never be referenced,
scaled or deleted as if it were. ADC's SQL server is adc-prod-sql-<token>.
The cutover scripts were deleted on purpose (2026-08-30, commit 6323a7b9). Four artifacts this
chapter used to walk step by step no longer exist in the tree:
.github/workflows/cutover-per-service-dbs.yml,
scripts/copy-atldevcon-to-per-service-dbs.azure.ps1,
scripts/migrate-atldevcon-to-per-service-dbs.ps1 and
scripts/migrate-atldevcon-to-per-service-dbs.sql. They were single-use tooling whose own guard
rails made a second run wrong rather than merely redundant: the copy skipped any target table that
already had rows, so a run after the flip would silently do nothing while reporting success. Keeping
a dangerous single-use script in scripts/ invites exactly that run. If a DR rebuild ever needs
them, recover them from git history at that commit rather than reconstructing them from memory.
[Rubric §34, Architecture Governance] assesses whether the repository's contents reflect current
policy rather than accumulated history. Deleting spent one-time tooling, and then retiring the
archive database it produced once a bacpac served the same purpose, is that principle applied twice:
first to scripts/, then to main.bicep. Note the ordering the template records
(main.bicep:1411-1413): Incremental mode never deleted the database when the declaration left the
template, so removing the resource and dropping the database were two separate, deliberate acts.
infra/DISASTER-RECOVERY.md, DR runbook
File: MMCA.ADC/infra/DISASTER-RECOVERY.md (250 lines; not the Store file of the same name)
What it is. The authoritative disaster-recovery runbook for the ADC production environment. Mandated by ADR-009: every consuming app must declare RTO/RPO per failure scenario, document the backup/restore mechanism, accept single-region risk in writing, and record restore drills in a drill-result table that cannot stay empty.
When to consult. On any data-loss event, corruption, failed deployment, or region outage. Also
consult it when changing backup or retention settings, to see what the targets are. Day-2 alert
triage (what to do when an SLO alert fires) is the companion infra/OPERATIONS.md, not this file
(OPERATIONS.md:3-6).
Cross-link: see the IaC chapter for how infra/main.bicep provisions the LTR
policies and alerts, and the CI/CD chapter for the deploy rollback mechanism and
the freshness gates.
[Rubric §29, Resilience & Business Continuity] assesses whether the system has documented RTO/RPO
targets and a drilled restore procedure. The DR file addresses both: the objectives table
(DISASTER-RECOVERY.md:10-14) and a maintained drill ledger of ten rows
(DISASTER-RECOVERY.md:213-224), whose newest entry is a PITR restore of ADC_Conference on
2026-11-30 that completed in 58.7 min against the 2 h RTO and came back Online. The status block
(DISASTER-RECOVERY.md:235-240) reads that ledger as a rotation rather than as a single success:
every ADC_* database carries a recovery proof, and the number it quotes is the slowest
measured restore in the rotation (58.7 min), not the fastest. A second status paragraph is retained
for the record (DISASTER-RECOVERY.md:242-250); it closes TD-10 on the strength of the original
2026-06-20 drill plus the Polly fault-injection tests in MMCA.Common and the Azure Monitor SLO
workbook (main.bicep:1208, the sloWorkbook resource embedding
infra/workbooks/adc-slo-workbook.json). The ledger is filled by hand from the drill's job summary
(DISASTER-RECOVERY.md:187-190), so its newest row can trail the workflow's run history; the deploy
gate reads the run history, not the ledger.
[Rubric §11, Security] assesses credential hardening. The managed-identity section
(DISASTER-RECOVERY.md:78-133) documents the out-of-band bootstrap for the adc-prod-apps-identity
UAMI, the Key Vault (adckv<resourceToken>, RBAC-authorized) and both role grants (Secrets User for
the apps, Secrets Officer for the deploy identity). The ACR admin user is disabled; runtime secrets
reach the container apps as keyVaultUrl references, so no plaintext secrets exist in Container App
environment variables. What lives in that vault is worth reading in full
(DISASTER-RECOVERY.md:94-98): the SQL and Service Bus connection strings, the RSA/JWT keys, the
SMTP, OAuth and Anthropic secrets, and the gateway synthetic-traffic key that lets the k6 load test
bypass rate limiting. The bootstrap is out-of-band for the same least-privilege reason the avatar
grant is: the deploy identity has Contributor but not role-assignment write, so main.bicep
references the identity as existing rather than creating it (DISASTER-RECOVERY.md:83-85).
Alerts and rollback, read against the template
The runbook's alerting and rollback paragraphs are summaries; the template and the workflow carry the detail a first responder needs, and the summaries agree with them.
Alert resource type, count and cadence (DISASTER-RECOVERY.md:59-70). The runbook lists six
SLO scheduled-query rules over the Log Analytics workspace, five evaluated every 15 minutes over a
15-minute window and the AI token ceiling every 12 hours over two days. In the template they are
sloAlertSpecs (main.bicep:457-556) materialized as scheduledQueryRules named
adc-prod-alert-<key>-v2 (main.bicep:558-566) and scoped to the Log Analytics workspace
(main.bicep:577), not to the App Insights component. Beside the three request-path rules sit
request-rejections (main.bicep:467-475), resilience-circuit-open (main.bicep:497-505) and
ai-scoring-token-ceiling (main.bicep:543-555), and evaluationFrequency and windowSize both
fall back to PT15M (main.bicep:589, :591). The thresholds in the runbook's table
(DISASTER-RECOVERY.md:63-70) match the specs.
The cadence change is a deliberate FinOps trade and the template shows its arithmetic
(main.bicep:578-582): a scheduled-query rule is billed per evaluation, and the 5-minute tier costs
about $1.47/month per rule against about $0.50 at 15 minutes. Because windowSize was already
PT15M, each evaluation still looks at the same 15 minutes of data, so no threshold changed; what
disappeared is the overlap between consecutive evaluations. The cadence fields are overridable per
entry because one rule genuinely needs a different shape: the AI token ceiling evaluates a two-day
window twice a day, both values pinned by ARM-side limits (main.bicep:530-555, :584-593). Two
metric alerts sit beside the log-search rules. The Sev 1 gateway-availability rule
(main.bicep:1166) is kept deliberately because availability has no status-code confound and
never produced a false page (main.bicep:621-622). The broker dead-letter rule
(main.bicep:796-839) is a metric over the Service Bus namespace rather than a log query because the
dead-letter count sees causes that log nothing at Error, or nothing at all (main.bicep:787-795).
[Rubric §13, Observability] assesses alerting and monitoring. The six SLO signals and their
severities are: failed requests (sev 2, main.bicep:458-466), request rejections (sev 3,
main.bicep:467-475), average server response time (sev 3, main.bicep:476-484), dependency
failures (sev 2, main.bicep:485-493), a resilience circuit breaker opening (sev 2,
main.bicep:497-505) and the AI scoring token ceiling (sev 3, main.bicep:543-555). The
request-path queries carry tuning a metric alert could not express: 401 and 499 are excluded from
the failure counts, 404 and 429 are counted separately as rejection volume with the two crawler
etiquette paths (/robots.txt, /sitemap.xml) excluded there, SignalR hub connections are excluded
from the average-duration rule because a hub reports its connection lifetime as request duration,
and a window in which a revision was deploying is skipped by both the response-time and the
dependency rule (main.bicep:421-456). The template names the exact incidents that forced each
exclusion, which is the right level of evidence for a change that loosens an alert. Per-alert triage
lives in infra/OPERATIONS.md below.
ALERT_EMAIL is required (DISASTER-RECOVERY.md:74). The runbook and the template agree:
alertEmailAddress is a required parameter with @minLength(3) and no default
(main.bicep:152-154), it feeds the action group (main.bicep:405-419), and
deploy.yml:1784-1785 fails the deploy when vars.ALERT_EMAIL is unset. An alert that notifies
nobody is impossible in a deployed environment by construction.
Deploy rollback (DISASTER-RECOVERY.md:167-175). The runbook describes the post-deploy gate as
a revision-activation check on every app followed by six HTTP probes through the Gateway and the UI,
with an automatic az containerapp revision copy back to the previous revision. The workflow holds
the reasoning for the activation gate: the HTTP probes alone cannot prove the new code is serving,
because a healthy Gateway keeps answering from the previous backend revision when the new one never
goes ready, which is exactly how a readiness regression stayed hidden for four days
(deploy.yml:2110). The rollback itself is az containerapp revision copy (deploy.yml:2261).
Every failed smoke run ends with one counted summary line (rolled back, skipped because the newest
revision is live, no candidate revision, rollback failed; deploy.yml:2281), because a
probe failure on a fleet whose newest revisions all activated rolls nothing back, and the summary has
to say so rather than claim a revert.
Recovery objectives
The DR file targets three failure scenarios (DISASTER-RECOVERY.md:10-14):
| Scenario | RPO | RTO |
|---|---|---|
| Accidental data loss / bad migration (within the retention window) | about 10 min | 2 h |
| Single service DB corruption | about 10 min | 1 h (PITR restore-as-new, swap name) |
| Full region loss | 1 h (geo-redundant backup replication lag) | 4 h (geo-restore plus redeploy) |
These are deliberately modest: ADC is a regional, non-24x7 conference app. Sub-hour multi-region
failover is explicitly not a goal (DISASTER-RECOVERY.md:16-17).
Accepted single-region risks
DISASTER-RECOVERY.md:19-44 lists three knowingly-accepted single points of failure. Note the
topology it records (DISASTER-RECOVERY.md:21-23): one resource group (acc-rg), apps in the RG's
region, and the SQL server in sqlLocation (westus2) because the QiMata Sponsorship subscription
blocks new SQL servers in eastus2. That split is a bicep parameter, not an accident.
- One Azure SQL server,
publicNetworkAccess: Enabledwith the Azure-services firewall rule (main.bicep:1278), mitigated by geo-redundant PITR and LTR. This is also where the runbook records the end of the archive: theAtlDevCondatabase was exported to a bacpac and dropped on 2026-09-02, and that bacpac was itself deleted permanently on 2026-10-03, so no pre-cutover rollback copy exists (DISASTER-RECOVERY.md:25-32). The runbook follows it with the "not ours" warning about the unrelatedatldevconSQL server (DISASTER-RECOVERY.md:33-37). - One Container Apps environment, all apps
minReplicas: 1outside conference mode. A zonal outage drops the app until Azure reschedules. The mitigation is no longer a judgment call made on the day: conference mode (conferenceMode, switched by theCONFERENCE_MODE_UNTILrepository variable on every deploy) keeps a second Gateway replica always on and holds the UI at its scaled maximum, so the two database-free front-door apps survive a single replica loss during the event; the first deploy after the window reverts it, andcost-guard.ymlfails while an expired surge is still live (DISASTER-RECOVERY.md:38-43). The procedure is the "Conference day" section ofOPERATIONS.md, walked below. - One Service Bus namespace (Standard) and one ACR (
DISASTER-RECOVERY.md:44).
Backup posture
Two tiers (DISASTER-RECOVERY.md:46-55), and nothing outside them any more:
- PITR: the Basic tier's 7 days of point-in-time restore on geo-redundant storage (the Azure default). Covers the "undo the last bad change" case with an RPO of minutes.
- LTR: long-term retention on all four live per-service databases, weekly P4W, monthly P12M and
yearly P1Y at week 1, declared as the
serviceDatabaseLtrresource (main.bicep:1460).
The AtlDevCon bacpac that used to sit beside both tiers was deleted on 2026-10-03, and the runbook
says so in the same section: the four ADC_* databases are the only databases on the server, and
nothing of the archive remains to back up (DISASTER-RECOVERY.md:53-55).
Recovery procedures
Single database PITR restore (DISASTER-RECOVERY.md:137-142). Restore to a new name, validate,
then rename or repoint via a redeploy. The worked example uses ADC_Conference.
LTR restore (DISASTER-RECOVERY.md:144-149). List available backups with
az sql db ltr-backup list, then restore with az sql db ltr-backup restore.
Full region loss (DISASTER-RECOVERY.md:151-154). The deploy pipeline is region-parameterized
(sqlLocation plus the RG location), so recovery is: create a new RG in a healthy region,
geo-restore each ADC_* database there, then re-run deploy.yml pointed at the new RG. There is no
last-resort source for pre-cutover data: the runbook records that the bacpac was deleted on
2026-10-03 and that no pre-cutover restore path exists (DISASTER-RECOVERY.md:153-154). The live
ADC_* databases already hold that data, copied in at cutover (DISASTER-RECOVERY.md:30-31).
What the drill does not cover. The weekly drill exercises PITR only (see the drill section below). Neither the geo-restore behind the 4 h full-region RTO nor an LTR restore has ever been drilled, and that gap is accepted rather than closed: ADR-009 records the decision not to run a periodic geo-restore or LTR drill. Read the full-region row of the objectives table and the LTR procedure as documented, not demonstrated.
Storage account Shared Key (DISASTER-RECOVERY.md:156-165). The only consumer of the storage
account key was the bacpac import (az sql db import --storage-key-type StorageAccessKey), and the
bacpac is deleted, so Shared Key is off: storageAllowSharedKeyAccess defaults to false
(main.bicep:166, applied at main.bicep:1881). The apps reach blob storage as their managed
identity over OAuth (FileStorage__ServiceUri, DataProtection__BlobStorageUri), and no workflow
calls listKeys on the account (main.bicep:1873-1879). Operators doing ad-hoc data-plane reads
need Storage Blob Data Reader (or Contributor) on the account and --auth-mode login. A restore
that genuinely needs the account key sets the STORAGE_ALLOW_SHARED_KEY_ACCESS=true repository
variable and redeploys for that restore only (DISASTER-RECOVERY.md:163-165; the procedure is the
"Key-ring storage: Shared Key off (AI-4)" section, SQL-MANAGED-IDENTITY.md:271). MMCA.Store, which
keeps its legacy bacpac, uses the same shape for its one manual import: shared-key access on for the
import, off again as soon as it succeeds (MMCA.Store/infra/DISASTER-RECOVERY.md:53-72).
[Rubric §11, Security] assesses credential hardening. An account key is a bearer credential to the whole account; recording which single procedure kept it alive is what turns "disable Shared Key" from a risky guess into a change with a known blast radius.
Restore drill
DISASTER-RECOVERY.md:177-203 defines the drill: PITR-restore a throwaway copy, confirm it comes
back Online, record the measured restore time, then delete the copy. Only a copy is ever created, so
the live databases are never touched. The file documents three ways to run it
(DISASTER-RECOVERY.md:181-191) and names the scheduled one as the enforcing path:
- Scheduled (
DISASTER-RECOVERY.md:183-186), the weekly cron, which rotates across the four live per-service databases by ISO week number so each earns a recovery proof roughly monthly. The retiredAtlDevConarchive was never in the rotation and no longer exists as a database at all. - One-click (
DISASTER-RECOVERY.md:187-190), thedr-drill.ymlworkflow's manualworkflow_dispatch, for a chosen database (the four liveADC_*databases, defaulting toADC_Identity) and a chosen point in time. It prints the drill-result row in the job summary, ready to paste into the ledger. - Local / CLI (
DISASTER-RECOVERY.md:191),pwsh ./scripts/dr-restore-drill.ps1 -SourceDatabase ADC_Conferenceafteraz login.
All three wrap the same az sql db restore, verify, az sql db delete sequence
(DISASTER-RECOVERY.md:193-199); there is no sqlcmd anywhere in the drill path.
The stated SLO is at least one successful drill per release train and after any backup or retention
change, with the restore completing inside the 2 h RTO; a missed or failed drill is called a
release-blocking regression for §29 (DISASTER-RECOVERY.md:201-203). The drill-result table
(DISASTER-RECOVERY.md:213-224) is where that claim is cashed, and it carries ten rows:
| Drill date | Source | Result |
|---|---|---|
| 2026-06-20 | ADC_Conference (PITR) | PASS in 2.6 min, Online |
| 2026-07-20 | ADC_Identity (PITR) | PASS in 1.8 min, Online |
| 2026-07-20 | ADC_Engagement (PITR) | PASS in 2.3 min, Online |
| 2026-07-27 | ADC_Notification (PITR) | PASS in 2.1 min, Online |
| 2026-08-03 | ADC_Identity (PITR) | PASS in 4.4 min, Online |
| 2026-08-10 | ADC_Conference (PITR) | PASS in 2.1 min, Online |
| 2026-11-09 | ADC_Engagement (PITR) | PASS in about 26 min, Online |
| 2026-11-16 | ADC_Notification (PITR) | PASS in 25.6 min, Online |
| 2026-11-23 | ADC_Identity (PITR) | PASS in 45.9 min, Online |
| 2026-11-30 | ADC_Conference (PITR) | PASS in 58.7 min, Online |
Read the shape of that table, not just the last row. The first entry is the pre-rotation drill in
which one database stood in for all four; everything from 2026-07-20 onward is the weekly rotation,
and those rows are the first recovery proofs ADC_Identity, ADC_Engagement and ADC_Notification
ever had (DISASTER-RECOVERY.md:205-211). Each row also carries its dr-drill.yml run id, so every
claim in the ledger is traceable to an Actions run instead of resting on the author's word. The
ledger has no rows between 2026-08-10 and 2026-11-09; the drills in that span exist only in the
Actions history, which is the record the deploy gate reads.
The spread is the other lesson, and it is large. Restores took 2 to 4 minutes through 2026-09-21 and
25 to 59 minutes from 2026-09-28 on, for every database, including ADC_Notification, which carries
no DML audit policy; the time is spent inside az sql db restore itself rather than in the workflow,
MMCA.Store's identical drill stays in minutes, and the cause is not established
(DISASTER-RECOVERY.md:226-233). Every drill still passes the 2 h RTO, but the newest (58.7 min)
sits at the 1 h single-database-corruption target, so the runbook records that row of the
objectives table as one the drill no longer demonstrates with margin, and the status block quotes
that slowest number (DISASTER-RECOVERY.md:235-240). A ledger that keeps growing is what makes a
claim like "restores take about two minutes" falsifiable, and this one falsified it. The same note
(DISASTER-RECOVERY.md:209-211) records that rows naming AtlDevCon are kept as history rather
than being edited out.
The ledger stays honest because it is gated, not remembered. dr-freshness fails a deploy on
either of two conditions (deploy.yml:1274-1289): the newest successful dr-drill.yml run is older
than 8 days (deploy.yml:1285), or a drill job concluded failure and no newer run of the same job
name succeeded (failure-key-job-prefix: 'drill (', deploy.yml:1287). The drill job is named
drill (<database>) (dr-drill.yml:103-107), so the failure key is per database: a red
drill (ADC_Notification) keeps the gate red until a newer drill (ADC_Notification) goes green,
and a green run against another database (next week's rotation, or a default ADC_Identity
dispatch) cannot clear it. The rotation itself is prose here but arithmetic in the workflow,
which is the source of truth. The next section walks it.
dr-drill.yml and dr-restore-drill.ps1, the ADR-009 restore drill
Files: MMCA.ADC/.github/workflows/dr-drill.yml (169 lines),
MMCA.ADC/scripts/dr-restore-drill.ps1 (101 lines)
What it is. The automation behind the drill requirement above, in two jobs: select picks and
validates the target database and holds no credentials, and drill logs in to Azure via OIDC and
runs the PowerShell script, which does the restore, the timing, the verification and the cleanup,
and prints a drill-result row ready to paste into infra/DISASTER-RECOVERY.md
(dr-drill.yml:15-20, dr-restore-drill.ps1:3-6).
When it runs. Both on a schedule and on demand, and the scheduled half is the one that carries the §29 weight:
- Weekly cron, Mondays 06:00 UTC (
dr-drill.yml:37-39). This is the enforcing path: a throwaway-copy restore is cheap and is deleted immediately after, so recovery is proven continuously rather than whenever somebody remembers (dr-drill.yml:7-8). workflow_dispatch(dr-drill.yml:22-36) for an ad-hoc drill against a specific database and restore point. The dispatch default isADC_Identitywith a 10-minutes-ago restore point.
The workflow grants only contents: read at the top level (dr-drill.yml:43-44); id-token: write
goes to the drill job alone, beside contents: read (dr-drill.yml:120-122), so the select job,
which reads the dispatch inputs, can never mint an Azure token (dr-drill.yml:41-42). The drill
job runs under environment: production (dr-drill.yml:116-119), so its OIDC token carries the
environment subject that the deploy identity's single federated credential accepts (see the
azure-setup.sh section above), and it logs in with the same three AZURE_* secrets
azure-setup.sh printed (dr-drill.yml:128-133). Both third-party actions it uses are pinned to a
full commit SHA with the human-readable version parked in a trailing comment:
actions/checkout@3d3c42e5... (dr-drill.yml:124) and azure/login@a641126d...
(dr-drill.yml:129).
[Rubric §32, Dependency & Supply-Chain] assesses whether third-party dependencies are pinned,
scanned, and cannot change underfoot. A Git tag is mutable, so @v3 in a job that mints an Azure
OIDC token means a repointed tag could run new code with production credentials; the SHA pin removes
that path, and the # v7.0.1 / # v3.1.0 comments keep the pin readable and updatable.
Why the drill shares the deploy's concurrency group. The workflow joins the prod-azure group
with cancel-in-progress: false (dr-drill.yml:50-52). Its comment gives the reason
(dr-drill.yml:46-49): the drill creates and deletes a database on the production SQL server, and
deploy.yml declares that every workflow mutating production Azure state joins that same group
(deploy.yml:56-61), so a drill and a deploy (which migrates those very databases) never run at the
same time. Never cancelling an in-flight drill matches the deploy side, for the reason the cleanup
sweep below exists: a drill killed mid-restore never reaches the script's own cleanup. The cost is
queueing. A push to main that lands during a drill waits behind it, for at most the drill job's
90-minute timeout. And because GitHub Actions keeps only one pending run per concurrency group, a
scheduled drill still waiting behind a deploy can be displaced by a newer pending deploy; the 8-day
dr-freshness window, wider than the weekly cadence, is what absorbs one lost run, and a manual
dispatch restores the proof.
[Rubric §17, DevOps & Deployment] assesses whether deployments are safe and repeatable. Serializing every production-mutating workflow on one group turns "do not drill during a migration" from an operator habit into a property of the pipeline.
Scheduled runs rotate across the four live per-service databases by ISO week number modulo 4
(dr-drill.yml:84-91, the arithmetic at dr-drill.yml:87-90), so each live database gets a
recovery proof roughly monthly. Which branch runs is decided purely by whether the dispatch input is
present (dr-drill.yml:74), which is what lets one workflow serve both triggers. The chosen database
is echoed into the step summary (dr-drill.yml:101) and, more usefully, into the drill job's name:
the job is named drill (<database>) from the select job's output (dr-drill.yml:103-107), so
the run list records which database every run proved, and the deploy gate keys a failure to that
name (walked below). Note how the input is read: the step declares
DISPATCH_DATABASE: ${{ inputs.source_database }} and DISPATCH_RESTORE_POINT as environment
variables (dr-drill.yml:69-71) and the shell tests "${DISPATCH_DATABASE:-}" (dr-drill.yml:74)
instead of expanding the ${{ }} expression inline, and the whole script runs under
set -euo pipefail (dr-drill.yml:73) so an unset variable or a failed command stops the step
rather than silently rotating to the wrong database.
How the inputs reach the PowerShell script. The select job validates both dispatch inputs
before anything uses them: the database must be one of the four live names
(dr-drill.yml:76-82), and the restore point must be one to five digits, with 10 as the scheduled
default (dr-drill.yml:93-98). It publishes the validated values as job outputs
(dr-drill.yml:58-60, :99-100). The drill step reads those outputs, never the raw inputs, through
its own env block: DRILL_RESOURCE_GROUP from vars.AZURE_RESOURCE_GROUP, and
DRILL_SOURCE_DATABASE and DRILL_RESTORE_POINT_MINUTES_AGO from the select job
(dr-drill.yml:142-145), then passes those variables to the script (dr-drill.yml:146-151). The
workflow's own comment states the reason (dr-drill.yml:137-141): values reach the script through
the environment rather than being interpolated into the command line, so a dispatch input cannot
inject extra PowerShell arguments. This matters more here than in most jobs, because the step runs
with an Azure session that holds Contributor on the production resource group.
[Rubric §11, Security] assesses credential handling and injection resistance. Workflow expression
interpolation is textual substitution into the shell command before the shell ever sees it, so a
hostile input value becomes code; routing every input through env and quoting it turns the same
value back into data. The type: choice input (dr-drill.yml:24-32) constrains only the dispatch
form: the REST API accepts any string for a dispatch input, which is why the allow-list is
re-applied in the select job rather than trusted (dr-drill.yml:64-68). Validation, env routing
and quoting are three layers, and the job that sees the raw input holds no Azure credential at all.
Why the job gets 90 minutes. The drill job carries a 90-minute timeout-minutes
(dr-drill.yml:115), and the comment above it records why (dr-drill.yml:109-114): the restore is
platform time on Azure SQL, and it has grown from 2 to 4 minutes (every drill through 2026-09-21) to
25 to 59 minutes since 2026-09-28; the 2026-11-30 run against ADC_Conference took 58.7 minutes,
within two minutes of a 60-minute cap (run 46364439098). A cap is a spend guard that costs nothing
unless it is reached. The first raise, from 30 to 60, followed the 2026-09-14 scheduled run (run
34838047421) that was killed at the 30-minute limit and recorded no freshness proof. The limit
matters beyond the drill itself: the dr-freshness deploy gate reads this workflow's run history,
so a drill that times out does not just lose one measurement, it leaves a failed
drill (<database>) job that blocks the next production deploy until the same database drills
green (the gate is walked below).
The sweep that runs even when the drill does not finish. A job cancelled at its
timeout-minutes is killed mid-step, so the script's own finally cleanup never runs. The workflow
comment records the incident that exposed this (dr-drill.yml:153-157): the 2026-09-14 scheduled
run was cancelled mid-restore and left ADC_Engagement-drill behind, and the weekly rotation meant
the next run targeted a different database, so the script's name-specific stale-copy check would not
have removed it either; the copy sat at Basic-tier cost for five days. The last step,
Remove leftover drill copies, therefore runs under if: always() (dr-drill.yml:158-159), which
fires on success, failure and cancellation alike. It resolves the server by the same
adc-prod-sql- name prefix the script uses, exits 0 with a workflow warning when no server matches
(dr-drill.yml:164-165), and deletes every database whose name ends in -drill
(dr-drill.yml:166-169), not just the copy this run created. The suffix filter is what keeps the
sweep safe on a production server: the live ADC_* databases never end in -drill, so the only
names it can match are throwaway copies. One consequence for a local run: a copy kept with the
script's -KeepCopy switch for a manual row-count check (dr-restore-drill.ps1:83-88 honors it) is
deleted by the next workflow run, so finish that check before Monday 06:00 UTC. It reads the
resource group through env like the drill step (dr-drill.yml:160-161) and runs under
set -euo pipefail (dr-drill.yml:163).
AtlDevCon is gone from both ends of this pair. The dispatch choice input and the select
job's allow-list offer only the four live databases (dr-drill.yml:28-32, :77), and the script's
own -SourceDatabase default is ADC_Identity (dr-restore-drill.ps1:26). Both files record why:
the archive was exported to a bacpac and dropped on 2026-09-02, so it can no longer be PITR-restored
(dr-restore-drill.ps1:10-12), and the workflow header adds that the bacpac itself was deleted on
2026-10-03 (dr-drill.yml:10-12), so there is no recovery path to drill at all. Leaving it
selectable would offer an operator a drill that fails for a reason unrelated to recoverability, and
that failure would then block the next production deploy through dr-freshness. Proving a retired
archive restores would prove nothing about the databases that take writes anyway.
[Rubric §29, Resilience & Business Continuity] is what this workflow serves: it converts the DR runbook from a document into a measurement.
Walkthrough of the script
Parameters (dr-restore-drill.ps1:23-30). -ResourceGroup (default acc-rg),
-SourceDatabase (default ADC_Identity), -RestorePointMinutesAgo (default 10), -KeepCopy, and
-SummaryPath (the workflow passes $env:GITHUB_STEP_SUMMARY, dr-drill.yml:146-151). The workflow
never leans on a default: it passes an explicit -SourceDatabase from the select job and an
explicit -ResourceGroup from vars.AZURE_RESOURCE_GROUP (dr-drill.yml:143-144, :148-149), so
the script's own defaults only matter to a local CLI run.
Server discovery (dr-restore-drill.ps1:40-44). Queries by name prefix (adc-prod-sql-*) rather
than hard-coding the resource-token suffix, and throws a clear "Did you run 'az login'?" error when
nothing matches. Resolving from live Azure state is what lets the same script work against a rebuilt
environment whose token differs.
Stale-copy cleanup (dr-restore-drill.ps1:52-57). Deletes any <SourceDatabase>-drill left by a
previous run, so the restore name is free. Without it, one crashed run would fail every subsequent
drill on a name collision, and the freshness gate would then start blocking deploys for a reason
that has nothing to do with recoverability. The check only covers the database being drilled this
run, which under the weekly rotation is usually a different one, so the workflow's always() sweep
(dr-drill.yml:158-169) is what catches a copy left by an earlier run against another database.
Restore and timing (dr-restore-drill.ps1:59-66). A stopwatch brackets az sql db restore, and
$LASTEXITCODE is checked explicitly (dr-restore-drill.ps1:65) because a failing az call does
not by itself throw in PowerShell. That elapsed time IS the measured RTO reported in the drill row;
it is not an estimate.
Verification (dr-restore-drill.ps1:68-76). ARM-level: az sql db show --query status must read
Online, otherwise the drill is a FAIL. A deeper row-count check is deliberately out of scope and
needs -KeepCopy plus a manual pass (dr-restore-drill.ps1:18-21).
Cleanup (dr-restore-drill.ps1:83-88). The delete sits in a finally block, so the throwaway
copy is removed even when the restore or the verification threw. A finally block cannot run in
a process that GitHub Actions kills at timeout-minutes, though, which is why the workflow backs it
with the always() sweep described above (dr-drill.yml:153-169): between them, a weekly drill
does not accrete paid databases.
Result row and exit code (dr-restore-drill.ps1:90-101). Prints the markdown table row (date,
source, PASS/FAIL, minutes, note) to both the console and the job summary through the Write-Line
helper (dr-restore-drill.ps1:35-38), then exits 1 on anything other than PASS
(dr-restore-drill.ps1:101), so a failed drill is a failed workflow run and therefore a stale
recovery proof.
What it does not do, and the gate that makes it matter
The drill never touches a live database and it does not gate production directly. The link to
production is its run history, checked by the dr-freshness step of deploy.yml's single
freshness job (deploy.yml:1260-1292). That job holds the four recency gates as four steps whose
name and id are the gate names, and every step after the first carries if: ${{ !cancelled() }}
(deploy.yml:1298, :1319, :1358), so one stale proof never hides the state of the others
(deploy.yml:1257). The dr-freshness step calls the shared MMCA.Common composite action
ivanball/MMCA.Common/.github/actions/freshness-gate (deploy.yml:1281) with
workflow: dr-drill.yml and window-days: '8' (deploy.yml:1284-1285). It names no
required-jobs, so the action runs in its success mode: the newest run that completed with
success, failing the deploy when that run is older than the window
(MMCA.Common/.github/actions/freshness-gate/action.yml:16-19). The comment at
deploy.yml:1275-1277 records why the gate can trust that run at face value: dr-drill.yml has no
skip-if-unchanged guard, so every successful run really performed a PITR restore.
Success mode alone cannot see a database whose drill keeps failing while the rotation moves on, and
the step closes that gap with failure-key-job-prefix: 'drill (' (deploy.yml:1287, reasoning at
deploy.yml:1278-1280). With a prefix set, the action also walks the newest completed runs and
fails the gate when a job whose name starts with the prefix concluded failure in some run and has
not concluded success in any newer run (action.yml:28-37, :71-75); the error names the job and
the run (action.yml:266). Because the drill job is named per database, a week that goes green on
ADC_Engagement cannot hide a red ADC_Notification from the week before: the gate stays red until
drill (ADC_Notification) passes again. A cancelled or skipped job neither blocks nor clears
(action.yml:32), and a failure older than the newest max-runs completed runs is out of view
(action.yml:37). The job itself asks for only actions: read plus contents: read
(deploy.yml:1265-1267) and runs on a 5-minute timeout (deploy.yml:1264), because it is a handful
of API reads and no restore cost per deploy.
Why a shared action rather than inline bash: the DR, load, cross-service and cross-browser steps all
call the same action (deploy.yml:1281, :1301, :1324, :1364), and so does MMCA.Store's deploy
(action.yml:8-9), so the staleness arithmetic, the failure key and the break-glass rules live in
one place and a fix lands for every gate at once instead of in several drifting copies. All four
steps pin that action to a full MMCA.Common commit SHA with the release named in a trailing comment,
the same treatment the drill gives its third-party actions: a change to the shared gate reaches this
deploy only through a deliberate bump of the pin, never through a push to MMCA.Common's main.
freshness sits in deploy.needs (deploy.yml:1655), and the deploy's condition requires it to
have concluded success (deploy.yml:1690), which means all four steps passed. Break-glass exists
but is deliberately expensive to use: the step forwards the skip_freshness_gates and
skip_justification dispatch inputs (deploy.yml:13, :17) to the action
(deploy.yml:1288-1289), which skips only with a non-empty justification and writes that
justification loudly to the step summary and as a workflow warning (action.yml:6-8, :78-83).
The operational consequence for an on-call reader: a red or skipped weekly drill blocks the next
production deploy, and a red drill keeps blocking until the same database drills green again. If a
deploy fails on dr-freshness, read which job the error names: the fix is to re-run dr-drill.yml
for that database (and fix it first if it genuinely failed), not to bypass the gate or dispatch a
different database. The gate's full mechanics, the break-glass input and the sibling gates are
documented in the CI/CD chapter; the decision is
ADR-064.
infra/OPERATIONS.md, day-2 alert triage runbook
File: MMCA.ADC/infra/OPERATIONS.md (964 lines)
What it is. The alert-to-action companion to the provisioned observability: what to do when each
alert fires, how to read the SLO workbook, how to run conference day, the standard recovery moves,
and why production has no Aspire dashboard. It explicitly defers restore procedure, RTO/RPO and
accepted SPOFs to DISASTER-RECOVERY.md and covers day-2 triage only (OPERATIONS.md:3-6). Two
procedures that are not alert triage also live here, and both are walked after the recovery moves
below: credential compromise and rotation (OPERATIONS.md:857-900) and JWKS signing-key rotation
(OPERATIONS.md:903-936). The runbook carries no transport-cutover section: the live Service Bus
namespace runs MMCA.Common's native transport only, the exit that
ADR-118 records as
executed.
When to consult. When an alert email arrives from the adc-prod-alerts-* action group
(main.bicep:405), whose only receiver is the address in the ALERT_EMAIL repository variable
(OPERATIONS.md:11-13), and about a week before a conference (OPERATIONS.md:746-827).
[Rubric §13, Observability & Operability] assesses whether alerts lead anywhere. A threshold with no runbook is a page nobody knows how to answer, which is exactly what this file, and the build gate below, exist to prevent.
The pairing rule, enforced at build time
ObservabilityConventionTestsBase (in the MMCA.Common.Testing.Architecture package) pairs the
alerts declared in the consumer's bicep against the runbook sections in its OPERATIONS.md. ADC
subclasses it in MMCA.ADC.Architecture.Tests and wires it by embedding both files as manifest
resources named infra.main.bicep and infra.OPERATIONS.md
(MMCA.ADC.Architecture.Tests.csproj:17-22). The base resolves those resources from the derived
type's assembly (ObservabilityConventionTestsBase.cs:51), which is the detail that lets one shared
rule body serve every consumer repo. Three facts run:
- Non-vacuous floor (
ObservabilityConventionTestsBase.cs:85-88): at leastMinimumAlertSpecsalerts must parse out of the bicep, defaulting to 3 (ObservabilityConventionTestsBase.cs:39). ADC overrides it to six, the number of specs it declares (MMCA.ADC/Tests/Architecture/MMCA.ADC.Architecture.Tests/Governance/ObservabilityConventionTests.cs:14), so a parse drift that discovered fewer would fail rather than pass vacuously (OPERATIONS.md:962-965). - Forward direction: every discovered alert key must have a
### ...-alert-<key>heading inOPERATIONS.md, and that heading must carry the alert's current severity as the literal text(sev N)(ObservabilityConventionTestsBase.cs:108-112). Re-tiering an alert in bicep without touching its runbook heading fails the build. - Reverse direction (
ObservabilityConventionTestsBase.cs:121-131): a runbook section for an alert bicep no longer provisions is an orphan and also fails the build.
The parse window is the text between var sloAlertSpecs and resource sloAlerts
(ObservabilityConventionTestsBase.cs:137-138), which in ADC's bicep is main.bicep:457 through
main.bicep:558. It holds six keys and six severities, so the gate discovers six specs.
ADC's six ### sections are adc-prod-alert-failed-requests-v2 (sev 2, OPERATIONS.md:17),
adc-prod-alert-request-rejections-v2 (sev 3, OPERATIONS.md:33),
adc-prod-alert-server-response-time-v2 (sev 3, OPERATIONS.md:50),
adc-prod-alert-dependency-failures-v2 (sev 2, OPERATIONS.md:71),
adc-prod-alert-resilience-circuit-open-v2 (sev 2, OPERATIONS.md:91) and
adc-prod-alert-ai-scoring-token-ceiling-v2 (sev 3, OPERATIONS.md:139). The headings carry the
same -v2 suffix the provisioned rules use (main.bicep:562), and that suffix is itself
load-bearing: main.bicep:560-561 warns that -v2 is part of the rule's identity in Azure, so
renaming it would create a second rule beside the live one instead of updating it. The gate matches
on the -alert-<key> infix (ObservabilityConventionTestsBase.cs:32), so the suffix does not affect
the pairing either way.
The request-path specs are tuned so each rule pages on one kind of trouble. failed-requests
excludes 404 and 429 alongside 401 and 499 (main.bicep:458-466), because scanner probes and
rate-limiter answers are volume, not failure; that volume has its own sev 3 spec,
request-rejections, which pages above 50 rows answered 404 or 429 in 15 minutes, crawler probes
for /robots.txt and /sitemap.xml excluded (main.bicep:467-475). Its runbook reads the paths to
tell a scanner (nothing to fix) from a real route answering 404 after a deploy (a regression) or
429s on many distinct callers (real attendees being throttled), and notes that the conference-day
load test pages it by design (OPERATIONS.md:35-48). server-response-time and
dependency-failures both skip any window in which a Container Apps revision was created or took
traffic, so a deploy's cold starts and a rollout's own transient peer failures do not page
(main.bicep:449-452, :476-493), and dependency-failures also drops calls made inside an
operation whose request answered 499, because a caller that disconnected cancels its own downstream
calls (main.bicep:441-448).
Two of the six need a sentence each, because their remedy is not "fix the service". The
circuit-open alert fires on the first breaker opening, and the breaker closes itself once a probe
call succeeds, so the alert can auto-mitigate while the dependency is still sick: the runbook says
to treat it as "a dependency is down", not as "something needs restarting" (OPERATIONS.md:93-98),
and not to restart the reporting service, which would send full traffic back at the sick dependency
(OPERATIONS.md:119-120). The AI token ceiling sums the MMCA.Common.AI meter's input and output
tokens over a rolling two-day window against aiScoringTokenCeiling (2,000,000 by default,
main.bicep:108), and it is the only cost alert in the deployment (OPERATIONS.md:141-146). It is
the one spec with its own cadence, a P2D window evaluated every 12 hours (main.bicep:543-555),
which the loop allows because the three cadence fields are per-entry overridable
(main.bicep:584-593). It used to sit outside the gated block; it moved into sloAlertSpecs, so its
runbook moved up into the gated section with it (OPERATIONS.md:195-196).
[Rubric §31, Cost / FinOps] assesses whether cost is actively managed. Putting a token budget behind the same pairing gate as the availability SLOs means an AI spend alert cannot ship without a written answer for who reacts to it.
The operational alerts, and why their headings use four hashes
Eighteen further alerts are provisioned outside the gated window (OPERATIONS.md:182-194,
:1016-1020): the nine entries of scheduledQueryAlertSpecs (main.bicep:684), materialized by one
loop (main.bicep:744); seven standalone scheduled query rules, for the log-ingestion cap
(main.bicep:863), the auth-failure spike (main.bicep:946), the 403 burst (main.bicep:987),
key-ring access (main.bicep:1047), and three behind the opt-in enableSecuritySignalAlerts flag
(main.bicep:172, default false): failed SQL sign-ins (main.bicep:1092), Key Vault secret reads
(main.bicep:1151) and registry pushes (main.bicep:1191); and two metric alerts, the broker
dead-letter rule over the Service Bus namespace (main.bicep:799) and the Sev 1
gateway-availability rule (main.bicep:1270). The section preamble explains the heading depth, and
it is worth understanding rather than copying: the gate's heading regex
(ObservabilityConventionTestsBase.cs:197) matches only a line that starts with exactly three hashes
followed by whitespace, so a #### heading does not match it at all. That makes these sections
invisible to both directions of the gate. Promoting one to ### would break the build immediately,
because the reverse-direction fact would see a runbook section for an alert sloAlertSpecs does not
provision and call it an orphan. The bicep records the same reasoning from its side, and the reason
the security rules are standalone resources rather than loop entries: the loop pins severity 2, and
the 403 burst is severity 3 (main.bicep:896-900).
One reading rule spans the whole group (OPERATIONS.md:191-194, main.bicep:627-630): a log call
that passes an exception is exported to AppExceptions, never to AppTraces, so the dead-letter and
backplane rules read both tables, the native-push rule reads AppExceptions only, and a triage query
that names one table misses the other half.
adc-prod-alert-outbox-dead-letter(sev 2,OPERATIONS.md:198-248) fires on any row at Error or above matching the outbox's dead-letter line (main.bicep:682-690). The threshold is 0, meaning first hit rather than a rate, because every hit is an integration event permanently lost from a service's outbox. It reads both tables because the retries-exhausted line carries the last exception and the type-unresolvable variant does not (main.bicep:631-636). It is the loss alarm only: a slow or stuck outbox never dead-letters until its retries run out, sooutbox-backlog-agebelow fires on row age first. The triage warns against hand-editing an outbox row and says to allow up to five minutes, production's 300-second fallback poll (main.bicep:2472), before concluding a reset did not take (OPERATIONS.md:238-240).adc-prod-alert-broker-dead-letter(sev 2,OPERATIONS.md:249-359) is the consumer-side twin of the outbox dead-letter alert: the outbox delivered the event, but the consumer gave up on it. MMCA.Common's native transport gives every consuming host one queue that each of its topic subscriptions forwards into, and its receive pipeline (BrokerReceivePipeline.cs:26) retries a failing message in process (MessageBus:RetryLimit, default 5,MessageBusSettings.cs:94), then schedules redeliveries on the same queue (default 60 s, 600 s, 3600 s,MessageBusSettings.cs:190;BrokerReceivePipeline.cs:165-166), and only then dead-letters it into that queue's native dead-letter sub-queue (BrokerReceivePipeline.cs:170-176), so a handler fault surfaces roughly an hour after its first failed attempt (OPERATIONS.md:253-258,main.bicep:778-785). The rule is a namespace metric rather than a log query on purpose (main.bicep:787-795):DeadletteredMessagessplit byEntityNamecounts what is sitting in each dead-letter sub-queue, so it also catches the poison-body and unknown-event dead letters that log only at Warning and the broker's max-delivery-count dead letters that log nothing. It is filtered to the three host queues (Notification consumes nothing, so it has none), and it resolves once an operator has replayed or discarded the message. Without it a delivered-but-never-applied event would leave no signal at all, because the outbox side reports success.adc-prod-alert-sql-dependency-failures(sev 2,OPERATIONS.md:360-385), threshold 10 failed SQL dependency calls over 15 minutes (main.bicep:691-696). Its value over the general dependency-failures SLO is attribution: every service owns exactly one database, so a burst names a service and a database instead of "some dependency" (main.bicep:637-640). The runbook's closing step is the one that saves an incident: do not restart the service, because production setsDatabaseInitStrategy=Migrateand each service is the sole migrator of its own database (main.bicep:1421-1428), so a restart re-runs startup migrations against the same unreachable server and turns a read outage into a failed revision.adc-prod-alert-revision-activation-failed(sev 2,OPERATIONS.md:386-415) fires on the firstContainerAppSystemLogs_CLrow whoseReason_sstarts with "Deployment Progress Deadline Exceeded" (main.bicep:697-702), the platform's report that a revision's readiness probe never went green. It exists because that failure mode is silent from outside: the platform keeps the previous revision serving, so the Gateway availability probe stays green while production runs older code, which is how the 2026-08-29 Redis readiness regression ran unnoticed (main.bicep:641-646). Its deploy-side twin is the activation gate indeploy.yml:2110, described in the CI/CD chapter.adc-prod-alert-signalr-backplane-errors(sev 2,OPERATIONS.md:416-445) fires on any Warning-or-above line whose logger category starts withMicrosoft.AspNetCore.SignalR.StackExchangeRedis, threshold 0 (main.bicep:703-708). It exists because a backplane failure is silent by design. When the backplane loses Redis, each Notification replica keeps serving its own connections, so a push issued on one replica silently stops reaching clients held by the other, and readiness stays green on purpose, because making Redis a readiness dependency would take the whole hub down during a blip (main.bicep:647-656).adc-prod-alert-outbox-backlog-age(sev 2,OPERATIONS.md:446-466) reads MMCA.Common'soutbox.oldest_pending.agegauge fromAppMetricsand fires on any sample above 900 seconds (main.bicep:709-714). It exists because the dead-letter rule cannot see a slow or stuck outbox: delivery normally takes seconds and the 300-second fallback poll bounds an idle source, so a 15-minute-old row means the broker is refusing publishes or the drain cannot keep up, and neither dead-letters until every retry is spent. Its blind spot is written down rather than hidden: the gauge is sampled at the start of each processing cycle, so a processor that stops cycling freezes it, and a dead host is left to the availability and SQL rules (main.bicep:659-665).adc-prod-alert-outbox-broker-circuit-open(sev 2,OPERATIONS.md:467-486) fires on the first opening counted onbroker.circuit.open.count(main.bicep:715-720). The outbox publishes to Service Bus through its own broker circuit breaker, built without Polly telemetry, so theresilience-circuit-openSLO rule cannot see it (main.bicep:666-669). Read it as the cause and backlog age as the effect: an opening means publishes are failing fast and every service's outbox is backing up behind it.adc-prod-alert-live-broadcast-dropped(sev 2,OPERATIONS.md:487-504) fires on any Warning-or-aboveAppTracesline containing "Live channel broadcast dropped under backpressure" (main.bicep:721-726). Engagement'sLiveChannelPublishQueuedrops a live broadcast (poll results, question updates) under backpressure, and every request still succeeds while attendees see a stale live view, so the drop line is the only signal (main.bicep:670-672).adc-prod-alert-native-push-failed(sev 2,OPERATIONS.md:505-523) fires on the firstAppExceptionsrow at Warning or above whose template text has "native (OS-level) delivery failed" (main.bicep:727-732). MMCA.Common's push send handler delivers on three legs, the in-app inbox, SignalR and the native OS notification through Azure Notification Hubs, and logs that line with the send exception when the native leg fails (OPERATIONS.md:507-509). The sender attempts every chunk on both platforms before rethrowing, so one hit means some recipients missed the OS notification (main.bicep:673-676). It exists because the other two legs still deliver, so nothing else in the deployment fails when only the OS notification is lost.adc-prod-alert-internal-command-backlog-age(sev 2,OPERATIONS.md:524-542) is the internal-command twin ofoutbox-backlog-age: it reads MMCA.Common'sinternal_commands.oldest_due.agegauge and fires on any sample above 900 seconds (main.bicep:733-738). Production polls every 60 seconds, so a due row 15 minutes late means the processor is wedged or a handler keeps failing short of its last attempt (main.bicep:677-680).adc-prod-alert-log-ingestion-cap-reached(sev 2,OPERATIONS.md:543-579) is the alert that keeps the rest honest. The workspace carries a daily ingestion cap (dailyQuotaGbininfra/foundation.bicep), and when the cap is reached Log Analytics stops ingesting for the rest of the UTC day, so every other log-based alert silently evaluates empty data. The template records why that is a security concern and not just an outage: tripping the cap is a viable first move for an attacker (drive an error loop, then act unobserved) (main.bicep:843-848). The rule queries_LogOperationbecause that table is cap-exempt and keeps recording after ingestion stops (main.bicep:850-853), and it uses a 1-hour window against a 15-minute cadence so ingestion-latency skew cannot drop the once-written cap record between two buckets (main.bicep:855-857,:870-871). It also matchesApproachingQuota, not onlyOverQuota, so it pages early enough to raise the cap or stop the source before ingestion goes dark (main.bicep:858-859,:876).adc-prod-alert-auth-failure-spike(sev 2,OPERATIONS.md:580-639) pages above 25 real failed sign-in events in 15 minutes (main.bicep:963). It exists becausefailed-requestsdeliberately excludes 401 (and 429, whichrequest-rejectionscounts as volume), so credential stuffing against the login route produced only filtered-out responses and paged nobody (main.bicep:902-906,OPERATIONS.md:582-586). The value is the sum of two parts (main.bicep:929-935): failed password sign-ins from themmca.auth.signincounter with outcomeinvalid_credentialsorlocked_out(ADR-029 lockout), counted once at Identity; and every other 401 or 429 on an/Authroute (refresh-token replay, registration throttling, the sign-in link and token endpoints), weighted byItemCountand halved because each request is recorded at both the Gateway and the service hop. Both halves exist because of sampling (main.bicep:916-927): every host keeps 25% of traces, so anAppRequestsrow can stand for several requests, and counting rows meant the old 50-row threshold needed about 100 real failures rather than the 25 it was meant to represent. A counter is never sampled, andItemCountrestores the weight of a sampled row; the comment names the KQL to re-check that weight after any release touching telemetry. The Gateway's ownauth-tight429s on/Auth/loginnever reach Identity, so a single-IP flood there is the request-rejections rule's to page, and this rule is for the distributed low-and-slow campaign whose failures each reach Identity (main.bicep:936-941). The overlap withrequest-rejectionson a lockout storm is accepted; the two runbooks read it differently (main.bicep:908-910).adc-prod-alert-forbidden-burst(sev 3,OPERATIONS.md:640-662) pages above 20ItemCount-weighted 403 rows in 15 minutes, which, still double-counted across the two hops, is roughly 10 real denials (main.bicep:977-983,:1004). A 403 means the caller authenticated and was then denied by permission policy, which is close to zero in normal operation because the UI does not offer actions a user lacks the permission for. Sev 3 because the two causes, a replayed token probing resources it does not own or a permission regression from the last deploy, are neither of them a middle-of-the-night page. Both security rules keep aPT15Mwindow, well inside theP2Dcap, because a longer value compiles but fails the whole deployment at apply time, after the container apps have already moved (main.bicep:912-914).adc-prod-alert-key-ring-access(sev 2,OPERATIONS.md:663-692) watchesdataprotection-keys/keys.xml, the Data Protection key ring behind every session cookie and antiforgery token: whoever reads it can mint a valid session for any user, organizers included (OPERATIONS.md:665-667). It reads the blob audit stream the storage account already sends toStorageBlobLogsand fires on any successful request on that container by a principal other than the identity and UI apps' identities, or authorized with the account key or a SAS (main.bicep:1018-1029,:1043-1054). Anonymous and failed requests are left out as scanner noise,TrustedAccessis left out because it is the storage resource provider acting for every template deployment, andStatusCodeis cast withtoint()because it is a string column and comparing it with a number fails the whole deployment at apply time (main.bicep:1031-1036). It adds no data source, so no ingestion cost. The comment also records what it deliberately does not watch yet: audit-trail DELETEs cannot be told apart from the daily retention purge while the services connect as the SQL administrator (main.bicep:1038-1042).adc-prod-alert-sql-auth-failures(sev 2,OPERATIONS.md:694-719) pages above 10 failed SQL sign-ins on the ADC SQL server in 15 minutes, read from the server audit: password guessing against the administrator login, or an app still holding a rotated credential (main.bicep:1087-1093). It is the one operational alert that is off by default:enableSecuritySignalAlertsdefaults tofalse(main.bicep:172), so a deploy that sets nothing adds no resource and no evaluation cost. The switch is theENABLE_SECURITY_SIGNAL_ALERTSrepository variable, flipped only after the rule's query has run once in Logs, because a scheduled-query rule whose query does not resolve fails the whole deployment at apply time (main.bicep:171). The deploy step is that opt-in: it writes the parameter only when the variable is the literaltrue(deploy.yml:2034-2041). Two prose sources now describe the opposite default, the rule's own comment ("deploy.yml turns it on",main.bicep:1077) and the runbook ("passes it on unlessENABLE_SECURITY_SIGNAL_ALERTSis the literalfalse",OPERATIONS.md:698); the workflow is the executable truth, so read the alert as off until the variable is set.adc-prod-alert-gateway-availability(sev 1,main.bicep:1166,OPERATIONS.md:720-743) is driven by the standard web test that pings the public Gateway/healthfrom three Azure locations every 900 seconds (main.bicep:1145) with a 2-of-3 failed-location threshold (main.bicep:1187). It is the only outside-in signal in the deployment, which is exactly why it is Sev 1: every other alert is reported by the app and therefore goes quiet when the app is down (OPERATIONS.md:722-723). The triage carries two facts a first responder will otherwise get wrong:/healthis the Gateway's full health aggregate, with onedownstream-{name}check per service taggedoptional, so a healthy Gateway can still fail the probe because a backend is unhealthy (OPERATIONS.md:734-737); and Identity, Conference and Engagement serve HTTP/2 cleartext only, so probing them without--http2-prior-knowledgereports a failure that is not there (OPERATIONS.md:720-743). Theoptionaltag is why the alert and the Gateway's own health can disagree: those checks sit outside/health/ready, and the Gateway's readiness probe is/alive, which makes no downstream request at all. One failed backend therefore pages through this alert without marking the only Gateway replica unready, which would take the whole site down, healthy routes included; and a 30-second probe that fanned out to every service would keep idle service replicas off the Container Apps idle rate.
The probe cadence in that section matches the template. OPERATIONS.md:724 describes the
synthetic probe as a 15-minute frequency evaluated over a 15-minute window. The web test is declared
with Frequency: 900 (main.bicep:1145), so each location probes every 15 minutes, and the alert's
window is PT15M to match (main.bicep:1180-1181). The template explains the window separately
from the cadence, and the window is correctness, not cost: at Frequency: 900 a PT5M window would
usually be empty, so the rule would evaluate nothing at all, while PT15M holds exactly one result
per location per window, which is what failedLocationCount counts (main.bicep:1178). With three
locations and the 2-of-3 threshold, detection latency is about 15 minutes.
[Rubric §31, Cost / FinOps] assesses whether cost is actively managed. The cadence changes on the SLO
rules (dated 2026-09-02 at main.bicep:578-582) and on the web test (the comment above main.bicep:1145) are cost
decisions taken with the billing model written down beside them, and neither moved a threshold or a
location. That is the distinction that keeps a cost change from quietly becoming an alerting change.
[Rubric §11, Security] assesses whether attacks on the system are detected, not only prevented. The auth-failure spike and the 403 burst watch the same request traffic the SLO rules filter out, from the attacker's side, so excluding 401 and 403 from the availability signal never means nobody is looking at them; the key-ring rule watches the one storage read that would let an attacker forge a session without touching the request path at all.
The one gap the gate cannot see
The pairing gate covers the six SLO specs, not the alert surface as a whole, and the governance note
says so: the eighteen operational alerts sit outside sloAlertSpecs by design (ADR-062) and are "on
the honour system: keep them in step by hand" (OPERATIONS.md:1013-1020). All eighteen carry triage
(OPERATIONS.md:1020), and the preamble that names them counts the same eighteen
(OPERATIONS.md:182-194). That agreement is kept by hand: nothing fails the build when the prose and
the bicep disagree, and nothing would fail it if a nineteenth alert were added without a section. Count from
the bicep, not the prose: nine scheduledQueryAlertSpecs entries (main.bicep:684), seven
standalone scheduled-query rules (main.bicep:863, :946, :987, :1047, :1092, :1151,
:1191, the last three off by default) and two metric alerts (main.bicep:799, :1270).
Conference day
OPERATIONS.md:746-827 turns the conference-day surge from a set of az commands into one switch.
The surge is declared in main.bicep as conferenceMode (main.bicep:190, default false) and
driven by ONE repository variable, CONFERENCE_MODE_UNTIL (yyyy-MM-dd, UTC)
(OPERATIONS.md:748-751). The deploy reads it on every run: it rejects a malformed value
(deploy.yml:2066-2069) and turns the mode on while today's UTC date is not past the variable
(deploy.yml:2071-2072), so the first deploy after the date reverts the surge with no one
remembering to. The runbook forbids scaling by hand with az, because cost-guard.yml treats an
out-of-band surge as drift and blocks deploys (OPERATIONS.md:751); cost-guard is a deploy
prerequisite (deploy.yml:1204, :1655). As the deploy gate it is called with
deploy_gate: true, under which a surge left over from an expired window does not block, because
this deploy is the one that reverts it (deploy.yml:1216).
What the mode changes, sized by the 2026-10-02 capacity review for about 400 concurrent attendees
against a 2026 peak of about 67 (OPERATIONS.md:752-766):
- Per-client-IP limits, because a whole venue Wi-Fi is one NAT address: the gateway edge window,
the gateway
auth-tightpolicy, Identity'sauth-iplimit, registrations per IP per hour and the UI host window all rise by an order of magnitude or more (OPERATIONS.md:755-759). Identity'sauth-ipgoes from 30 to 1200 a minute rather than to 300 because it is one Redis window per IP shared by every Identity replica, so 1200 keeps the capacity four replicas had at 300 each (OPERATIONS.md:757-758,main.bicep:2630-2634,:2640). The template adds one more per-IP limit the runbook table does not list: Engagement's ticket-claim budget per client IP goes to 500 for the day, set only in conference mode, while the per-account budget still applies (main.bicep:2966-2970). The default it replaces is not in the template (the comment quotes 10 per window); Not determinable from source here: the code-side default, which lives in the Engagement module rather than ininfra/. - Compute: Identity at 1 vCPU / 2 GiB, because every sign-in is a 600,000-iteration
PBKDF2-SHA512 hash and the 2026-10-03 rehearsal saturated four 0.5 vCPU replicas at about five
sign-ins a second; the other attendee-facing apps at 0.5 vCPU / 1 GiB, all five scaling to four
replicas, with the gateway and UI keeping two always on. Identity, Conference and Engagement keep a
minimum of 1 because each is the sole startup migrator and seeder of its database
(
OPERATIONS.md:760-765). - Databases:
ADC_ConferenceandADC_Engagementmove online from Basic (5 DTU) to S2 (50 DTU) (OPERATIONS.md:766), through theconferenceModebranch of the per-service database SKU (main.bicep:1445-1447).
One change since that review matters on the day (OPERATIONS.md:768-774): since MMCA.Common v1.313.0
the gateway counts the calls the server-rendered UI host makes for a visitor in that visitor's own
per-IP window (GatewayRateLimiting:TrustedCallerMode, default PerVisitor), so venue traffic that
reaches the gateway through the UI host draws on the same NAT window as direct calls. The k6
rehearsal calls the gateway directly and cannot exercise that path, so the runbook adds a manual
check at the rehearsal's peak (two or three browsers on one network, then a KQL count of gateway 429s
by client address) and a day-of fallback, GatewayRateLimiting__TrustedCallerMode=Exempt set on the
gateway with az, which the next deploy removes again because main.bicep does not declare it
(OPERATIONS.md:793-821).
The steps (OPERATIONS.md:778-827): set the variable about a week before and run the deploy; run
the dress rehearsal, conference-day-load-test.yml (manual only, a workflow_dispatch whose mode
input is attendees or seed, conference-day-load-test.yml:19-26, and it writes to production
under the production environment, :54-55), first in mode=seed to register 400 synthetic
accounts on the reserved loadtest.adc.invalid domain (no confirmation email, never broadcast
recipients), then in mode=attendees, which must pass including signed_in > 99%; and after the
conference, deploy once more to revert and delete the variable. Until that reverting deploy runs, the
scheduled cost-guard.yml fails as the reminder, and it runs daily at 07:00 UTC
(cost-guard.yml:13-14), so an expired window or an out-of-band scale-up is reported within a day
(OPERATIONS.md:824-827). The rehearsal with the mode OFF is expected to fail on 429s; that is the
baseline it proves.
[Rubric §31, Cost / FinOps] assesses whether capacity tracks need. A date-bounded switch makes the expensive footprint expire by construction instead of by memory, and the scheduled cost guard catches the one case the date cannot. [Rubric §29, Resilience & Business Continuity] is served by the same switch: it is what keeps a second front-door replica alive during the one week a replica loss would matter.
Recovery moves
OPERATIONS.md:829-855 is the fast reference: roll a bad revision back with az containerapp revision list and revision copy, follow DISASTER-RECOVERY.md for a database restore, re-run the
referenced workflow when a freshness gate blocks a deploy, and revert a surge. Its database-restore
entry quotes the measured restore time as it is, 2 to 4 minutes through 2026-09 and 25 to 59 minutes
since, both inside the 2 h RTO (OPERATIONS.md:833-835). Its freshness quick-reference
(OPERATIONS.md:836-839) names three windows, and each one matches the step that enforces it:
dr-freshness 8 days (deploy.yml:1285), load-freshness 35 days (deploy.yml:1305),
cross-service-freshness 5 days (deploy.yml:1330). Those numbers live in two places, so treat the
workflow as the source of truth and re-check the runbook line whenever a window moves: deploy.yml
enforces a fourth window the quick reference does not name, cross-browser-freshness at 10 days
(deploy.yml:1369), which is the drift this pairing produces whenever a gate is added and the prose
is updated separately. The quick reference also says only "re-run the referenced workflow"; for
dr-freshness that means a drill of the database whose job failed, because the gate's failure key
is per database (see the drill section above).
The two surge entries are worth reading as a pair. The routine revert is the conference-day step:
deploy once CONFERENCE_MODE_UNTIL has passed, then delete the variable (OPERATIONS.md:841-842).
The other is a deadlock breaker (OPERATIONS.md:843-851): if someone surged by hand with az and
the variable is unset, cost-guard blocks every deploy and a plain re-run cannot clear it, because
the deploy job needs cost-guard to pass. The way out is to set the variable to yesterday, because
an expired window is the one state in which the gate lets a surged footprint through, and the deploy
it allows applies main.bicep at baseline; then delete the variable and re-run cost-guard.yml to
confirm.
The last entry answers the first instinct of anyone used to VMs (OPERATIONS.md:852-855): the
runbook names the runtime images as aspnet:10.0-noble-chiseled-extra, with no shell, package
manager, curl or dotnet-dump inside a running replica, so az containerapp exec has nothing to
run and diagnosis goes through App Insights and the console log stream instead.
Credential compromise and signing-key rotation
Two procedures sit between the recovery moves and the governance note, and they answer different
questions. Credential compromise and rotation (OPERATIONS.md:857-900) is for a secret that may
have left its owner, or a security alert (key-ring-access, auth-failure-spike,
sql-auth-failures) that points at one: contain, rotate, revoke sessions, check what was done with
it, record it. Containment comes first and targets principals rather than values: delete the deploy
identity's github-env-production federated credential (the deploy stops until azure-setup.sh
recreates it), or remove the role assignments of a suspect app identity, read and deleted with
az rest because az role assignment list can misreport on this tenant (OPERATIONS.md:864-870).
The rotation table names every secret class, where it lives and how to rotate it, each one a
redeploy or a single CLI call (OPERATIONS.md:876-890). Its RS256 row is the one to read twice: a
leaked private key is a hard cut with no overlap, because every token signed with it, a forged one
included, must stop validating (OPERATIONS.md:878). The deploy identity's three AZURE_* secrets
are identifiers, not credentials, so there is nothing to rotate there, only a principal to contain
(OPERATIONS.md:890).
JWKS signing-key rotation (OPERATIONS.md:903-936) is the planned change with no leak, and it
keeps live tokens valid: generate the new pair offline at 3072 bits, switch signing to it and keep
the outgoing public key published in the same deploy, then retire the old key after the 7-day
refresh-token lifetime, checking the published kid values with curl at each step
(OPERATIONS.md:913-936). The overlap is now driven entirely through the pipeline rather than by
hand-editing environment variables. The operator puts the outgoing public PEM in the repository
secret JWT_RSA_PREVIOUS_PUBLIC_KEY_PEM and makes sure the jwksKeyId default names a kid not used
before (OPERATIONS.md:916-919, main.bicep:70). The deploy passes that secret on as
rsaPreviousPublicKeyPem only when it is set (deploy.yml:1731, :1875-1878). The template
stores it in the rsa-previous-public-key-pem vault secret, which is written as unused when the
parameter is empty so the vault shape and the per-secret grant in bootstrap-identities.ps1 always
have a target (main.bicep:2333-2341, scripts/security/bootstrap-identities.ps1:86). While it is
set, Identity publishes and accepts the key under the outgoing kid (previousJwksKeyId,
main.bicep:201) through Jwks__AdditionalKeys__0__*, and its RSA key-size floor drops from the
3072-bit library default to 2048 so the pre-rotation 2048-bit key still loads
(main.bicep:2592-2604). Step 3 is just deleting the secret and deploying again: the additional
key and the floor override leave with it (OPERATIONS.md:929-933). A malformed PEM or a repeated
kid fails Identity at startup, so the smoke gate catches it before traffic moves
(OPERATIONS.md:924-925). Separating the leak path from the planned path is what keeps a routine
rotation from signing every user out while making sure a real leak does. MMCA.Store carries the same
pair of procedures (MMCA.Store/infra/OPERATIONS.md:548, :585).
Security audit log archive (OPERATIONS.md:938-952) answers a forensic gap: the workspace keeps
30 days of interactive retention, too short to scope a slow-burn compromise noticed weeks later
(main.bicep:2236-2238). enableSecurityLogArchive raises the listed audit tables to 365 days of
total retention, leaving the interactive window alone and putting days 31 to 365 in the cheaper
archive tier (main.bicep:2238-2241, :2253-2261). The list holds only StorageBlobLogs, the
avatar and key-ring account's reads, writes and deletes (main.bicep:2250-2252). Azure refused the
same update on the classic tables that carry the other audit streams (AzureDiagnostics, the two
Container Apps log tables) on 2026-12-04, and one refused table fails the whole deployment, so
adding them back needs a table migration first, recorded as a separate decision
(main.bicep:2245-2249, OPERATIONS.md:945-952). That failure mode is also why the switch is
opt-in twice: the parameter defaults to false (main.bicep:175) and the deploy writes it only
when the ENABLE_SECURITY_LOG_ARCHIVE repository variable is the literal true
(deploy.yml:2043-2049). [Rubric §30, Compliance/Privacy] assesses whether retention and audit
obligations are met by design; here a year of storage-access audit is kept at archive-tier cost
without lengthening the interactive window that holds personal data in other tables.
[Rubric §31, Cost/FinOps] assesses whether spend is a deliberate choice; the archive tier is
billed per GB stored, far below interactive retention, and ingestion is unchanged
(main.bicep:2240-2241).
Why there is no Aspire dashboard in production
OPERATIONS.md:973-1004 closes the file by answering the question every new operator asks. The
absence is a decision (ADR-098), not an omission, and it rests on three facts.
The production telemetry stream is deliberately thinned, so a full-fidelity dashboard would have
nothing extra to show: main.bicep sets Telemetry__TracesSampleRatio=0.25 (main.bicep:322-329),
an OpenTelemetry log floor of Warning so Information still reaches container stdout without billing
against the workspace (Serilog is the only console writer, so each line reaches
ContainerAppConsoleLogs_CL once, main.bicep:331-334), Telemetry__DisableHttpClientMetrics and Telemetry__DisableRuntimeMetrics
(main.bicep:360-367; together about 65% of AppMetrics ingestion when measured, main.bicep:354-355),
and OTEL_METRIC_EXPORT_INTERVAL=300000 against a 60-second default (main.bicep:388-398). The
runbook's own pointer, infra/main.bicep:240-280 (OPERATIONS.md:979-980), predates later template
growth; the settings now sit at main.bicep:322-398. The dashboard's value is live, unsampled,
per-request detail, which is exactly the data production does not carry.
The durable operational surface is the workspace, not a dashboard (OPERATIONS.md:989): the alert
rules and their action group, the SLO workbook, and KQL over ContainerAppConsoleLogs_CL,
AppRequests and AppDependencies all survive a revision restart and stay queryable weeks later.
And the ACA dashboard component is ephemeral and full-fidelity, which is the wrong pair for
production (OPERATIONS.md:995): it holds its data in the running container's memory, so a restart
discards it, while ingesting at exactly the fidelity the settings above were tuned to avoid.
[Rubric §31, Cost / FinOps] meets §13 here: the observability posture is shaped by ingestion cost, and the runbook records that trade-off where an operator will actually hit it rather than leaving it implicit in the bicep.
infra/SQL-MANAGED-IDENTITY.md, staged passwordless-SQL runbook
File: MMCA.ADC/infra/SQL-MANAGED-IDENTITY.md (336 lines)
What it is. The runbook for moving the four service apps from SQL-login (password) auth to Entra managed-identity auth against their per-service databases, the further identity-hardening stages that build on it (one identity per app, Entra-only SQL sign-in, keyless Redis and Service Bus, Shared Key off on the key-ring storage account), and the written acceptance of the SQL data plane staying on public network access with no VNet.
When to run. Only when deliberately advancing that hardening. Nothing here is on the normal
deploy path: the three SQL knobs are default-safe, so a deploy with the defaults changes nothing
(SQL-MANAGED-IDENTITY.md:7-9, the knob table at SQL-MANAGED-IDENTITY.md:30-36).
[Rubric §11, Security] assesses credential hardening. All three stages have been run in ADC
production. The template default is still false (main.bicep:36), because that is what makes a
fresh environment start on password auth and each stage independently deployable, but the deployed
value comes from a repository variable, not the default: deploy.yml:1757 reads
vars.USE_MANAGED_IDENTITY_SQL and deploy.yml:1983-1987 rewrites the parameter to a literal JSON
true when it is set. All three variables are set in ivanball/ADC (USE_MANAGED_IDENTITY_SQL,
SQL_AAD_ADMIN_LOGIN and SQL_AAD_ADMIN_OID, all dated 2026-06-28), so the deployed apps use
passwordless Active Directory Managed Identity connection strings. The ADC scorecard records the
same activation on that date, with all four services healthy and mapped db_owner in every
per-service database, which is what lifted §17 DevOps Implementation from 8 to 9.
OPERATIONS.md:77-78 is therefore correct when it tells an on-call engineer that production runs
passwordless SQL.
Note for a reader trying to verify this: the live value is repository configuration, not source, so
it cannot be confirmed from the tree. Reading main.bicep:36 alone gives the opposite impression.
ADR-061 records the staging
mechanism and describes the flag as not yet flipped, which was true when it was written.
Why staged, and the three stages
The migration is staged because managed-identity auth needs a database user mapped to the identity
(CREATE USER ... FROM EXTERNAL PROVIDER), which is data-plane T-SQL that must run as an Entra
admin. The deploy principal holds Contributor, not SQL AAD-admin, so it cannot perform that grant.
Flipping the connection strings before the grants exist takes every app offline
(SQL-MANAGED-IDENTITY.md:11-18). Password auth keeps working through all three stages, because
they do not set azureADOnlyAuthentication (SQL-MANAGED-IDENTITY.md:38), so each stage is
independently deployable and reversible. Turning password sign-in off is a separate, later stage
with its own parameter, sqlEntraOnlyAuthentication (main.bicep:42), which sets
azureADOnlyAuthentication: true through a conditional resource (main.bicep:1315-1319); see "The
stages after passwordless SQL" below.
- Stage 1, add the Entra admin (
SQL-MANAGED-IDENTITY.md:56-61). Set theSQL_AAD_ADMIN_LOGINandSQL_AAD_ADMIN_OIDrepository variables;deploy.yml:1975-1981folds them into the bicep parameter file, andmain.bicep:1299provisions the AAD admin only when the object id is non-empty. Additive, zero app impact. - Stage 2, grant the identity in each database (
SQL-MANAGED-IDENTITY.md:62-75). Connect to each of the fourADC_*databases as the Entra admin and runCREATE USER [adc-prod-apps-identity] FROM EXTERNAL PROVIDERplusALTER ROLE db_owner ADD MEMBER.db_ownerbecause each service is its own sole migrator and applies DDL at startup (the same stage names the tighter alternative). - Stage 3, flip the apps (
SQL-MANAGED-IDENTITY.md:76-82). SetUSE_MANAGED_IDENTITY_SQL=trueand deploy;main.bicep:262-267swaps the auth segment of every connection string toAuthentication=Active Directory Managed Identitywith the UAMI's client id and no password. No app-code or package change is needed:Microsoft.Data.SqlClienthonours the keyword andAzure.Identityis already present transitively.
Rollback is unsetting the variable and redeploying (SQL-MANAGED-IDENTITY.md:83-85): the
password path stays in place through these three stages, and the per-database users are inert when
unused.
Accepted risk (SQL-MANAGED-IDENTITY.md:317-336). The SQL server keeps publicNetworkAccess: Enabled and the AllowAzureServices rule, because there is no VNet and moving to a private endpoint
would require recreating the Container Apps environment (and therefore every container app). The
compensating controls are a TLS 1.2 minimum (main.bicep:1277), Key Vault secrets reached through
the managed identity, and, with stages 1 to 3 complete, no shared SQL password in the data path at
all, so network reachability no longer implies credential exposure.
The stages after passwordless SQL
The file continues past the three-stage migration with four further hardening sections, each one a repository variable, a bicep parameter and a default-off rollback:
- One identity per app (AI-1) (
SQL-MANAGED-IDENTITY.md:87).USE_PER_APP_IDENTITIESdrivesusePerAppIdentities(main.bicep:39, defaultfalse), so each app runs as its own identity instead of the sharedadc-prod-apps-identity. The checklist runsscripts/security/bootstrap-identities.ps1with-WhatIffirst, then for real, then creates the per-database users, verifies them and flips the variable (SQL-MANAGED-IDENTITY.md:116-162). - Entra-only sign-in (AI-2) (
SQL-MANAGED-IDENTITY.md:176).SQL_ENTRA_ONLY_AUTHdrivessqlEntraOnlyAuthentication(main.bicep:42), which setsazureADOnlyAuthenticationon the server (main.bicep:1315-1319), so password sign-in stops working. The section lists the checks that make the flip safe (SQL-MANAGED-IDENTITY.md:191-193). - Redis and Service Bus: identity sign-in, then keys off (AI-3) (
SQL-MANAGED-IDENTITY.md:222). Four variables: two sign the services in to Redis and Service Bus with their identities, and two switch the Redis access keys and the Service Bus SAS off (SQL-MANAGED-IDENTITY.md:231-234). - Key-ring storage: Shared Key off (AI-4) (
SQL-MANAGED-IDENTITY.md:271).STORAGE_ALLOW_SHARED_KEY_ACCESSdrivesstorageAllowSharedKeyAccess, which defaults tofalse, so the variable exists only to turn the account key back on for a restore that needs it (SQL-MANAGED-IDENTITY.md:283,main.bicep:166).
The AtlDevCon archive, recorded in the DR runbook
Where it lives: MMCA.ADC/infra/DISASTER-RECOVERY.md:25-37 and the comment block at
MMCA.ADC/infra/main.bicep:1408-1417. There is no separate post-cutover runbook: once the archive
was gone, the step-by-step downgrade, export and drop record was retired, its final state lives in
the DR runbook, and git history keeps the full text (DISASTER-RECOVERY.md:30-32).
What it records. The legacy AtlDevCon database was exported to a bacpac and dropped on
2026-09-02, and the bacpac was deleted permanently on 2026-10-03 by the owner's decision, as personal
data with no remaining purpose; blob soft delete and versioning were off, so no copy remains, and the
empty sql-archive container stays (DISASTER-RECOVERY.md:25-29). Its data had been copied into the
live ADC_* databases at cutover, so no pre-cutover rollback copy exists and none is needed
(DISASTER-RECOVERY.md:30-31). The template adds the ordering that made the drop safe: the resource
declaration left the template first, Incremental mode left the database in place, and the operator
dropped it by hand afterwards (main.bicep:1411-1413).
When to consult. When someone asks for the pre-cutover data (the answer is that it exists only in the live databases), when you are rebuilding after a disaster and want to know why there is no archive, or when you meet a "NEVER delete" instruction in an older copy of a document and need to know it was retired deliberately.
[Rubric §31, Cost/FinOps] assesses whether cost is actively managed and right-sized. The archive was
retired on a measurement rather than a guess: 32 MB of data and 0 DTU for the whole summer while
still billing as a Basic database (main.bicep:1409-1411).
[Rubric §8, Data Architecture] assesses data lifecycle and migration hygiene. Retiring the data
estate's last legacy member happened in recorded steps, and the later deletion of the export is
recorded with its date, its reason and its consequence rather than performed silently
(DISASTER-RECOVERY.md:25-32).
[Rubric §30, Compliance & Privacy] assesses whether personal data is kept only as long as it has a
purpose. The archive was deleted as personal data with no remaining purpose, by the owner's
decision, and the runbook states plainly that no copy remains (DISASTER-RECOVERY.md:27-29).
Writing down that the deletion is irreversible is what makes it auditable.
"Not ours": the atldevcon SQL server (DISASTER-RECOVERY.md:33-37, main.bicep:1415-1417). A
SQL server named atldevcon in westus2 lives in the same shared resource group. It predates MMCA,
belongs to something else, and has never hosted an ADC database. In a shared resource group, a name
collision like this is a real operational hazard, and writing it down is the mitigation.
play-store-capture.ps1, Android screenshot capture
File: MMCA.ADC/scripts/play-store-capture.ps1 (147 lines)
What it is. A PowerShell 7 script (play-store-capture.ps1:1) that captures a screenshot from an
attached Android device or emulator via adb screencap and saves it as a deterministic-filename PNG
under store-assets/play-store/raw/.
When to run. When preparing or refreshing Google Play Store screenshots. Run once per slot (for
example 01-home, 02-sessions) on a device or emulator that is showing the correct screen. Eight
slots are defined in the companion compose script's lineup.
[Rubric §30, Compliance/Privacy] assesses whether the app store presence is maintained. These scripts
are the mechanism for maintaining Play Store assets; without them the screenshots drift from the
current UI. The raw/ directory is gitignored because a capture can contain the signed-in test
user's data; only the composed screenshots/ set is committed
(store-assets/play-store/README.md:19-20).
Walkthrough
Slug-based filenames (play-store-capture.ps1:47-51, written at :106). Raw captures are saved
as <slug>.png under store-assets/play-store/raw/, with the directory created on first use
(play-store-capture.ps1:48-49). Deterministic names mean the compose script can look them up by
slug key without a manifest file.
-List switch (play-store-capture.ps1:53-65). Lists the slots already captured, with file size
and timestamp: a quick sanity check before a composing session.
adb resolution (play-store-capture.ps1:67-75). Prefers adb on PATH, then falls back to the
well-known SDK path (C:\Program Files (x86)\Android\android-sdk\platform-tools\adb.exe), and throws
an actionable error when neither exists (play-store-capture.ps1:73-74).
exec-out not shell screencap (play-store-capture.ps1:104-110). Uses adb exec-out to stream
the PNG binary straight into the output file. Plain adb shell screencap on Windows applies CRLF
translation to the binary stream, corrupting the PNG. This is the kind of platform detail that is
invisible until every capture is subtly broken, which is why the comment sits directly above the
call. A capture smaller than 1024 bytes is deleted and reported as an error rather than kept
(play-store-capture.ps1:121-125), because at that size the device was asleep or locked.
Dimension read from IHDR (play-store-capture.ps1:127-147). Reads the PNG IHDR chunk (bytes
16-19 width, 20-23 height, big-endian, play-store-capture.ps1:127-128) to print the captured
resolution. A landscape capture (width greater than height) emits a warning, because Play Store phone
screenshots must be portrait.
play-store-compose.ps1, Play Store screenshot compositor
File: MMCA.ADC/scripts/play-store-compose.ps1 (187 lines)
What it is. A PowerShell 7 script that reads raw captures from store-assets/play-store/raw/,
wraps each into a 1080x1920 branded canvas (play-store-compose.ps1:67-68), overlays a caption and
subtitle from a hard-coded lineup, and writes the finished PNG to
store-assets/play-store/screenshots/. The composed images satisfy Play Console's aspect-ratio
requirement: Pixel emulators capture at 1080x2400 (9:20), which Play Console rejects as too tall, and
the script guarantees a compliant 1080x1920 (9:16) result (play-store-compose.ps1:11-13).
When to run. After play-store-capture.ps1 has captured all needed slots. Run with no -Slug to
compose the full set, or -Slug <slug> to recompose one slot (the filter, and its clear error when
no raw capture matches, is at play-store-compose.ps1:82-85). Run with -NoCaption for a plain
brand-framed variant (a feature graphic or tablet screenshots, for example), which also shrinks the
reserved caption band from 280 px to 80 px (play-store-compose.ps1:72).
[Rubric §30, Compliance/Privacy] assesses app store compliance. Play Console has strict aspect-ratio rules for phone screenshots; this script enforces compliance mechanically rather than relying on manual cropping.
Walkthrough
Lineup (play-store-compose.ps1:52-61). Eight slots are defined inline with slug, caption (large
bold white text) and subtitle (smaller cyan text). The comment at play-store-compose.ps1:51 notes
that the lineup must be kept in sync with store-assets/play-store/README.md, whose table
(store-assets/play-store/README.md:42-51) currently matches all eight slugs, captions and subtitles
exactly. A missing lineup entry does not fail the run: the slot renders without a caption and a
warning is written (play-store-compose.ps1:158-160).
Brand colors (play-store-compose.ps1:69-71). Three colors: brandTeal (#0D7377), brandCyan
(#14FFEC) and brandTealDark (#094F52). The canvas uses a vertical gradient from teal to dark
teal for depth (play-store-compose.ps1:95-98).
System.Drawing.Common assembly (play-store-compose.ps1:39-42). The script loads
System.Drawing.Common (the PowerShell 7 path) inside a try, falling back to the desktop-FX
System.Drawing alias on Windows PowerShell 5.1.
Fit-inside scaling (play-store-compose.ps1:130-138). Each raw capture is scaled to fit inside
the available image area (imageMaxW by imageMaxH, computed from the canvas minus the caption band
and the footer at play-store-compose.ps1:74-75), preserving aspect ratio, then centered
horizontally and vertically. Captures taller than 9:16 (the 9:20 Pixel emulator case) are letterboxed
on the teal background rather than cropped, so nothing in the UI is lost.
Soft shadow and cyan border (play-store-compose.ps1:140-152). A black rectangle offset 10 px
right and 14 px down at alpha 80 of 255 produces a drop shadow; a 2-px cyan border makes the
screenshot pop against the teal background.
Output (play-store-compose.ps1:175). Each composed PNG is saved as
store-assets/play-store/screenshots/<slug>.png, and every GDI+ object is released in nested
finally blocks (play-store-compose.ps1:176-182) so a long composing run does not leak handles.
Upload the results directly to Play Console, Main store listing, Phone screenshots
(play-store-compose.ps1:187).
Docs/MobileReleaseRunbook.md, store-submission runbook
File: MMCA.ADC/Docs/MobileReleaseRunbook.md (250 lines)
What it is. The manual, credential-holding steps around a store submission that code and CI
cannot perform, each tagged with when it must happen relative to the submission
(MobileReleaseRunbook.md:3-5). Its companion is Docs/DeviceTestChecklist.md (178 lines), the
physical-device pass to re-run after any behavior-affecting bump.
When to run. Before a Play or TestFlight upload, and before every iOS archive. The nine sections
are independent; read the one that matches the step you are on. The ninth, iOS toolchain alignment
and launch-crash evidence, applies before every iOS archive (MobileReleaseRunbook.md:216).
[Rubric §17, DevOps & Deployment] assesses whether the release path is documented end to end. The mobile head is the part of ADC that CI cannot fully automate (signing keys, provisioning profiles, store consoles), so the runbook is the substitute for a pipeline.
The load-bearing items
Android App Links fingerprint (MobileReleaseRunbook.md:7-59). /.well-known/assetlinks.json is
served by the shared MapAppAssociationEndpoints mapper in MMCA.Common.API, wired in
MMCA.ADC.UI.Web/Program.cs from the AppAssociation configuration section; bicep does not inject
that section and appsettings.Production.json does not override it, so the base appsettings.json
values are verbatim what production serves (MobileReleaseRunbook.md:13-18). Android verifies a link
only when both package_name and sha256_cert_fingerprints match the installed app. Two traps: the
Release android property group overrides the package id to ivanball.AtlDevCon
(MMCA.ADC.UI.csproj:85) while Debug installs as com.ivanball.atldevcon
(MMCA.ADC.UI.csproj:39), and the fingerprint must be the Play App Signing certificate's, not
the local upload keystore's, which Google discards when it re-signs (MobileReleaseRunbook.md:32-34;
ADR-043 tracks the same item). The runbook
step still tells the operator to replace a placeholder (MobileReleaseRunbook.md:38), but
MMCA.ADC.UI.Web/appsettings.json:109-111 holds a full SHA-256 fingerprint; whether it is the Play
App Signing one is not determinable from source (see the last section). The fingerprint belongs in
the repo rather than Key Vault because it is public by design: it is served to anyone who requests
the document (MobileReleaseRunbook.md:39-40).
iOS associated domains (MobileReleaseRunbook.md:61-75). Entitlements.plist requests
com.apple.developer.associated-domains and is wired in through CodesignEntitlements
(MMCA.ADC.UI.csproj:123). The existing "AtlDevCon App Store" provisioning profile does not carry
that capability, so the next Release build fails signing until the capability is enabled and the
profile regenerated under the identical name (the csproj pins CodesignProvision,
MMCA.ADC.UI.csproj:132). The AASA document must be live on the prod UI host before App Review,
because Apple's CDN fetches it at submission (MobileReleaseRunbook.md:72-75).
Release signing password (MobileReleaseRunbook.md:77-81). Keystore passwords are not in the
csproj: AndroidSigningKeyPass and AndroidSigningStorePass read the ADC_ANDROID_SIGNING_PASSWORD
environment variable (MMCA.ADC.UI.csproj:100-101), which must be set in the shell before any local
Release android build.
Native push and the avatar grant, two Bicep switches pointing in opposite directions. Both are worth reading against the template rather than the prose:
- Native push is wired and enabled by default:
nativePushEnableddefaults totrue(main.bicep:156-157) anddeployNotificationHubdefaults totrue(main.bicep:159-160). What the second flag gates is only the wiring, the Key Vault connection-string secret plus the secret and env refs on the Identity and Notification apps that read it (main.bicep:2313,:2430,:2586,:3052,:3140). The namespace, hub and auth rule are never deployed by this template: they are declaredexisting(main.bicep:1830-1842) because ARM PUTs on this namespace never reach a terminal state, which hit twice on 2026-08-24 at two API versions (main.bicep:1822-1829). They have to be provisioned out of band through section 5 of the runbook before the flag can be true. Read that section from the bottom up: the opening paragraph (MobileReleaseRunbook.md:94-99) still says the hub is not provisioned and describes the guard asdeployNotificationHub=false, but the progress note that follows (MobileReleaseRunbook.md:101-105) records the current defaults, and the remaining manual work is the out-of-band hub creation, the FCM v1 service-account credential and the APNs key (MobileReleaseRunbook.md:107-121). Registration works on the connection string alone; only sends need those credentials, and a failed native send now pages throughadc-prod-alert-native-push-failed(main.bicep:727-732). - Avatar storage still needs a one-time out-of-band role grant, because the deploy identity
deliberately lacks
Microsoft.Authorization/roleAssignments/write, somain.bicepdeclares no role assignment for it. For the shared apps identity the grant is the runbook's by-hand step (MobileReleaseRunbook.md:123-149, which includes theaz restform becauseaz role assignment createmisreports on this tenant); until it is applied, avatar uploads fail cleanly withFileStorage.UploadFailedand nothing else breaks. Under per-app identities,scripts/security/bootstrap-identities.ps1makes the equivalent grant: Storage Blob Data Contributor on theavatarsanddataprotection-keyscontainers for the Identity app's own identity (bootstrap-identities.ps1:21-22).
Play target API level (MobileReleaseRunbook.md:158-215). A recurring annual deadline: from
2026-08-31 an update must target API 36 (Android 16) or higher (MobileReleaseRunbook.md:161). The
store build comes from the default net11.0 line, so it targets API 37
(MobileReleaseRunbook.md:175). The level is pinned per framework line in the csproj
(MMCA.ADC.UI.csproj:69-70: TargetPlatformVersion 36.0, and 37.0 when the target framework is
net11.0) precisely so a build machine one Android workload behind fails outright instead of quietly
producing a rejectable AAB. Raising it is a behavior change (the API 35+ jump forces edge-to-edge
layout, MobileReleaseRunbook.md:211), so the device checklist is re-run before rollout, and the
runbook prescribes verifying the merged manifest before every upload.
The operational artifacts in full context
The surviving artifacts form one story that starts at bootstrap and ends at day-2 triage:
| Step | Who runs it | Artifact |
|---|---|---|
| Bootstrap, create the deploy identity and its OIDC credential | Operator, once per environment | scripts/azure-setup.sh |
| Per-app identities, create the app identities and their data-plane grants | Operator with role-assignment rights, once per environment | scripts/security/bootstrap-identities.ps1 |
Archive retirement, the finished downgrade, export and drop of AtlDevCon |
Nobody: recorded, not run | infra/DISASTER-RECOVERY.md (archive record), infra/main.bicep comment block |
| Weekly recovery proof, PITR-restore a throwaway copy and time it | GitHub Actions (weekly cron) plus operator on demand | dr-drill.yml into scripts/dr-restore-drill.ps1 |
| Disaster recovery, restore a database, roll back a deploy | On-call operator | infra/DISASTER-RECOVERY.md |
| Day-2 alert triage, answer a page and pick the recovery move | On-call operator | infra/OPERATIONS.md |
| Credential compromise, contain, rotate, revoke | On-call operator | infra/OPERATIONS.md |
| Passwordless SQL and identity hardening, advance or roll back each stage | Operator plus one deploy per stage | infra/SQL-MANAGED-IDENTITY.md |
| Store assets and submission, capture, compose, upload | Developer on a device or emulator | scripts/play-store-*.ps1, Docs/MobileReleaseRunbook.md |
The AtlDevCon database is the thread that runs through the database half of that table, and that
thread ends: it was the source of data truth during the copy, then the rollback path after the
flip, then a Basic-tier archive, from 2026-09-02 a bacpac blob, and since 2026-10-03 nothing at all
(main.bicep:1408-1414, DISASTER-RECOVERY.md:25-32). Three practical consequences follow for an
operator. The four live ADC_* databases are the entire estate covered by PITR and LTR
(main.bicep:1458-1460). The weekly drill rotates over exactly those four and cannot target anything
else (dr-drill.yml:28-32, :77, :87-90). And pre-cutover data has no separate recovery path:
the bacpac is gone, and the live databases already hold that data, copied in at cutover.
Cross-links:
- IaC chapter:
infra/main.bicepprovisions the fourADC_*databases, the LTR policies, the SLO alerts and workbook, and the Service Bus namespace with its broker queues, topics and subscriptions (the namespace atmain.bicep:1570, the queues atmain.bicep:1668). - CI/CD chapter:
deploy.ymlcarries the revision-activation and smoke gates, the rollback, and the four recency gates (dr-freshness,load-freshness,cross-service-freshness,cross-browser-freshness, thefreshnessjob atdeploy.yml:1260). - ADR-006, the decision to adopt database-per-service, its trade-offs, and the
CrossDataSourceDegradeConventionthat removes cross-database FKs. - ADR-009, the resilience and recovery objectives framework, including the requirement
that
DISASTER-RECOVERY.mdexists and that the drill-result table is filled. - ADR-062, SLO alerting as code and the alert-to-runbook pairing gate that
infra/OPERATIONS.mdsatisfies. - ADR-064, deploy preconditions as proof of recency, which is what turns the weekly drill into a production gate.
- ADR-098, Aspire for orchestration and not for production dashboards, which
OPERATIONS.md:973-1004operationalizes. - ADR-003, the outbox pattern that the per-service databases each own independently and that the outbox dead-letter alert watches.
Rubric tag summary
| Tag | Artifact(s) |
|---|---|
| §8 Data Architecture | ADR-006 and the per-service database declarations; the AtlDevCon archive-and-drop record in DISASTER-RECOVERY.md |
| §11 Security | azure-setup.sh (UAMI / one environment-scoped OIDC credential / least privilege), scripts/security/bootstrap-identities.ps1 (per-app identities and grants), dr-drill.yml (a credential-free select job that validates dispatch inputs, environment: production on the OIDC job, inputs passed through env instead of command-line interpolation), DISASTER-RECOVERY.md (managed identity, Key Vault, Shared Key off), OPERATIONS.md (credential compromise and rotation, JWKS overlap rotation), SQL-MANAGED-IDENTITY.md (staged passwordless SQL, the later identity stages, accepted public-network risk) |
| §13 Observability | DISASTER-RECOVERY.md (alert thresholds and severities), OPERATIONS.md (per-alert triage, the build-gated pairing, the no-dashboard decision) |
| §17 DevOps & Deployment | azure-setup.sh (a printed checklist that matches every deploy guard), Docs/MobileReleaseRunbook.md (the manual store-submission path) |
| §29 Resilience & Business Continuity | DISASTER-RECOVERY.md (RTO/RPO, PITR, LTR, restore runbook, drill ledger), dr-drill.yml plus dr-restore-drill.ps1 (the drill itself, gated for recency and for per-database failure by dr-freshness); geo-restore and LTR restore accepted as undrilled (ADR-009) |
| §30 Compliance/Privacy | play-store-capture.ps1, play-store-compose.ps1 |
| §31 Cost/FinOps | the AtlDevCon retirement on a measured 0 DTU (main.bicep:1408-1414); the 2026-09-02 alert-cadence changes (main.bicep:578-582 and the web-test comment above main.bicep:1145); the thinned telemetry stream documented in OPERATIONS.md:973-1004; the dr-drill.yml always() sweep of leftover -drill copies (dr-drill.yml:153-169), so a drill cancelled at its timeout cannot leave a billed database behind |
| §32 Dependency & Supply-Chain | dr-drill.yml (actions/checkout and azure/login pinned to full commit SHAs with the version in a trailing comment, dr-drill.yml:124, :129) |
| §34 Architecture Governance | The deliberate deletion of the spent one-time cutover tooling, of the archive database once it was measurably idle, and of the archive runbook once its record moved into the DR runbook; OPERATIONS.md:960-968, which states exactly which alerts the pairing gate does and does not cover |
Not determinable from source
- Whether the newest weekly drill is green: the drill ledger runs through 2026-11-30
(
DISASTER-RECOVERY.md:213-224), with no rows between 2026-08-10 and 2026-11-09, and a run reaches the ledger only when an operator pastes the printed row back intoDISASTER-RECOVERY.md. Any drill newer than the last ledger row exists only in the Actions history, which is exactly whatdr-freshnessqueries (deploy.yml:1274-1289, through the sharedfreshness-gateaction); it cannot be read from the repository. - Why ADC's restores slowed from minutes to 25 to 59 minutes: the DR runbook records the
slowdown across every database from 2026-09-28 and states that the cause is not established
(
DISASTER-RECOVERY.md:226-233). Only the restore operation details on the Azure side can settle it. - The live values of the three SQL managed-identity repository variables:
main.bicep:36shows the safe default (false) anddeploy.yml:1757shows that the deployed value comes fromvars.USE_MANAGED_IDENTITY_SQL. The variable's current value is repository configuration, not source. Check Settings, then Secrets and variables, then Actions. The same holds for the later identity stages' variables and forENABLE_SECURITY_SIGNAL_ALERTS. - That the archive bacpac is really gone: the template and the DR runbook record its deletion
on 2026-10-03 (
main.bicep:1413-1414,DISASTER-RECOVERY.md:25-30), but nothing in the repository can attest to the storage container's current state. Anaz storage blob listagainst that container is the only confirmation, and the answer should be empty: there is no pre-cutover copy to rely on. - Whether the checked-in App Links fingerprint is the Play App Signing one:
MMCA.ADC.UI.Web/appsettings.json:109-111holds a full SHA-256 value while the mobile runbook still describes a placeholder (MobileReleaseRunbook.md:38); only the Play Console's app-signing page can say whether they match. - Whether the Notification Hub namespace actually exists in Azure:
main.bicep:1830-1842declares the namespace, hub and auth rule asexisting, so the template asserts nothing about their presence. WithdeployNotificationHubdefaulting totrue(main.bicep:160), a deploy fails to resolvelistKeys()if they were never provisioned out of band. Only anazquery against the subscription can settle it. - Azure list prices: the DTU counts and the cadences are in source (
main.bicep:1447sets Basic capacity 5 for each per-service database outside conference mode), and the template quotes measured monthly figures for the alert rules and the web test (main.bicep:578-582, and the comment abovemain.bicep:1145). Those figures are point-in-time measurements on this subscription, not a price list. Check Azure pricing before quoting a saving.