> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lumenwipe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Service levels

> The indicators the LumenWipe API and close flow are measured by, the objectives proposed for them, the error-budget policy and the burn-rate alerts.

This page defines what "healthy" means for the LumenWipe API and the close flow. It lists each service level indicator (SLI), how it is measured, the objective (SLO) proposed for it, what happens as the error budget is spent, and when an alert fires.

## Status

* **Every target on this page is a proposal.** A target is confirmed or changed only after 30 days of measurement exist for its indicator.
* **No figure is published before then.** No attainment, uptime or latency number for these indicators appears in public until 30 days of measurement back it. The probe history on the status page is not one of these indicators: each row there reports how often one outside probe passed since it was created ([status page probes](https://docs.lumenwipe.com/monitoring-plan.md#status-page-probes)).
* **The burn-rate alerts are defined, not automated.** The API has no metrics pipeline yet (metrics and tracing are deferred). Until it does, the indicators are read from the sources named below, and none of them pages anyone. The monitors that do alert today are listed in the [monitoring plan](https://docs.lumenwipe.com/monitoring-plan.md).

Every objective is evaluated over a **28-day rolling window**.

## What one instance and one provider support

The API runs as a single Cloud Run service in one region, with one instance at most, and whether an idle instance is kept warm is set by `MIN_INSTANCES` in `scripts/deploy-api.sh`. A regional incident takes the API down, and so does a cold start while none is kept, with no second instance or region to take over. RPC and Horizon-compatible reads can fail over along an ordered provider list (see [Provider failover](https://docs.lumenwipe.com/architecture.md#provider-failover)), but a request stays on the provider it pinned, and the API refuses with a retryable `503` once the list is exhausted. DeFi position detection, Soroban token quotes and the explorer each depend on a single provider. Over 28 days, 99.9 percent availability allows 40 minutes of total downtime, which this setup cannot honestly promise. The starting availability target is 99.5 percent, which allows about 3 hours 22 minutes. The instance takes 8 requests in flight at most, a limit measured against the testnet providers, which refuse beyond it (see [Infrastructure and deployment](https://docs.lumenwipe.com/architecture.md#15-infrastructure-and-deployment)). Raising the target first needs a kept-warm instance, a concurrency limit measured on mainnet too, and a second provider for the reads that have only one today.

## Indicators and proposed objectives

| SLI | Definition | Measurement source | Proposed objective |
| - | - | - | - |
| API availability | The share of requests answered with a status below 500. Client errors (4xx) and rate-limit refusals (429) are left out of both sides: they are answers about the request, not failures of the service. `/health` and every route under `/health/` are left out: they are checks, and `/health/user-path` answers `503` to report a failed check. | The access log line the API writes for every request (`status`, `route`), in Cloud Logging. See [Logging and privacy](https://docs.lumenwipe.com/reference/logging-and-privacy.md). | 99.5 percent |
| Analyze latency | The share of successful `GET /v1/{network}/account/{address}` responses answered within the analyze threshold. | `latencyMs` on the same access log line. | 95 percent within the threshold. The threshold is set from the lab's measured baseline once 30 days of production data exist (see [Latency baseline](#latency-baseline)). |
| Close completion | The share of closes that end either done (the account merged) or at a blocker shown to the user, with no failure shown after a transaction confirmed. A transaction whose outcome is not known yet (a `504 confirmation_timeout`, or the SDK's `CloseOutcomeUnknownError`) is still confirming: the close looks it up by hash, and it counts as neither good nor bad until that lookup settles it. | Today only the nightly testnet end-to-end run (`.github/workflows/e2e-nightly.yml`), which closes funded testnet accounts through the web app. A production measure needs client-side reporting, which does not exist yet. | 99 percent |
| Submit confirmation | The share of submitted transactions confirmed within 90 seconds of their first submission. Submits the network rejects (`422 submit_rejected`) and other client errors are left out. | The access log lines for `POST /v1/{network}/submit`. One submit spends at most 35 seconds, so a `504 confirmation_timeout` is counted as not confirmed in time. That overstates the misses, because a later lookup can still find the transaction within 90 seconds, and it will until each transaction's own timing is recorded. | 99 percent |
| Monitor freshness | The share of time the newest successful run of each scheduled monitor is recent enough: within 75 minutes for the hourly service-account checks and registry comparison, and within 25 hours for the daily provider contract check. These are targets and have not been measured; the hourly one is not met today (see below). | The run history of `.github/workflows/onchain-monitors.yml` and `.github/workflows/provider-contract.yml`. | 99 percent |

The freshness limits follow the cadence the monitors are scheduled at: once an hour, or once a day. The extra 15 minutes and 1 hour leave room for scheduler delay. GitHub treats schedules as best effort. Measured on 2026-11-27, the hourly `on-chain monitors` workflow ran for 21 percent of its expected hourly slots between 2026-10-20 and 2026-11-27 (191 runs of about 910; median gap 4.7 hours, 90th percentile 7.8 hours, longest 10.5 hours), while the daily workflows ran on essentially every day. So the 75 minute target is a target, not a result. An external scheduler is planned to start the hourly workflow itself; it does not exist yet, and the figure stays a target until runs are measured after it does. A 20-minute limit would need a monitor that runs every 15 minutes or more often, and none is scheduled that way. As [#278](https://github.com/LumenWipe/lumenwipe/issues/278) adds monitors, each is added here at its own cadence.

## Error-budget policy

The error budget is the share of the window an objective allows to fail: 0.5 percent of requests for availability, 5 percent of analyses for latency, and so on. Every failure spends it, including a dependency outage that fails closed.

* **Half the budget spent.** Changes that put the indicator at risk, such as a new close operation, a provider change or a deploy configuration change, ship one at a time, each with its rollback written down. The maintainers look at what spent the budget and open an issue for each cause they find.
* **The whole budget spent.** Only changes that restore the indicator, and security fixes, ship until the 28-day spend falls back under the budget. Any single event that spent at least a fifth of the budget gets a written review. If a provider outage spent the budget, the fix is on the provider side (a second provider, or a different one), not a freeze on unrelated work.

## Burn-rate alerts

A burn rate is how fast the budget is being spent: a rate of 1 spends exactly the whole budget over the 28 days. Each alert needs both of its windows over the rate, so it fires quickly and stops once the problem ends.

| Alert | Burn rate | Long window | Short window | Budget spent when it fires | Goes to |
| - | - | - | - | - | - |
| Fast burn | 14.4 | 1 hour | 5 minutes | About 2 percent | A page: a post that pings `@everyone` in the maintainers' channel |
| Slow burn | 6 | 6 hours | 30 minutes | About 5 percent | A ticket: an assigned GitHub issue and one post, with no ping, in the maintainers' channel |
| Slow burn | 1 | 3 days | 6 hours | About 11 percent | A ticket, as above |

The maintainers' channel is the one the monitor workflows already post their findings to, through the `DISCORD_MONITORS_WEBHOOK_URL` repository secret. A ping there is already reserved for findings that need someone at once (see [the monitoring plan](https://docs.lumenwipe.com/monitoring-plan.md#how-the-live-ones-run)). A separate alert channel was considered and not built ([#486](https://github.com/LumenWipe/lumenwipe/issues/486)), because this one already reaches the team.

**A dependency outage that fails closed never pages.** When the API refuses with `503 service_unavailable` because a provider is unavailable or too slow, nothing unsafe was built, and paging a person cannot bring the provider back. That spend still counts against the budget, but at any burn rate it opens a ticket and nothing more.

## Latency baseline

The baseline for the analyze threshold comes from the [latency lab](https://github.com/LumenWipe/lumenwipe/blob/main/tools/lab/README.md). The lab measures cold and warm p50 and p95 for each scenario, against the production API (black box) and against a local API process that reads the same public providers (white box). A local white-box run has been recorded. The production black-box run is pending a measured run. Lab results are kept outside this repository and are not published here. The analyze threshold is set from them once 30 days of production data exist to check them against.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.