Architecture governance
MMCA.Store: Architecture Scorecard
Canonical, version-controlled scorecard for this repo: the single source of truth for MMCA.Store's architecture scores. Scored against the rubric at
ArchitectureEvaluationCriteria.md; framework-wide facts in../MMCA.Common/FACTS.md. Remediation lives inRemediationBacklog.md; the cross-repo comparison in the workspace-internalDocs/Architecture/CrossRepoComparison.md(not published).
Evidence as of 2026-11-23 at MMCA.Common.* v1.315.0 (lockstep), git HEAD c0237af6 (clean tree). Rubric version 2.
Facts re-verified 2026-11-24 against MMCA.Common v1.318.0 (MMCA.Store HEAD 7875dfd8); scores, indices and bands are unchanged from the evidence date above and move only at the next re-score.
At a glance
- Maturity index = Σ(maturity×weight) ÷ Σ(weight×4) = 306 ÷ 316 = 96.8%
- Implementation index = Σ(impl×weight) ÷ Σ(weight×10) = 657 ÷ 790 = 83.2%
- Weaker axis: Implementation (execution quality), by ~14 points, a wider gap than ADC's.
- Below maturity 4: 4 categories (§10 Messaging, §12 Performance, §21 Accessibility, §25 Navigation); see the maturity band.
- Implementation band (implementation <= 8): 22 categories; see the implementation band.
MMCA.Store is a .NET 10.0 DDD/Clean Architecture e-commerce system (Catalog, Sales, Identity modules; Stripe checkout) running as independently hosted services behind a YARP gateway, database-per-service (Store_Catalog/Store_Sales/Store_Identity, each with its own outbox), collaborating via Result-over-the-wire gRPC and integration events on MMCA.Common's native broker transports, and consuming MMCA.Common.* in lockstep with MMCA.ADC. Its strongest ground is inherited framework substance guarded by 76 architecture fitness-test classes, reference front-end security (section 26), and an operational floor of two-phase Bicep IaC, OIDC + managed identity, signed service tokens on the internal gRPC edge that returns customer data, a post-deploy smoke gate, a drilled DR restore and freshness-gated deploys. The weight of the remaining gap sits on the implementation axis: security (section 11) is the one weight-3 category at I7, and 17 categories are at M4/I8, led by the weight-3 SOLID constructor ceilings (section 1), the accepted lockstep deploy (section 7), UI architecture (section 18), state management (section 19) and front-end testing (section 28). Several of those I8 holds are recorded decisions rather than scheduled work (see Deliberate and accepted in the backlog).
Top 5 risks
- Security holds at implementation 7 on red flags still present in production: section 11 (impl 7, weight 3): one shared identity is
db_ownerin all three databases (infra/SQL-MANAGED-IDENTITY.md:81-84), internal ingress allows insecure transport (infra/main.bicep:2003,2211,2344), the SQL server keeps password admin auth with public network access (:1097-1102), and no threat model is maintained. (The per-app Service Bus SAS rules now carry Send and Listen only, with the broker topology declared in the template,infra/main.bicep:1481-1516.) The per-app identities, Entra-only SQL and Entra auth for Redis and Service Bus that would remove the first and third ship as opt-in parameters that default off (infra/main.bicep:26-44, read atdeploy.yml:1577-1625). The internal Customers gRPC edge requires a user or service token (Identity.Service/Program.cs:149), and the cached Stripe webhook secret is Data Protection-protected (SharedCacheStripeWebhookSecretStore.cs:133).- Remediation: switch on the staged flags in the order at
infra/SQL-MANAGED-IDENTITY.md:231-242(per-app identities, then Entra Redis and Service Bus with keys off, then Entra-only SQL), plus the user-side seed-account check. Expected: section 11 impl 7 to 8 once the flags are live; the insecure internal ingress and the missing threat model remain.
- Remediation: switch on the staged flags in the order at
- Messaging maturity holds at 3 after the dead-letter procedure shipped: section 10 (mat 3, impl 8, weight 3): the broker dead-letter sub-queues now have an alert (
store-alert-broker-dead-letter, a metric alert atinfra/main.bicep:563), an inspect, replay and discard runbook (infra/OPERATIONS.md:182), and[EventName]is required byEventConventionTests.cs:3. The real broker round-trip still reaches the deploy only through thecross-service-freshnessrecency check (deploy.yml:1056), not a merge gate, and the round-trip tier runs on a weekday-night cron (cross-service-tests.yml:35).- Remediation: lever not yet identified, named at the next re-score. Expected: section 10 stays M3 until one is named.
- Accessibility maturity is capped pending a human pass: section 21 (mat 3, weight 3): the 32-scan axe suite and the cart-drawer keyboard test (
CartDrawerKeyboardTests.cs:21) gate the deploy (impl 8), but the rubric pairs axe-in-CI with a recorded manual screen-reader pass and theACCESSIBILITY-SCREENREADER-PASS.mdresults log holds only the placeholder row (store-ACCESSIBILITY-SCREENREADER-PASS.md:70), matching ADC's M3.- Remediation: record a dated NVDA/VoiceOver pass in the runbook against the running app (needs a human; cannot be done headless). Expected: section 21 mat 3 to 4.
- Load evidence is capacity-planning cadence, not a merge gate: section 12 (mat 3): the k6 suite is real with pass/fail thresholds and a
load-freshnessdeploy gate, but the test itself runs monthly/on-demand (load-test.yml:21cron,workflow_dispatchat:12), so a latency regression can merge and deploy inside the 35-day freshness window.load-freshness(a step of thefreshnessjob,deploy.yml:1037) runs the shared freshness-gate action in success mode over a 35-day window (:1046), keyed on the latest successful run, and carries a break-glass skip.- Remediation: none scheduled: the monthly k6 run plus
load-freshnessis the accepted posture, because an in-band k6 run on every deploy would load production at a peak of about 67 users (Deliberate and accepted in the backlog). Expected: section 12 stays M3.
- Remediation: none scheduled: the monthly k6 run plus
- Every merge is a single-revision production deploy: section 17 (impl 8, weight 2) with section 7 (impl 8, weight 3): the deploy is one
azure/arm-deployof the wholemain.bicep(deploy.yml:1663) with all five images pinned to oneIMAGE_SHA(:1393), the accepted lockstep posture for a five-app fleet, into the only environment (ENVIRONMENT_NAME: prod,:52) underactiveRevisionsMode: 'Single'(infra/main.bicep:1996), with no canary or slot. The rollback reports what it did (per-app outcomedeploy.yml:1850,1868, counted summary:1876) and rolls back only a failed activation: an HTTP-probe failure on a fleet whose newest revisions are live rolls nothing back (:1836-1853), the skip-live guard ADR-080 keeps.- Remediation: none scheduled: the Bicep what-if and probe-only rollback are closed as over-engineering (Deliberate and accepted in the backlog); the lever for 9 is not yet identified. Expected: section 17 impl 8 holds.
Top 5 strengths
- Clean Architecture + DDD + CQRS depth, fitness-enforced: §3/§4 (impl 9): inherited framework substance, guarded by the shared architecture fitness suite (76 test classes,
StoreArchitectureMap.cs:14-43). - Full microservices parity on a race-safe data layer, §7 (impl 8) / §8 (impl 9): database-per-service + per-service outbox + versioned gRPC + native broker transport + RS256/JWKS, extractable modules (
infra/main.bicep:1259-1283per-service DBs,:1312Service Bus), with the oversell race closed by an atomic conditional UPDATE under deterministic lock ordering plus a schema CHECK backstop (InventoryAllocationService.cs:74-77,InventoryItemConfiguration.cs:57-59) and destructive migrations blocked at the merge gate (deploy.yml:471-523). - Observability and test strategy, gate-backed: §13 (impl 9) / §14 (impl 9):
ObservabilityConventionTests.cs:7pairs every SLO alert with aninfra/OPERATIONS.mdsection and fails below five specs (:13), and the requiredbuild-and-testcheck holds a self-filtered line floor of 51.6 and an Application-layer branch floor of 72.8 (deploy.yml:414,:447) over a real-SQL integration tier. - Reference front-end security, §26 (impl 9): in-memory access token + HttpOnly refresh cookie (no localStorage), hardened origin-pinned CSP, runtime-config fetch (
ServerTokenStorageService.cs:10-13,BlazorCspPolicyProvider.cs:102). - Drilled DR + real erasure path (§29 impl 9 / §30 impl 8): recorded restores of the three live per-service databases in 1.3 to 3.6 min (
DISASTER-RECOVERY.md:216-218, drill-history table:213-218; the 28.9-min row at:215is the retiredMMCAStoredatabase), thedr-freshnessdeploy gate + weekly cron + CI-gatedGracefulShutdownTests,IAnonymizableanonymize-in-place + export + residency/PII fitness functions.
Scorecard
| # | Category | Weight | Maturity (0-4) | Impl (0-10) | Weighted (M·w / I·w) | Evidence / Notes |
|---|---|---|---|---|---|---|
| 1 | SOLID Principles | 3 | 4 | 8 | 12/24 | Narrow-interface ctor DI, OCP via state strategy (no type-switch); the constructor-dependency ceilings are machine-enforced by ConstructorDependencyCountTests (services 6 at :36, controllers 8 at :54, handlers 7 at :72) in the merge-gating architecture tier (MMCA.Store.CI.slnf:53), Liskov substitution is guarded by SubstitutabilityTests (sealed subclass of the shared base over the Store module assemblies, no exclusions, Governance/SubstitutabilityTests.cs:14), and TimeProvider is injected over ambient DateTime.UtcNow, with no exception: ClockReadTests.cs:9 keeps the shared base's empty AllowedClockReaders. Held at 8, not 9: the rubric's 8+-dependency red flag (ArchitectureEvaluationCriteria.md:134) is present in one class. AuthenticationService holds the service high-water mark with 6 constructor dependencies (AuthenticationService.cs:26-32, service ceiling 6 at ConstructorDependencyCountTests.cs:36), and one controller sits at 8 (ShoppingCartsController.cs:53-61; ReviewsController and ProductVariantsController take 6, ReviewsController.cs:57-63, ProductVariantsController.cs:39-45). Each ceiling is a recorded, deliberate one (Deliberate and accepted #1 in the backlog), and that accepted ceiling is what caps this row at 8. Two minor gaps sit beside it: an is-type dispatch on the Stripe SDK object in the payment adapter (StripePaymentService.cs:349-383) and a string switch on the webhook event type (ProcessPaymentWebhookHandler.cs:50). Evidence: Tests/Architecture/MMCA.Store.Architecture.Tests/Cqrs/ConstructorDependencyCountTests.cs:36,54,72; AuthenticationService.cs:26; Order.cs:279-288 (FrozenDictionary<OrderStatus,IOrderState>) |
| 2 | Design Patterns | 2 | 4 | 9 | 8/18 | Factory→Result, payment State machine, Saga (Stripe compensation), Specification, Decorator, Outbox, Repository/UoW: idiomatic, named. Evidence: Order.cs:328,279-288 (factory at :328, state table at :279-288); Orders/Saga/OrderCancelledSagaHandler.cs; Orders/Specifications/OrdersByCustomerSpecification.cs |
| 3 | Clean Architecture | 3 | 4 | 9 | 12/27 | Fitness-test-enforced layer rules; domain framework-pure. (The compile-time layer-guard MSBuild target is MMCA.Common-internal; it is not a Store-side gate.) Evidence: StoreArchitectureMap.cs:14-43 + LayerDependencyTests/DomainPurityTests; Order.cs:1-16 (imports only System, Common.Domain/Shared and its own module's Domain/Shared) |
| 4 | Domain-Driven Design | 3 | 4 | 9 | 12/27 | Aggregate root, Money VO, by-id cross-aggregate refs, domain events, invariants, factory→Result, rich state behavior; identifier aliases. Evidence: Order.cs (Money :141, OrderInvariants, OrderIdentifierType) |
| 5 | Vertical Slice Architecture | 2 | 4 | 8 | 8/16 | Cohesive command+handler+request+validator+mapper per operation; a deliberate layered-by-project hybrid (cross-cutting in the pipeline). Slice cohesion is machine-enforced pre-merge by SliceCohesionTests (sealed subclass of the shared SliceCohesionTestsBase, two real rule facts; the base carries no minimum-scanned-types floor, and the scan is non-vacuous in practice because StoreArchitectureMap anchors real Application assemblies) in the deploy-gating MMCA.Store.CI.slnf, the same gate ADC credits at M4/I8. The hybrid is an implementation-axis cap, not a maturity deduction. Held at 8, not 9: horizontal technical folders persist inside the module Application layers, gate-invisible where the validated type is cross-assembly (the co-location rule exempts them, MMCA.Common .../ArchitectureRules.Slices.cs:67-68; instance: Identity.Application/Users/Validation/ChangePasswordRequestValidator.cs:13 over the Shared ChangePasswordRequest while its command+handler live in Users/UseCases/ChangePassword/), and generic-CRUD operations dispatch to shared framework handlers (Catalog.Application/DependencyInjection.cs:95, Identity.Application/DependencyInjection.cs:91) with reads served by the generic IEntityQueryService (CategoriesController.cs:35). Evidence: Tests/Architecture/MMCA.Store.Architecture.Tests/Cqrs/SliceCohesionTests.cs:9; MMCA.Store.CI.slnf:53; Application/Orders/UseCases/Cancel/{CancelOrderCommand,CancelOrderHandler}.cs |
| 6 | CQRS & Event-Driven | 2 | 4 | 8 | 8/16 | Command/query split, outbox persist-then-publish, idempotent inbox (AddInboxMessages), Stripe saga; four cross-service integration events across five consumer flows (SalesBrokerConsumers.cs:23-29, CatalogBrokerConsumers.cs:24-28) + a deliberate in-process UserRegistered domain event; the outbox-to-broker-to-consumer round-trip is covered by the nightly MMCA.Store.CrossService.IntegrationTests (Testcontainers RabbitMQ+SQL). The ProductVariantChanged Added path is transactional: AddVariantCommand is ITransactional (AddVariantCommand.cs:25) and the publish is a durable ADR-114 InternalCommands row enrolled in the same transaction (AddVariantHandler.cs:79-82,92-97). Held at 8: a refused schedule is logged at Error and not retried (AddVariantHandler.cs:99-100). Evidence: Sales.Service/SalesBrokerConsumers.cs:23-29; Contracts/IntegrationEventContractTests.cs; Tests/Integration/MMCA.Store.CrossService.IntegrationTests/ |
| 7 | Microservices Readiness | 3 | 4 | 8 | 12/24 | Database-per-service + per-source outbox, async events + versioned gRPC, Polly resilience, extractable modules, 5 independently-built images. All per-service DBs share one physical SQL server (infra/main.bicep:1254-1268). Maturity 4: the §7 fitness classes (MicroserviceExtractionTests / ModuleIsolationTests / ServiceContractPurityTests / ProtoContractTests, plus CrossModuleReferenceTests and HostCompositionTests; MicroserviceExtractionTests.cs:3) ship in MMCA.Store.CI.slnf:53 and execute in the required build-and-test job (deploy.yml:280, test run at :362), under branch protection with strict up-to-date checks and enforced admins. Held at 8, not 9: "services build/test/deploy independently" is half met. The BUILD half is per-image incremental (per-image dirty flags in the changes job re-tag unchanged images instead of rebuilding them); the DEPLOY half is a single azure/arm-deploy of the whole main.bicep (deploy.yml:1663) with all five container-app images pinned to one IMAGE_SHA (:1393), so every service takes a new revision on every deploy and a smoke failure that fails an activation rolls all five back together (rollback block :1828-1886, app list :1709). That is the rubric's "services that must deploy together" red flag, which keeps the row in the Strong band rather than Exemplary; the lockstep deploy is the recorded posture for a five-app, one-developer fleet (Deliberate and accepted in the backlog), so it caps the row the way the constructor ceilings cap section 1. The Anti-Corruption Layer and Strangler Fig patterns are named in the canonical library (ADR-007, ADR-008), not in the repo. Evidence: infra/main.bicep:1254-1268 (per-service DBs); Sales.Service/Program.cs:139 (AddBrokerMessaging); deploy.yml:1056 (the cross-service-freshness step of the freshness job requires BOTH the RabbitMQ round-trip and the Service Bus emulator smoke to have succeeded in the same nightly run) |
| 8 | Data Architecture | 3 | 4 | 9 | 12/27 | Per-aggregate tx, soft-delete + filtered indexes, central audit (Common), RowVersion concurrency, versioned per-service migrations with a model-drift CI gate, LTR backups. The write path is race-safe by construction: stock decrements are an atomic conditional UPDATE (SET qty = qty - n WHERE qty >= n) with deterministic variant-id lock ordering, enlisted in the ambient transaction through the unit of work's repository ExecuteUpdateAsync, which stamps the audit columns itself (InventoryAllocationService.cs:74-77, audit note at :24-31, lock ordering at :63); a CK_InventoryItem_AvailableQuantity_NonNegative CHECK constraint backstops it at the schema so no future path can drive stock negative (InventoryItemConfiguration.cs:57-59); the checkout write phase (decrements + order insert + cart transition) is one ExecuteInTransactionAsync with the cross-service gRPC price fetch deliberately outside it, so remote latency never extends lock hold time (CheckOutHandler.cs:106); and an expand/contract guard fails any PR whose new migration Up() drops a column/table/index without an EXPAND-CONTRACT-OVERRIDE marker, failing closed when the base diff is unresolvable (deploy.yml:471-523; fail-closed branch at :496-503, override marker check at :515-516; policy at CONTRIBUTING.md:56, CI enforcement described at :70). Both migration gates sit in the required build-and-test check. Held at 9, not 10: Identity carries IConcurrencyAware mutation requests but has no concurrency round-trip test, so the stale-version proof (412 Precondition Failed on a stale If-Match, 428 Precondition Required when the write names no version) covers 2 of 3 modules; the shared ConcurrencyConventionTests rule scans Application types named *UpdateRequest, of which Store has none, so that particular gate is vacuous here (the substance stands without it). Evidence: InventoryAllocationService.cs:74-77; InventoryItemConfiguration.cs:57-59; CheckOutHandler.cs:106; API-level round-trip proof in Tests/Integration/MMCA.Store.Catalog.IntegrationTests/Concurrency/StaleRowVersionConflictTests.cs:19 (428, no If-Match), :34 (the child-entity token path, 412 on a stale variant version) and Tests/Integration/MMCA.Store.Sales.IntegrationTests/Concurrency/OrderTransitionConcurrencyTests.cs:24 (412), :46 (428); raw-IQueryable ban with an EMPTY allowlist in Tests/Architecture/MMCA.Store.Architecture.Tests/Cqrs/RawQueryableConventionTests.cs:14 (in MMCA.Store.CI.slnf:53); per-module model-drift gate deploy.yml:455; main.bicep:1290-1300 (LTR policy) |
| 9 | API & Contract Design | 2 | 4 | 9 | 8/18 | RFC 9457 Problem Details, header versioning, pagination, DTO decoupling (ADR-001), gRPC .proto, OpenAPI served non-prod, and a demonstrated v2 contract: ServiceInfoController carries [ApiVersion("1.0", Deprecated)] + [ApiVersion("2.0")]. The guards are seven contract-guard files across all three services (OpenAPI shape/path-floor + RFC 9457 Problem Details for Catalog/Sales/Identity, incl. the Store-specific 412 stale-RowVersion probe at Catalog ProblemDetailsContractTests.cs:41, plus ServiceInfo API-versioning on Catalog), running in integration-tests, which is PR-only (deploy.yml:705-711, the pull_request condition at :711, absent from deploy.needs at :1332) but a server-side REQUIRED status check on main with strict=true (CONTRIBUTING.md:86-87), and merging to main is the prod deploy, so nothing ships without them green; a committed build-time OpenAPI document for each of the three services is diffed inside the required build-and-test job (deploy.yml:316-332), and each service's OpenApiContractTests diffs the live document against a committed openapi-baseline.json and fails only on a breaking change (Common OpenApiContractTestsBase.cs:23-25, :118; Catalog OpenApiContractTests.cs:24-30); ProtoContractTests additionally freezes the full cross-service gRPC wire contract in the merge-gating architecture tier (ProtoContractTests.cs:9), and IntegrationEventContractTests freezes the .v1 event wire names (IntegrationEventContractTests.cs:9), documented in a wire-name and field table (store-Specification.md:1342). Below 10: OpenAPI not exposed in prod (internal behind gateway); beside its baseline diff, the Catalog OpenApiContractTests is a path-count floor plus three pinned paths (OpenApiContractTests.cs:18, :23); the async-contract table is hand-maintained, with no AsyncAPI artifact; v2 demonstrated on one anonymous diagnostic endpoint in one service (the other 28 controllers are v1.0-only). Evidence: Catalog.API/Controllers/ServiceInfoController.cs:18; Tests/Integration/MMCA.Store.Catalog.IntegrationTests/Contract/{ApiVersioningTests,OpenApiContractTests,ProblemDetailsContractTests}.cs + Sales/Identity siblings; OrdersController.cs:52,89,118,124-126; Sales.Service/Program.cs:49 (AddOpenApi), :154 (UseMmcaServiceHostAsync, which maps the document outside Production, comment at :46-48) |
| 10 | Messaging & Integration Architecture | 3 | 3 | 8 | 9/24 | Rubric v2 category (ADR-110) at the v2 default weight 3. Broker topology and transport are ADR-governed (ADR-066: RabbitMQ locally, Service Bus in production, Sales.Service/Program.cs:139 AddBrokerMessaging); five consumers run (Sales: ProductVariantChanged, ProductInfoChanged, CustomerErased at Sales.Service/SalesBrokerConsumers.cs:23-29; Catalog: OrderFulfilled, CustomerErased at Catalog.Service/CatalogBrokerConsumers.cs:24-28), with the inbox on in all three services (Sales.Service/appsettings.json:56) and redelivery idempotency tested (CustomerErasedHandlerTests.cs:111). Poison-message handling follows ADR-087, with per-service outbox/inbox retention indexes (MMCA.Store.Migrations.SqlServer.Sales/Migrations/20260725133726_AddOutboxInboxRetentionIndexes.cs) and a 30-day outbox dead-letter retention setting (infra/main.bicep:2053,2259,2404); saga compensation on order cancellation (Orders/Saga/OrderCancelledSagaHandler.cs); the gateway kept to routing and auth only per ADR-088 with RouteMapTests pinning every route; the wire contract of all four integration events frozen by Tests/Architecture/MMCA.Store.Architecture.Tests/Contracts/IntegrationEventContractTests.cs:11 in the merge-gating architecture tier (MMCA.Store.CI.slnf:53); and the real broker round-trip reaching the deploy as a recency gate: cross-service-freshness (a step of the freshness job, deploy.yml:1056; freshness is in deploy.needs at :1332, required at :1362) requires both the RabbitMQ and the Service Bus emulator tiers of cross-service-tests.yml (jobs at :90, :146) to have succeeded in one recent run. The success-guarded cache eviction ADR-001 describes is present, declared through the framework's [EvictOutputCache] attribute, which evicts only after a 2xx write (Catalog.API/Controllers/ProductsController.cs:46; Common EvictOutputCacheAttribute.cs:12-20). The broker dead-letter sub-queues have an operational procedure: the store-alert-broker-dead-letter metric alert fires on the namespace DeadletteredMessages metric for the two host queues (infra/main.bicep:563-596), infra/OPERATIONS.md:182 holds the inspect, replay and discard runbook (:229-245) with the dead-letter table (:205-212), the outbox runbook names all five consumer flows (:171-175), and [EventName] is required on every event (Contracts/EventConventionTests.cs:3, subclassing Common's EventConventionTestsBase). Maturity 3, not 4: the round-trip tier is nightly and non-gating (cross-service-tests.yml:4), so it reaches the deploy only through the recency check, never as a merge gate; the lever for 4 is not yet identified. Held at 8, not 9: CustomerErased and ProductInfoChanged have no real-broker round-trip test and no ordering expectation is declared for ProductVariantChanged (IntegrationEventContractTests.cs:12), both closed as over-engineering at this load (Deliberate and accepted in the backlog). Evidence: infra/main.bicep:503,563; infra/OPERATIONS.md:182; deploy.yml:1056,1332; IntegrationEventContractTests.cs:11 |
| 11 | Security | 3 | 4 | 7 | 12/21 | RS256/JWKS (no shared secret), server-side resource authz (404-not-403) with class-level [Authorize], ownership specifications and HasPermission (OrdersController.cs:53,141,189), Key Vault secrets read through the UAMI, EF parameterized, a checkout redirect allow-list that fails closed (CreateCheckoutSessionCommandValidator.cs:125-127). Maturity 4: the build fails on any controller or page without an explicit authorization decision (AnonymousEndpointTests.cs:127, minimum scanned-type count :135), the supply-chain audit fails closed and is in deploy.needs (deploy.yml:638-651, :1332), NuGetAudit runs in mode all with no suppressed advisory (Directory.Build.props:80-81), and secret-scan.yml runs gitleaks. The internal Customers gRPC edge, which returns email and full name by raw customer id, requires a user JWT or a signed service token: Identity registers AddServiceTokenAuthentication (Identity.Service/Program.cs:85) and maps CustomersGrpcService with .RequireAuthorization(ServiceTokenDefaults.InternalCallerPolicy) (:149), Sales mints the token through AddServiceTokenClient (Sales.Service/Program.cs:147) and the Customers client opts in with WithServiceToken (Identity.Contracts/DependencyInjection.cs:46), the signing key is a required deploy parameter stored as the Key Vault secret Grpc--ServiceToken--SigningKey (infra/main.bicep:68, :1880-1884) and the deploy fails fast when GRPC_SERVICE_TOKEN_SIGNING_KEY is unset (deploy.yml:1399, :1488-1490), and CustomersGrpcAuthorizationTests.cs:26 pins the refusal; the Sales export edge also requires authorization (Sales.Service/Program.cs:160). Catalog's ProductVariantsGrpcService is anonymous and carries no PII, a choice its host comment records (Catalog.Service/Program.cs:120-123). The cached Stripe webhook signing secret is Data Protection-protected under its own purpose when the key ring is shared (SharedCacheStripeWebhookSecretStore.cs:37-42,133, lifetime :72), and production gives Sales a shared blob key ring (Sales.Service/Program.cs:115-119, infra/main.bicep:2469-2470). Held at 7, not 8, on red flags still present in production: one shared identity is db_owner in all three databases (infra/SQL-MANAGED-IDENTITY.md:81-84), internal ingress allows insecure transport (infra/main.bicep:2003,2211,2344), the SQL server keeps admin password auth with public network access and the AllowAzureServices rule (infra/main.bicep:1097-1102, :1140-1147), and no threat model is maintained. (The per-app Service Bus SAS rules now carry Send and Listen only, because every queue, topic and subscription is declared in the template and the apps run with MessageBus__ProvisionTopology=false, infra/main.bicep:1481-1516, topology :1343-1459.) The fixes for the identity and key-auth flags ship as opt-in parameters that default off (per-app identities, Entra-only SQL, Entra auth for Redis and Service Bus with keys off, infra/main.bicep:26-44), read from repository variables by the deploy (deploy.yml:1416-1430,1577-1625), and only USE_MANAGED_IDENTITY_SQL is set. The rubric's 7-8 band requires no significant red flags. Evidence: Identity.Service/Program.cs:85,149; Sales.Service/Program.cs:147; AnonymousEndpointTests.cs:127; infra/main.bicep:26-44,1485,2003; SharedCacheStripeWebhookSecretStore.cs:133 |
| 12 | Performance & Scalability | 2 | 3 | 8 | 6/16 | Async throughout, projections/AsNoTracking/paging on hot paths, tiered cache (output + Redis), stateless scale-out, a real k6 load test, client Web Vitals measured per E2E run (LCP/CLS/TTFB/FCP written as CI artifacts), one batched cross-service existence check in bulk inventory (Sales.Application/Inventory/UseCases/BulkSet/BulkSetInventoryHandler.cs:37-40, rationale :32-36), cross-replica output-cache eviction for non-controller writes (Catalog.Service/Program.cs:86, broker half CatalogBrokerConsumers.cs:31), and bounded broker backpressure per service: each MessageBus section sets PrefetchCount 8 and ConcurrentMessageLimit 4, sized to Store's Basic-tier SQL connection budget rather than copied from ADC (Catalog.Service/appsettings.json:61-62, Sales.Service/appsettings.json:65-66, Identity.Service/appsettings.json:55-56, each with the section 12 comment above it), pinned by Tests/Architecture/MMCA.Store.Architecture.Tests/Governance/MessageBusBackpressureTests.cs:10 (binds MessageBusSettings from all three embedded files and asserts both knobs positive and prefetch covering concurrency; the binding and assertions live in the Common base class it subclasses) in the merge-gating architecture tier (introduced by Store #168, af66b959). Maturity 3, not 4: no perf check runs on the merge path, and that is the recorded posture (the monthly k6 run plus load-freshness; an in-band k6 run on every deploy is Deliberate and accepted in the backlog). load-test.yml is a monthly cron (:21) plus workflow_dispatch (:12); the only deploy-chain hook, load-freshness (a step of the freshness job, deploy.yml:1037), runs on every non-PR event that changes code, push and workflow_dispatch alike (:1009), bounds staleness rather than detecting regressions, runs the shared freshness-gate action in success mode over a 35-day window keyed on the latest SUCCESSFUL k6 run (:1040-1046) so a threshold failure blocks nothing until the last success ages out, and carries a break-glass skip with a justification (:1048-1049), which the deploy reads as success (:1332 needs, :1362); the Web Vitals budgets ride an e2e-gate the deploy accepts as skipped (:1365); none of the six required merge checks (build-and-test, supply-chain, integration-tests, coverage, wasm-payload-budget, gitleaks, read from the live branch protection) is a latency gate. Held at 8: the k6 asset is anonymous, read-only and Catalog-only at 40 VUs (Tests/Load/k6/catalog-read-load.js:3,15). Evidence: Tests/Load/k6/catalog-read-load.js + load-test.yml:12,21 (synthetic-traffic header :7-8, key wired at :86); Tests/E2E/MMCA.Store.E2E.Tests/Workflows/WebVitalsTests.cs + e2e.yml:450 (WEB_VITALS_OUTPUT_DIR); OrdersController.cs:118-155 (bounded pageSize :134, asTracking: false :148, field projection :145) |
| 13 | Observability & Operability | 2 | 4 | 9 | 8/18 | OTel logs/traces/RED metrics via ServiceDefaults (incl. MMCA.Common.Outbox), /health+/alive+/health/ready, App Insights + 5 SLO alert specs + action group + saved SLO workbook provisioned in IaC, per-alert operations runbook in-repo, correlation, poll-span noise control, CI-gated graceful shutdown. Maturity 4: the alert-to-runbook pairing is a CI-gated fitness function: ObservabilityConventionTests parses the embedded infra/main.bicep sloAlertSpecs and fails the merge gate on any alert without a severity-correct OPERATIONS.md section (5-spec non-vacuity floor, MinimumAlertSpecs => 5 at ObservabilityConventionTests.cs:13; corrected 2026-10-19). Evidence: Tests/Architecture/MMCA.Store.Architecture.Tests/Governance/ObservabilityConventionTests.cs (a sealed subclass; the four [Fact]s live in MMCA.Common.Testing.Architecture/Bases/Governance/ObservabilityConventionTestsBase.cs); MMCA.Store.CI.slnf:53; main.bicep:374 (sloAlertSpecs), :1033 (workbook); infra/OPERATIONS.md:15; Tests/Hosts/MMCA.Store.Gateway.Tests/GracefulShutdownTests.cs (a sealed subclass; the assertion body lives in MMCA.Common.Testing/Conformance/GracefulShutdownTestsBase.cs) |
| 14 | Testability & Test Strategy | 3 | 4 | 9 | 12/27 | Non-inverted pyramid + arch fitness + integration tier gating deploy; the unit-tier line floor is 51.6 measured on Store's own code (reportgenerator +MMCA.Store.*;-*.Tests;-MMCA.Store.*.Service;-MMCA.Store.*.Contracts, ~54% actual per the step comment), and a second, narrower Application-layer BRANCH floor runs on the same cobertura file in the same build-and-test job: 72.8 over the three module *.Application assemblies (+MMCA.Store.*.Application;-*.Tests), 2 points under the measured 74.8%, with a guard that fails the step when fewer than 3 assemblies are covered so the floor cannot pass vacuously (introduced by Store #168, af66b959), the gate shape ADC runs. A nightly real-broker round-trip tier (MMCA.Store.CrossService.IntegrationTests, Testcontainers RabbitMQ+SQL, cross-service-tests.yml) covers the outbox-to-broker-to-consumer flow the in-process tests only approximate. Held at 9 (not 10): the broker round-trip is non-gating nightly and the SQL integration suite runs only in CI. Evidence: deploy.yml:387-416 (line-floor step; floor 51.6 at :414, self-filter at :412), :418-449 (Application-layer branch-floor step; filter at :438, 3-assembly guard at :441-444, floor 72.8 at :447, measured baseline recorded at :428), :362-375 (the MMCA.Store.CI.slnf test run under coverage collection); arch tests; Common.Testing.E2E |
| 15 | Best Practices & Code Quality | 2 | 4 | 8 | 8/16 | Five analyzers at error + TWAE + CPM; targeted vuln pin; consistent Result pattern; no TODO/HACK/FIXME comment in Source/ (the one TODO hit is a placeholder string literal, UI.Web/Program.cs:112), every hand-written pragma carries an inline reason. Suppression hygiene is documented: every global NoWarn code carries an inline reason (Directory.Build.props:54-68: CS1591 :54-59, S8970 :60-63, S3881 :64-67, global line :68), RMG020 sits in a documented .Application-only group (:105-113), the test-tier suppressions are centralized and no test csproj declares its own NoWarn; NuGetAudit / NuGetAuditMode=all are declared at :80-81 with the accept-an-advisory procedure at :74-79, and no advisory is accepted today (no NuGetAuditSuppress item is declared). The weekly maui-audit.yml covers the MAUI head's vulnerability audit (§32 substance by its own header, :4) and builds the head in Release with analyzers and TreatWarningsAsErrors (maui-audit.yml:207, Sunday cron :37). Held at 8, not 9: the MAUI head is in neither solution filter (MMCA.Store.CI.slnf:24-25), so its analyzer build is a weekly detection with no per-PR leg (the scheduled Release build with analyzers and warnings-as-errors passes); the lever for 9 is not yet identified. Evidence: Directory.Build.props:48-52,148-169; Directory.Packages.props:83-86,95 (the five analyzers), :133-134 (targeted OpenTelemetry.Api vuln pin); .editorconfig:314; deploy.yml:569 (the gating supply-chain job) |
| 16 | AI-Native Application Architecture | 2 | N/A | N/A | N/A | Rubric v2 (ADR-110): N/A, no product feature calls a language model (the workspace's agentic engineering tooling is scored in §33); weight 2 leaves both denominators until a feature does. The Maintainability & Evolvability criteria this number carries under rubric v1 score under §34 (coupling, tech-debt register), §32 (lockstep upgrades) and §33 (onboarding). The lockstep invariant is executable: FrameworkVersionConsistencyTests asserts every MMCA.Common.* pin shares one version and fails the build on a partial sweep, in the CI merge gate. Evidence: Tests/Architecture/MMCA.Store.Architecture.Tests/Governance/FrameworkVersionConsistencyTests.cs; MMCA.Store.CI.slnf:53; Directory.Packages.props:28-53,94,129 |
| 17 | DevOps & Deployment | 2 | 4 | 8 | 8/16 | CI gates (locked restore, analyzers-as-errors Release build, OpenAPI drift, tests, two coverage floors, EF model drift, expand/contract guard) in the required build-and-test check, then a deploy job that needs every gate (deploy.yml:1332) and accepts only e2e-gate as skipped (:1365); two-phase Bicep; OIDC, with the token permission granted only to the jobs that sign in to Azure (:61-64); cost-guard, dr-drill and load-test workflows. MI-SQL is active in production (repo variable USE_MANAGED_IDENTITY_SQL=true, wired at :1418 and folded into the Stage 3 parameters at :1559-1565), so all three services authenticate passwordless through managed identity. The deploy path admits no zero-test production rollout: build-and-test runs the MMCA.Store.CI.slnf unit, architecture and bUnit tier on every PR (deploy.yml:280, test run :362), and branch protection enforces admins with strict up-to-date required checks, so the merged tree is the PR-tested tree. The post-deploy rollback reports what it did: a per-app outcome (:1850,1868) and a counted summary of rolled back, skipped and no-candidate apps (:1876), with a comment that matches the skip-live behavior (:1836-1840). Held at 8, not 9: every merge to main is a production deploy into the only environment (ENVIRONMENT_NAME: prod at deploy.yml:52) under activeRevisionsMode: 'Single' (infra/main.bicep:1996), with no flag, canary or slot; the rollback covers only a failed activation, so a failure caught only by the tier-2 HTTP probes rolls nothing back (the skip-live guard ADR-080 keeps); no what-if runs before azure/arm-deploy (deploy.yml:1661-1666), though the PR's required supply-chain check compiles both templates and fails on any diagnostic output (:577-603) and runs a template-policy gate over the compiled main.bicep (:612-622); and SQL stays dual-auth, with the password admin configured (infra/main.bicep:1097,1102), SQL_ADMIN_PASSWORD passed on every deploy (deploy.yml:1394), and publicNetworkAccess: Enabled plus the AllowAzureServices rule (infra/main.bicep:1100,1140-1147). The what-if and probe-only rollback are closed as over-engineering (Deliberate and accepted in the backlog). Smaller points: the Trivy image scan has gated since 2026-11-04 (a fixable CRITICAL or HIGH finding fails the build-images leg the deploy needs, deploy.yml:1309-1327), and the apps' managed identity and its role grants are bootstrapped outside IaC (infra/DISASTER-RECOVERY.md:93). Evidence: deploy.yml:1332,1365 (gate chain), :1701 (smoke), :1709 (app list), :1850,1868,1876 (rollback report); infra/SQL-MANAGED-IDENTITY.md; ADR-080 |
| 18 | UI Architecture & Components | 3 | 4 | 8 | 12/24 | Code-behind split, @inherits DataGridListPageBase<ProductDTO>, scoped cart service owns data/behavior, reuse of Common.UI primitives. Maturity 4: the container/presentational conventions are machine-enforced pre-merge by UIArchitectureConventionTests (sealed subclass of the shared base, 400-line code-behind cap + 120-line inline @code cap, non-vacuous MinimumCodeBehindFiles guard; largest code-behind is 400 lines, at the cap), running in the MMCA.Store.CI.slnf tier of the required PR check build-and-test, the same mechanism as ADC's M4. Each create page and its detail page's inline editor render one shared field block over one abstract form model (CategoryFormFields, ProductFormFields, CustomerFormFields, each with a bUnit test), so the two forms cannot drift apart. Held at 8, not 9: four code-behinds sit at or near the 400-line cap (OrderDetail.razor.cs 400 lines, at the cap, ProductDetail.razor.cs 397, CatalogProductDetail.razor.cs 393, Checkout.razor.cs 369), and the cap is a size proxy rather than proof of container/presentational purity; the cap stays at 400 by recorded decision (lowering it to 300 is Deliberate and accepted in the backlog); the lever for 9 is not yet identified. Evidence: Tests/Architecture/MMCA.Store.Architecture.Tests/Ui/UIArchitectureConventionTests.cs:9; StoreArchitectureMap.cs:27,35,43; MMCA.Store.CI.slnf:53; deploy.yml:280,362; ProductList.razor.cs:16; CartDrawer.razor:5 |
| 19 | State Management & Data Flow | 3 | 4 | 8 | 12/24 | Single source of truth, scoped (no static cross-user state), unidirectional flow with OnChange+InvokeAsync(StateHasChanged)+Dispose, single-flight token hydrate. Maturity 4: both §19 red flags are machine-enforced pre-merge by StateManagementConventionTests (mutable-static-state reflection scan over the Layer.Ui assemblies with a non-vacuous guard, plus the singleton-*StateService source scan), in the deploy-gating MMCA.Store.CI.slnf; CartStateService is registered TryAddScoped, proving the rule the gate enforces (ADR-094). Drawer visibility goes through the notify path: ICartStateService.cs:57 is getter-only with OpenDrawer/CloseDrawer/ToggleDrawer at :118-124, each notifies at CartStateService.cs:377-397 behind a private set at :83, and CartDrawer.razor:5 binds one-way. The superseded-load generation guard covers all seven detail pages (OrderDetail.razor.cs:169, ProductDetail.razor.cs:109, CatalogProductDetail.razor.cs:122, ShoppingCartDetail.razor.cs:73, CategoryDetail.razor.cs:81, CustomerDetail.razor.cs:83, InventoryItemDetail.razor.cs:67) plus CatalogBrowse.razor.cs and UserDetail.razor.cs:80,93 (the generation guard is the LoadGuard inherited from the Common page base). Held at 8, not 9: there is no client-side staleness or invalidation strategy; no UI entity service opts in to IUiReadCache (ShoppingCartService.cs:18 constructs EntityServiceBase with no read cache), so the rubric's cached-with-invalidation criterion is carried by the server output cache alone; the lever for 9 is not yet identified. The stale-IsDirty red flag is test-checked on create forms: the shared FormsConventionTests base requires a live IsDirtyAccessor on every *Create.razor (Common FormsConventionTestsBase.cs:75-76); detail pages follow the same convention (ProductDetail.razor:12) without a test. Evidence: Tests/Architecture/MMCA.Store.Architecture.Tests/Ui/StateManagementConventionTests.cs:10; Sales.UI/DependencyInjection.cs:38 (TryAddScoped); MMCA.Store.CI.slnf:53; CartStateService.cs:75 (the OnChange publisher); CartButton.razor:67,69 (InvokeAsync(StateHasChanged) + Dispose); Common MMCA.Common.UI.Web/Services/ServerTokenStorageService.cs:60-64,130-148 (the single-flight hydrate is framework code, not Store code) |
| 20 | Design System & UI Consistency | 2 | 4 | 8 | 8/16 | MudBlazor + Common.UI theme/tokens used consistently, shared grid-paging wrapper; the brand-color token convention is CI-enforced by BrandColorTokenTests (sealed subclass at Tests/Architecture/MMCA.Store.Architecture.Tests/Ui/BrandColorTokenTests.cs:10, the one StoreHome stylesheet both UI hosts share embedded into the test assembly at MMCA.Store.Architecture.Tests.csproj:10, in MMCA.Store.CI.slnf:53). No Style=/CellStyle= attribute remains under Source/**/*.razor: the values ride shared semantic classes, the Common-owned .list-search-field and .grid-cell-actions (MMCA.Common.UI/wwwroot/app.css:448,452), Store's own admin-cell classes in Source/Hosts/UI/MMCA.Store.UI.Web/wwwroot/store.css:353-364 (with a comment on why no !important is needed), which the MAUI head loads too (MMCA.Store.UI/wwwroot/index.html:21), Common's .detail-card, or MudBlazor's own d-flex/flex-column/flex-1 utilities; the list pages consume them (CategoryList.razor:59 CellClass="grid-cell-actions"; CustomerList.razor:52; ReviewList.razor:83), and a bUnit fact pins the sweep (Tests/Modules/Catalog/MMCA.Store.Catalog.UI.Tests/Pages/Categories/CategoryListTests.cs:137 asserts the action column renders td.grid-cell-actions), in MMCA.Store.CI.slnf:40, executed by the required build-and-test check (deploy.yml:362). Maturity 4: the token guard and the bUnit pin are both merge gates. Held at 8, not 9: the StoreHome landing stylesheet now draws every colour from the brand tokens in store.css (Catalog.UI/Pages/Home/StoreHome.razor.css:1-4, zero hex literals and zero !important; one stylesheet in Catalog.UI serves both hosts, the MAUI head's UI/Pages/StoreHome.razor:3 wrapping the shared page), so the stated residual is gone; score unchanged pending re-score. Evidence: App.razor:11; BrandColorTokenTests.cs:10; store.css:353-364; Common app.css:448,452; CategoryList.razor:59; CustomerList.razor:52; ReviewList.razor:83; CategoryListTests.cs:137; Catalog.UI/Pages/Home/StoreHome.razor.css:1-4 |
| 21 | Accessibility (a11y) | 3 | 3 | 8 | 9/24 | Strong semantics/ARIA, stated WCAG 2.1 AA, 32 axe scans (23 ScanAsync + 9 ScanGridAsync) over the public, shopper, and Catalog/Sales/Identity admin surfaces plus home in both palettes (dark-palette home scan at AccessibilityTests.cs:518), pinned to real WCAG 2.1 AA tags (AxeOptions.cs:17-24), and the axe suite gates the deploy (the chromium e2e-gate in deploy.yml's needs; the scheduled runs alternate firefox on Monday and webkit on Thursday, e2e.yml:51-52,149-152). Maturity 3, not 4: the rubric pairs axe-in-CI with a recorded manual screen-reader pass, and the ACCESSIBILITY-SCREENREADER-PASS.md results log holds only the placeholder row (:70, header :68-69; the runbook's own :75-76 names a dated row as what lifts the deduction), matching ADC. The e2e-gate is also chromium-only, UI-change-conditioned, and a SKIPPED gate is accepted by deploy (chromium-only at deploy.yml:992, UI-scoped at :989, skipped-tolerance at :1365); the single engine and the UI-scoping are both recorded Actions-minute trade-offs (Deliberate and accepted in the backlog). Keyboard operability is automated on the checkout path: CartDrawerKeyboardTests (sealed subclass of the shared KeyboardOperabilityTestsBase, CartDrawerKeyboardTests.cs:21) checks the skip link and focus indicators on home and catalog plus the cart drawer's modal keyboard contract (Enter opens it and moves focus in, the focus trap holds Tab, Escape closes it and returns focus, :5-11). Held at 8, not 9: keyboard and focus-order coverage stops at that one surface, every grid scan disables aria-input-field-name for the MudBlazor pager combobox (accepted, AxeOptions.cs:35-46), and dark-palette contrast is scanned on one page (:518). Evidence: Tests/E2E/MMCA.Store.E2E.Tests/Workflows/AccessibilityTests.cs:35-589; store-ACCESSIBILITY-SCREENREADER-PASS.md:70 (Website docs-src/guides/; placeholder row only); CartDrawer.razor:12,25-26,47,96-122; deploy.yml:979-996 (e2e-gate job, rationale :981-988, UI-scoping :989, browsers: '["chromium"]' :992), :1332 (e2e-gate in deploy needs), :1365 (a SKIPPED gate is accepted) |
| 22 | Responsive & Cross-Browser | 2 | 4 | 8 | 8/16 | Fluid layouts on the design-system grid with xs/sm/md/lg breakpoints (CatalogBrowse.razor:134), uniform grid-to-mobile-card reflow on all seven admin list pages (six through Common's ListPageShell, ProductList.razor:10,14, with MobileInfiniteScrollList inside it at Common ListPageShell.razor:36, plus OrderList using MobileInfiniteScrollList directly), and a defined, Playwright-verified chromium/firefox/webkit matrix (e2e.yml:149-152). Maturity 4: cross-engine coverage is CI-enforced by the cross-browser-freshness step of the freshness job (deploy.yml:1087-1111, through Common's shared freshness-gate action pinned at :1095), which requires the latest successful E2E (firefox) and E2E (webkit) jobs inside a 10-day window (window-days at :1103); freshness sits in deploy.needs (:1332) and is a hard condition of the deploy job (needs.freshness.result == 'success', :1362), the same mechanism that earns ADC its M4. Mobile layout is verified automatically: PhoneViewportTests sets a 390x844 viewport (PhoneViewportTests.cs:36) and asserts no horizontal overflow (:85-88), and e2e.yml:464 runs the whole E2E project, so it rides the deploy-gating chromium e2e-gate (deploy.yml:979-996). The scheduled non-chromium legs are continue-on-error (e2e.yml:159; crons :51-52), so the gate proves recency rather than that this exact tree passes on those engines, and a workflow_dispatch break-glass can skip it with a justification (input declared at deploy.yml:32-39); both are priced caveats in the backlog (a TD under #22 and the Deliberate and accepted entry), the same treatment ADC's row carries, not a cap. Held at 8, not 9, on partial criteria: density is fixed by ListPageShell's Dense default (Common ListPageShell.razor.cs:112, plus OrderList.razor:89) with no user-selectable comfortable/compact option, the mobile-card delete button is Size.Small with no coarse-pointer/touch-target CSS (ProductList.razor:38), and the supported browser matrix is stated only at the Common level (common-RESPONSIVE.md:57). The density toggle and touch-target CSS are closed as over-engineering (Deliberate and accepted in the backlog); the lever for 9 is not yet identified. Evidence: deploy.yml:1087,1095,1103,1332,1362 (cross-browser-freshness), :979-996 (e2e-gate); e2e.yml:51-52,149-152,159,464; PhoneViewportTests.cs:36,85-88; ProductList.razor:10,14,38; ListPageShell.razor.cs:112; CatalogBrowse.razor:134 |
| 23 | Front-End Performance | 2 | 4 | 8 | 8/16 | Server paging/debounce/@key/output-cache on admin grids; the public CatalogBrowse uses server-side paging (GetPagedAsync + MudPagination) and cart enrichment resolves names via the targeted by-variant-id batch lookup. Maturity 4: the Core Web Vitals budgets are HARD assertions (WebVitalsTests.cs:60-63 measures against a WebVitalsBudget and :73 asserts within it; the per-metric assertion body lives in Common MMCA.Common.Testing.E2E/Infrastructure/WebVitalsCollector.cs:137, no soft mode) running unfiltered inside the deploy-gating chromium e2e-gate (deploy.yml:1332 needs), the evidence shape ADC credits at M4; this category's enforcement is per-deploy and independent of §12's k6 cadence. Evidence: Tests/E2E/MMCA.Store.E2E.Tests/Workflows/WebVitalsTests.cs:60-63,73; deploy.yml:979-996,1332; CatalogBrowse.razor.cs; CartStateService.cs |
| 24 | Forms, Validation & UX Safety | 2 | 4 | 8 | 8/16 | Unsaved-changes guard with current-state accessor (9 sites: 8 pages plus the ReviewEditor component), double-submit blocked, all states designed, destructive confirm, abandoned-payment recovery. Maturity 4: the four admin create forms' guard/dirty/validated-MudForm/Required markers are machine-enforced by the CI-gated FormsConventionTests (MinimumCreateForms=4), matching ADC on the same evidence; the four create forms source their field rules from a DataAnnotations form model through Common's ModelValidation bridge. Held at 8: client validation is DataAnnotations-level with per-field parity on the email and password rules, not full FluentValidation parity with the server rule set, and no executable check ties the client rules to the server rules; full client parity is not pursued because it would duplicate the server rule set (Deliberate and accepted in the backlog). Evidence: Tests/Architecture/MMCA.Store.Architecture.Tests/Ui/FormsConventionTests.cs; MMCA.Store.CI.slnf:53; ProductCreate.razor:13,34,41; CartStateService.cs:302 (checkout idempotency key against double-submit) |
| 25 | Navigation & Information Arch | 2 | 3 | 8 | 6/16 | Bookmarkable typed route constants (CatalogRoutePaths), server-enforced [Authorize]/AuthorizeView (not UI-only) behind a fallback policy, 404 and 403 handled in the shell (Common Routes.razor:13,48), breadcrumbs on detail and create pages, catalog search state kept in the URL (CatalogBrowse.razor.cs:74-86), and an SSR session cookie so deep links and F5 do not bounce. Role-guard regression is CI-gated by the three sealed per-module *RouteAuthorizationTests, which govern all 19 Admin-gated pages (CatalogRouteAuthorizationTests.cs:29 floor 3, SalesRouteAuthorizationTests.cs:32 floor 2 plus the shared-/orders not-admin-gated guard at :35, and Identity at IdentityRouteAuthorizationTests.cs:24); AnonymousEndpointTests.cs:127 requires every routable page to declare its authorization decision and FallbackAuthorizationTests.cs:61 pins the host fallback policy; all run in the required build-and-test check (deploy.yml:362). The framework notification pages are hidden whenever no notification UI module is registered (Common NotificationPageGate.cs:26). Maturity 3: the stated residual is gone; score unchanged pending re-score. The documented navigation design is now enforced (MMCA.Store #304): NavigationContractTests reads the Route Contract table in store-NavigationFlow.md (:246-286) and fails on a routable page with no row, a row with no page, or an Access cell that differs from the page's guard, reading pages from source so a head-owned page such as the MAUI head's anonymous /settings/device (UI/Pages/DeviceSettings.razor:1,5, menu item MauiUIModule.cs:29) counts too (Api/NavigationContractTests.cs:21-41), and NavItemGuardContractTests checks every module's menu items against the guard of the page each one opens (Api/NavItemGuardContractTests.cs:18), so menu-to-page role parity is no longer tested for Identity only (IdentityUIModuleTests.cs:28). Both run in the merge-gating architecture tier (MMCA.Store.CI.slnf:53), and build-and-test fetches the published doc before the test run (deploy.yml:350-360). Maturity 4 needs automatic enforcement (ArchitectureEvaluationCriteria.md:39). Held at 8 on implementation: breadcrumb and 404 wayfinding are not fitness-tested, and the Identity route test keeps the shared base floor of 1 while governing 7 pages (Common RouteAuthorizationTestsBase.cs:47). The nine detail routes are typed {Id:int} with an int Id parameter (ProductDetail.razor:1, ProductDetail.razor.cs:43), so a malformed id answers with the router's not-found page, and the Roles menu item names the Admin role its page requires (IdentityUIModule.cs:28, RoleList.razor:2). Evidence: ProductList.razor:4; Tests/Modules/{Catalog,Sales,Identity}/MMCA.Store.*.UI.Tests/*RouteAuthorizationTests.cs in MMCA.Store.CI.slnf:40,46,52; UI.Web/Program.cs:124 (Common.UI assembly routed) |
| 26 | Front-End Security | 3 | 4 | 9 | 12/27 | Access token in-memory, refresh token in HttpOnly cookie (no localStorage), hardened origin-pinned CSP (no unsafe-inline script-src in prod, frame-ancestors none), runtime /client-config fetch (no secrets in bundle), UseAuthenticatedNoStore. Held at 9 on the basis recorded in ADC's §26 row: the CSP comes from the same Common provider, whose deliberately permissive style-src 'unsafe-inline' and img-src https: directives sit at BlazorCspPolicyProvider.cs:103-104. Evidence (the implementation lives in Common and is consumed byte-identically here): Common MMCA.Common.UI.Web/Services/ServerTokenStorageService.cs:10-13; Common MMCA.Common.UI/Services/Auth/Tokens/WasmTokenStorageService.cs; Common MMCA.Common.UI.Web/Security/BlazorCspPolicyProvider.cs:102 (script-src, 'unsafe-inline' in Development only), :110 (frame-ancestors 'none') |
| 27 | Internationalization (i18n) | 1 | 4 | 8 | 4/8 | Full ADR-027 adoption (supersedes ADR-011): en-US + es .resx pairs across all three module UIs, the API error resources, both StoreHome hosts, and the three UI modules' nav items (54 base / 54 .es siblings), UseCommonRequestLocalization (run by Common's UseMmcaBlazorWebPipeline, UI.Web/Program.cs:92, at MMCA.Common .../BlazorWebHostExtensions.cs:201, registering both supported cultures and UI cultures, MMCA.Common .../WebApplicationExtensions.cs:89-90) + MapCultureEndpoint (BlazorWebHostExtensions.cs:211), per-module AddErrorResources (Identity.Service/Program.cs:114), User.PreferredCulture + AddUserPreferences migration. No hard-coded literal ships: snackbars use whole-sentence page keys (including the cart/checkout/Stripe strings; raw {ex.Message} never surfaces), breadcrumb labels localize from Breadcrumb.* keys built in OnInitialized, nav menus localize via NavItem.TitleResource, and MudBlazor built-in chrome localizes via the framework's ResxMudLocalizer. Money formatting is culture-aware: MoneyExtensions.cs resolves the symbol from the price's own currency (MMCA.Common .../MMCA.Common.UI/Extensions/MoneyExtensions.cs:18-20,54-59) and formats under culture ?? CultureInfo.CurrentCulture (:54, :90), inside the v1.318.0 pin (Directory.Packages.props:28); dates and ratings also format under CurrentCulture. The Identity error-code translations are pinned by IdentityErrorResourcesTests (a known code resolves to Spanish under es, an unknown code falls back to the caller's English message, Tests/Modules/Identity/MMCA.Store.Identity.API.Tests/Localization/IdentityErrorResourcesTests.cs:15). Maturity 4, doubly gated: both arch gates run un-skipped with live thresholds (TranslationCompletenessTests.cs:17 MinimumBaseResources=25, LocalizedTextConventionTests.cs:18 MinimumScannedFiles=40) in the required build-and-test check via MMCA.Store.CI.slnf:53 + deploy.yml:280, and the pseudo-loc E2E suite rides the deploy-gating e2e-gate (job deploy.yml:979, chromium-only :992, in deploy needs at :1332; e2e.yml:464 runs the project unfiltered): PseudoLocalizationTests activates qps-Ploc via the production /culture/set cookie mechanism and asserts the [!! sentinel, the no-horizontal-overflow expression, and a per-page en-US leak probe over /, /catalog, and /login (Tests/E2E/MMCA.Store.E2E.Tests/Workflows/PseudoLocalizationTests.cs:43-47). Pluralization is mechanism-driven: count strings resolve through Common's StringLocalizerPluralExtensions.cs:40 with .One/.Other keys (ProductReviewsPanel.resx:9-12, CatalogBrowse.resx:31-32), no (s) key remains in any Store .resx, the Spanish plural values carry their accent (CartDrawer.es.resx:9-10,21-22, ShoppingCartList.es.resx:11-12), and a SpanishAccentTests rule guards the accents in the architecture tier (Governance/SpanishAccentTests.cs:8). Held at 8, not 9: layout tolerance is proven on three public pages (PseudoLocalizationTests.cs:43-47), with no authenticated surface and no RTL locale; the lever for 9 is not yet identified. Evidence: Tests/Architecture/MMCA.Store.Architecture.Tests/Ui/{TranslationCompletenessTests.cs,LocalizedTextConventionTests.cs}; Sales.UI/.../CartDrawer.razor.cs + OrderDetail.razor.cs (whole-sentence Snackbar.* keys); CatalogUIModule.cs (TitleResource + resx pair); CatalogBrowse.CardFormatting.razor.cs:55-56,85-86 (price display) |
| 28 | Front-End Testing & Quality | 3 | 4 | 8 | 12/24 | bUnit .UI.Tests gate the deploy (CI.slnf), broad state-coverage component tests (loading/empty/error/edge), page-level render/parameter/event tests, shared Common.Testing.E2E, and the Playwright suite gates the deploy (chromium e2e-gate; firefox/webkit stay advisory on the alternating weekly scheduled runs, e2e.yml:51-52,159). bUnit breadth is 487 [Fact]s across the 77 bUnit test files (files under Tests/Modules/*/*.UI.Tests that reference bUnit and hold a fact). Held at 8: no markup or visual-regression tier exists. Evidence: Tests/Modules/{Catalog,Sales,Identity}/MMCA.Store.*.UI.Tests; deploy.yml (e2e-gate in deploy needs); e2e.yml (workflow_call + browsers input) |
| 29 | Resilience & Business Continuity | 3 | 4 | 9 | 12/27 | RTO/RPO per scenario, PITR(7d geo-redundant)+LTR, a drilled restore (recorded PASS 1.3 to 3.6 min on the three live databases; the 28.9-min row is the retired MMCAStore database), SLO alerts, post-deploy smoke then rollback, single-region risk explicitly accepted. Maturity 4: a dr-freshness step of the freshness job, which is in deploy.needs, fails the deploy when the last successful dr-drill is stale, backed by a weekly dr-drill.yml cron; the CI-gated GracefulShutdownTests in MMCA.Store.Gateway.Tests covers graceful shutdown. Held at 9, not 10: the DISASTER-RECOVERY.md drill-history table (:213-218, last rows dated 2026-07-28 at :216-218) lags the weekly dr-drill.yml runs that satisfy dr-freshness, a documentation-currency gap. Evidence: .github/workflows/deploy.yml:1019 (the dr-freshness step of the freshness job), :1332 (freshness in deploy.needs), :1362 (its success condition); .github/workflows/dr-drill.yml:33 (weekly cron), :56 (60-minute job timeout); Tests/Hosts/MMCA.Store.Gateway.Tests/GracefulShutdownTests.cs; infra/DISASTER-RECOVERY.md:213-218 (drill-history table, the live-database PASS rows at :216-218, the retired-database 28.9-min row at :215) |
| 30 | Compliance, Privacy & Governance | 2 | 4 | 8 | 8/16 | Real erasure path (Delete+Anonymize in one UoW, ADR-005), data export, residency + PII enforced by fitness functions, auto-stamped audit fields. The personal-data inventory is executable: PRIVACY.md section 12 lists every [Pii] member with its purpose, lawful basis and retention (PRIVACY.md:121-125, aligned with the policy text), and PiiInventoryTests (sealed subclass of the shared base, Tests/Architecture/MMCA.Store.Architecture.Tests/Privacy/PiiInventoryTests.cs:13) checks it in the merge-gating architecture tier. Held at 8: no consent capture exists in Source, and the retention purge for business data is only partly evidenced; the data-subject-rights surface has a UI, the Profile "Your data" card with export and self-service delete (MMCA.Store/Source/Modules/Identity/MMCA.Store.Identity.UI/Pages/Users/Profile/YourDataCard.razor, mounted at Profile.razor:127). Evidence: DeleteUserHandler.cs:56 (OnAfterSoftDeleteAsync); Customer.cs:28 (IAnonymizable), User.cs:30 (IErasableUser); Governance/DataResidencyTests.cs; PRIVACY.md:58-90 |
| 31 | Cost Efficiency / FinOps | 2 | 4 | 8 | 8/16 | Right-sized Basic per-service DBs, automated surge-drift guard, IaC budget + alerts, telemetry span filtering, resource tags. Maturity 4: cost-guard is a workflow_call job in deploy.needs (deploy.yml:950, :1332) that must be exactly success (:1361), plus the Monday cron (cost-guard.yml:21). The SQL half of the guard reads both the tier and the service objective and accepts only Basic or Standard S0 (cost-guard.yml:66-76, applied at :111), so a Standard database scaled up to S1 or above (an S3 surge, say) reads as drift; the Basic-or-Standard window itself is the one ADR-081 sanctions for Store (introduced by Store #168, af66b959). The IaC cost posture: all five container apps at 0.25 vCPU / 0.5 Gi (infra/main.bicep:2023,2233,2378,2545,2661), 25% head-based trace sampling (:254-257), metric export at 300s (:321-324), the Gateway's Yarp log category held at Warning so the two per-request forwarder lines stay out of ContainerAppConsoleLogs (:276-279, applied in the Gateway env at :2552), the legacy MMCAStore database archived to a bacpac and absent from IaC (:1243-1250), Log Analytics at 30-day retention (foundation.bicep:36) with a 3 GB/day ingestion cap (:56-58, rationale :37-55), and a daily ACR purge task with a buildcache-only second step (:132, :135). Spend is attributable per service: resources carry the uniform commonTags set (costCenter: 'store', main.bicep:165-171), and each container app and service database adds a per-service service tag (:1271 databases, :1980 identity, :2188 catalog, :2321 sales, :2501 gateway, :2630 ui). Held at 8, not 9: the surge guard is read-only (cost-guard.yml:7 "never mutates anything"; :118 prints a manual reset), so the rubric's automated-or-scheduled revert for reversible scale events is unmet in its exact terms (the identical basis holding ADC's §31 at I8); the read-only guard is the recorded posture, because a scheduled revert would act on production unwatched (Deliberate and accepted in the backlog); and the budget is whole-RG with no tag filter (main.bicep:1054-1082). Evidence: cost-guard.yml:7,21,66-76,111,118; deploy.yml:950,1332,1361; infra/main.bicep:125 (alert email param), :143 (monthlyBudgetAmount), :165-171 (tags), :1054-1082 (budget, 80% actual / 100% forecast), :2023; infra/foundation.bicep:36,56-58,132,135 |
| 32 | Dependency & Supply-Chain | 2 | 4 | 9 | 8/18 | Vulnerability auditing is CI-gated twice: NuGetAudit raises advisory warnings at restore and TreatWarningsAsErrors promotes them to errors (failing build-and-test and every Docker image build), and the supply-chain job's suppress-aware audit gates (exit 1 on any non-suppressed advisory); an accepted advisory is a dated NuGetAuditSuppress item (procedure at Directory.Build.props:74-79), and none is accepted today (no NuGetAuditSuppress item is declared). Strong provenance: 57 committed packages.lock.json + CPM + lockstep Common + no MassTransit pin at all (the broker transports are MMCA.Common code, Directory.Packages.props:113-114) + auditSources config, and every deploy.yml restore runs --locked-mode (deploy.yml:308,634,771,796; the cross-service-tests, maui-audit and e2e workflows restore without it) so committed-lock drift fails the build. The SBOM is a hard gate (43d733f); no license report runs (it was dropped from the supply-chain job in Store #197, 07add203). The MAUI graph is covered by maui-audit.yml: a weekly (Sundays 06:00 UTC, :37) suppress-aware dotnet list package --vulnerable over MMCA.Store.UI on net10.0-android that exits 1 on any non-suppressed advisory (maui-audit.yml:118-181), the one graph the gating supply-chain job cannot see because the MAUI head is excluded from MMCA.Store.CI.slnf; it is a scheduled audit, not a deploy gate, the Apple TFMs are uncovered on a Linux runner (:21-27), and it mirrors ADC's maui-audit.yml (TD-18). No section 32 mechanism behind ADC's I9 is missing here (identical gating audit/SBOM, the same NuGetAudit / NuGetAuditMode pair and lock config); the stated below-10 residual (a transitive-only MassTransit pin) is gone, since no MassTransit package is pinned (Directory.Packages.props:113-114); score unchanged pending re-score. Evidence: deploy.yml:308,634,771,796 (locked-mode restores), :569 (supply-chain); Directory.Build.props:74-81; nuget.config |
| 33 | Developer Experience & Inner Loop | 2 | 4 | 8 | 8/16 | Aspire one-command local stack (SQL/Redis/RabbitMQ/MailDev/Stripe), cross-repo local.props, fast CI slnf, editorconfig parity, local→Azure parity. Held at 8: the local broker defaults to RabbitMQ with the Service Bus emulator opt-in (STORE_BROKER=servicebus, AGENTS.md:44), the integration tiers need an external SQL Server, and the Service Bus emulator tier gates through recency rather than per PR. Evidence: AGENTS.md:9-78 (imported by CLAUDE.md); local.props.template; MMCA.Store.CI.slnf |
| 34 | Architecture Governance & Docs | 2 | 4 | 9 | 8/18 | Exemplary automated conformance (76 arch fitness-test classes over shared bases + Store-local guards; TokenPermissionGrantsTests now sits outside the architecture tier in both repos, Store's at Tests/Services/MMCA.Store.Services.Tests/Authorization/TokenPermissionGrantsTests.cs beside ADC's in MMCA.ADC.Services.Tests, and Store carries ADC's CostTagConventionTests, InlineStyleTests and SqlAuditConventionTests too (Governance/CostTagConventionTests.cs, Ui/InlineStyleTests.cs, Governance/SqlAuditConventionTests.cs); both repos run MessageBusBackpressureTests) + a thorough current CLAUDE.md + ADRs canonical in ../adr/, count/range owned by ../adr/README.md (MMCA.Common/FACTS.md:91-94 disclaims owning the ADR range; the framework-wide fitness-function figures are at MMCA.Common/FACTS.md:97-102), completed by the two-axis scorecard + RemediationBacklog.md (the single per-repo ledger), both committed and kept current per release. Evidence: Tests/Architecture/MMCA.Store.Architecture.Tests/ (78 tracked .cs files: 76 test classes + StoreArchitectureMap.cs + GlobalUsings.cs); CLAUDE.md; committed ArchitectureScorecard.md + RemediationBacklog.md; ADRs in ../adr/ (indexed by ../adr/README.md) |
Weighted = Maturity·weight / Implementation·weight.
Scoring notes
- Two axes per category: Maturity (0-4, process/governance) and Implementation (0-10, substance/execution). The indices are computed deterministically from the table: every non-N/A category is in both denominators.
- N/A (excluded from denominators): §16 AI-Native Application Architecture (rubric v2, ADR-110: no product feature calls a model); its weight 2 leaves both denominators, Σweight 79.
- §10 is Messaging & Integration Architecture under rubric v2, at the v2 default weight 3.
- §27 is scored: ADR-027 (en-US + es with a CI-gated translation-completeness fitness function) supersedes ADR-011's single-locale exclusion.
- §32 weight = 2 (default; 3 only for the published framework MMCA.Common).
- The implementation index reads directly against 100%: a 10 is awardable for an almost perfect implementation. The denominators stay ×4 and ×10 so the trend line stays comparable across re-scores.
- Axis calibration: a new CI gate is an enforcement gain and scores on the maturity axis, not the implementation axis; a CI-cadence change is not a substance regression; documentation drift scores on the implementation axis.
- Axis-gap reading: sections 10, 12, 21 and 25 are M3/I8, strong substance with enforcement short of automatic, which is the healthy direction of the gap. The maturity-over-implementation gap sits in the 17 categories at M4/I8, where enforcement is automatic but substance is short of 9.
Cross-repo comparison
How Store relates to MMCA.Common (the framework) and MMCA.ADC (the sibling consumer) is maintained once, for all three repos, in the workspace-internal Docs/Architecture/CrossRepoComparison.md (not published).