Repository navigation
v2: consistency SLOs — orders final within 5 minutes, none stuck (storefront v2 M6) - #131
Merged
Merged
Conversation
…refront v2 M6) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Rendered diff (as Argo CD renders: kustomize / Helm, against
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
consistency-*SLOs reserved inv2/app.yaml(#127): design §0's "eventual consistency" promise — every accepted order reaches CONFIRMED or CANCELLED in time — as SLOs on order's state-machine metrics (api-factory-runtime).consistency-final-5mfactory_sm_completion_seconds{app="order", machine="OrderSaga"}≤ 300s (created → final; the bucket edge exists)consistency-none-stuckstorefront:order_saga_none_stuck_5m:bool=max by (namespace)(factory_sm_oldest_in_state_seconds{app="order", machine="OrderSaga"}) < bool 300(v2/base/consistency.yaml)Why two: the latency SLO only sees orders that finished. An order stuck in CHARGING (no deadline there by design) never finishes, so only the oldest-in-state gauge sees it.
No-oversell / no-double-charge SLOs (design §11.1) are deliberately not metrics: the databases make them structurally impossible (
CHECK (available >= 0),paymentskeyed byorder_id), so a gauge could only ever be 1. They are proven by storefrontscripts/m6/check.py(SQL: stock books balance, one succeeded payment per confirmed order = its total, no charge kept for a cancelled order) in the M6 experiments.Rendered locally (
render.py render v2-slo-lab): two newServiceLevelObjectives,v2-consistency-final-5mandv2-consistency-none-stuck;v2-labgains onePrometheusRule(consistency). Lab only (notifies nobody). The M6 fault experiments allow pages fromErrorBudgetBurn{namespace="v2-lab"}(these will burn during a 10-minute outage, as predicted) and holdv2-browse-availability/v2-place-order-availabilityquiet.🤖 Generated with Claude Code