# What a report run keeps, and who can open it

Why a saved view answers again each time it opens, why a report run keeps one answer, and what decides what each viewer sees.

Source: https://tokentriage.com/docs/concepts/report-snapshots-and-access

---
import Callout from '../../../components/Callout.astro';
import NextSteps from '../../../components/NextSteps.astro';

On Monday you send a colleague a completion rate for last week. On Wednesday they open it and
want to know whether they are looking at Monday's number or today's. A saved view and a report
run give opposite answers to that question, and knowing which one you shared tells you what the
number means.

A saved view is a question. A report run is one answer to that question, kept with the window it
covered and the fingerprint of what it read. This page explains the difference, then what decides
what a person sees when they open a report.

## A saved view asks again; a report run keeps its answer

Opening a [saved view](/docs/build/save-gateway-views) re-queries the gateway's metrics on behalf
of whoever opened it, under that person's current access. A view with a relative window, such as
"last 24 hours", resolves that window against the moment it opens. Two people can open the same
view a minute apart and see different numbers, and both are correct for the moment and the scope
they asked from.

A report run freezes one bounded answer. When you create a report from a view, the run copies the
view's typed question and pins the view's revision. It records:

- the half-open UTC window it measured, written as `[from, to)`
- the view revision it copied
- the source fence the query read through, so every page of the answer comes from one read
- an artifact digest, a SHA-256 over the question, the window, the view revision and the answer as stored

Reopening the run shows that stored answer. Later edits to the view, and later corrections to the
source data, do not rewrite it.

## Run again is a new run

**Run again** creates another run with its own window, source fence and digest. The earlier run
stays as it was, so you can put the two side by side and see what changed. A report does not
refresh in place, because a number that changes under a fixed name is the confusion a report
exists to remove.

A relative window resolves once, when the run is created: "last 24 hours" becomes the 24 hours
before that instant. A fixed window is copied as it stands. A retry of the same run keeps the
window it started with.

The view's display zone, such as `America/Los_Angeles`, labels the times you read. It does not
change the window's length or how rows are grouped.

## Ready, partial, expired, and an empty window

A finished run is `ready` or `partial`. It is `partial` when the answer was truncated, carries a
coverage reason, or holds a cell that could not be filled for a reason other than the viewer's
access. The reason sits next to the cell it affects, so a partial number is not mistaken for a
complete one.

A window with no traffic is `ready`, and its cells say there were no requests. A completion rate
with no requests behind it is not zero: nothing was attempted, so there is no rate to report.

A run that could not finish is `failed` with a failure code, and one you stopped is `cancelled`.
If the person who started a run loses access to part of its scope before the query runs, the run
fails with `scope_unavailable` instead of quietly answering a smaller question.

`expired` means the stored answer has been removed. Retention is a documented limit: the answer is
kept for 30 days after the run finishes, and the run's metadata stays readable for 90 days.

## Opening a report checks the viewer, not the author

A report stores no permission. Each time someone opens or exports a run, their current access is
resolved again for the whole frozen scope:

- Only the report's owner and its listed recipients can see it. To anyone else it does not exist.
- A viewer whose `metadata.read` now covers less than the report's scope cannot open it. The run
  stays concealed from them rather than showing a narrower total.
- A viewer without `cost.read` sees the money cells replaced by an unavailable reason, and the
  document says money was withheld.

Each opened document carries a presentation digest over what that viewer received. It matches the
artifact digest only when nothing was withheld. A redacted copy names its own digest and makes no
claim to be byte-for-byte the stored answer.

Selecting a recipient grants nothing. Recipients must already be members of the organization, and
listing them lets them see the report record; it adds no role and widens no scope. A recipient who
lacks access to the report's applications still cannot open it.

Runtime keys, the credentials your applications send to the gateway, do not open reports. Reports
are read through the customer API with a person's or a management credential.

## What a report does not hold

A report holds metric cells, labels, the window and the scope. It holds no prompts, no responses
and no provider secrets. Producing a report sends nothing to a model provider and adds no
inference usage to your account. Money figures come from the same catalog accounting as the
[gateway insight reads](/docs/build/gateway-insights), with the same unavailable reasons, and are
not an invoice.

<Callout type="note">
Threshold alerts are not available yet. A report run starts when a person creates the report or
selects **Run again**, or when a schedule runs it:
[Deliver a gateway report on a schedule](/docs/build/schedule-gateway-report) delivers each
scheduled run to its recipients' in-app inboxes, and each recipient opens it under their own
current access.
</Callout>

<NextSteps items={[
  { title: "Save a gateway view and share it", href: "/docs/build/save-gateway-views", description: "Keep the question a report copies, and see why two people opening it can get different answers." },
  { title: "Read your gateway's traffic and spend", href: "/docs/build/gateway-insights", description: "Ask the question in the first place, and read a cell that has no number in it." }
]} />
