Skip to content

Service Level Objectives (SLOs) πŸ“Š STABLE

Read the objectives from ops/slo.yaml, validate a metrics snapshot with the gate script, and treat a breach as an escalation trigger.

Admin guide Β· SLO runbook

When to use Before you start Steps Verify Roll back
Deciding whether a regression is a breach Snapshot JSON, gate script available Read objectives, run gate, inspect result Gate passes or breach is recorded Restore prior baseline or config

When to use

Use this runbook when a performance regression is reported or a release must prove it stays inside its budget.

Before you start

  • ops/slo.yaml is the single source of truth for objectives, targets, burn windows and owner. The dashboard and the gate both read it; a number in prose that disagrees with it is wrong.
  • scripts/check_slo.py is the gate: it takes a metrics snapshot and exits non-zero when a budget is breached. The cost block, when present, is computed from tokens and the price table, not self-reported.
  • Burn windows are 1 h, 6 h and 3 d: fast 14.4x and medium 6x page, slow 1x opens a ticket.
  • "Provisional" means the target is recorded, not guaranteed. Verify against a snapshot before making a claim.

Steps

# 1. Read the objectives and their sources from the authority file.
sed -n '1,110p' ops/slo.yaml

# 2. Inspect the gate's accepted snapshot shape.
python3 scripts/check_slo.py --help

# 3. Validate a snapshot produced by a load run.
python3 scripts/check_slo.py --snapshot /tmp/snapshot.json

# 4. Machine-readable output for a dashboard or a nightly report.
python3 scripts/check_slo.py --snapshot /tmp/snapshot.json --json

# 5. Prove the checker itself fails closed with a deliberately breached value.
python3 scripts/check_slo.py --self-test

Status: provisional targets

The targets below mirror ops/slo.yaml; the file is the authority if they drift.

Objective Source metric Threshold / target
api_p95 rest.api_ms p95 ≀ 500 ms, target 0.95
error_rate turn.error_pct target 0.99
first_token_p95 chat.first_token_ms p95 ≀ 2000 ms, target 0.95
answer_p95 chat.complete_ms p95 ≀ 15000 ms, target 0.95
ws_handshake ws.unexpected_disconnect_pct target 0.99
tool_call_p95 chat.tool_call_ms p95 ≀ 3000 ms, target 0.95
queue_p95 queue.wait_ms p95 ≀ 2500 ms, target 0.95
db_p95 dep.db_ms p95 ≀ 100 ms, target 0.95

Objective names and metric names

An objective id is the dashboard name; source is the snapshot metric name. They are not always identical (for example error_rate measures turn.error_pct).

Measurement points

Measurements come from the load adapter and the runtime metrics tables: ops_request_metrics, llm_metrics and the queue and handshake counters. A snapshot is evidence for the window it covers.

Cost model

When a snapshot includes a cost block, the gate computes cost per conversation from token counts and the price table in ops/slo.yaml. A self-reported cost value is not accepted.

Load and soak profiles

Use the load profiles in the repository's load tooling; record the profile name and window with the snapshot. A short synthetic run is not a soak test.

How the gate works

The gate expands each objective into a budget: latency objectives compare p95 against threshold_ms, rate objectives compare a bad-event percentage against (1 - target) * 100. A snapshot that breaches any budget exits non-zero.

What a breach means

A breach pages the owner named in ops/slo.yaml and links the runbook named for that objective. It is not a reason to edit the target; fix the regression or record an approved change to the objective.

Office large-file memory admission (#2530 / #2531)

Typed refusals

A large office file can be refused with a typed reason rather than an opaque failure. Read the refusal type from the source before documenting a message.

Cgroup-aware admission

Admission can depend on the container's memory limit. Read the implementation for the current rule; do not invent a fixed file-size threshold.

Synthetic corpus and the RSS ceiling gate

A synthetic corpus and an RSS ceiling are used to test the admission path. The observed result belongs in the test record.

Runtime evidence: UNVERIFIED

No runtime evidence for this behaviour is recorded in this page. Treat it as a code-level contract until a live measurement is attached.

Verify

Check Command / surface Pass condition
Authority ops/slo.yaml objective table matches the file
Gate python3 scripts/check_slo.py --snapshot ... exit 0 for an in-budget snapshot
Fail-closed python3 scripts/check_slo.py --self-test breached snapshot exits non-zero
Ownership ops/slo.yaml owner on-call role named
Runbook link objective runbook field points to the matching runbook

Roll back

πŸ”΄ Restore the prior baseline snapshot or objective file from version control and re-run the gate. Changing a target to make a breach disappear is not a rollback; it is a policy change that needs approval.