# Timeouts do not identify the missing latency tail

Research date: 31 October 2026. **Constructed finite-cohort derivation, not device
measurements, a population confidence interval, or a newly discovered runtime bug.**

## Finding

A completion-only p99 can equal 1 ms while the all-cohort p99 is known only
to exceed 100 ms. One compatible completion history has p99 = 101 ms; another
has p99 = 60 seconds. Both produce the same observations through 100 ms.

The useful result is not another warning about averages. It is a reproducible
answer to three different questions: which percentile is exact, which is confined
to a finite interval, and which has no finite upper bound from the observations.

The existing [Hesela latency analysis](https://hesela.com/analyses/storage-latency-coordinated-omission/)
already distinguishes arrival feedback, clock boundaries, histogram approximation
and population-sampling uncertainty. It asks readers to retain timeout and
unfinished-request counts. This work makes that retained information actionable,
without replacing its earlier experiments or pending histogram-correction work.

## Define the event before using the mathematics

Select N admitted requests once, at a stated boundary. Each has an eventual
completion time T measured from its own admission at that same boundary.
A complete record gives T=x. A right-censored record gives ONLY T>c:
the request had not completed through elapsed time c and observation stopped.
Each request appears exactly once. Retrying the same logical operation does not
create an interchangeable denominator. T may be arbitrarily large; allowing
never-completing requests extends the possible values to infinity.

These are idealized exact observations. Timestamp rounding, lost records,
sampling weights and uncertain start events are not modeled. The program records
integer microsecond limits but treats unknown times as continuous; it does not
silently turn an open boundary into the next microsecond.

A raw timeout does not establish this contract:

- For client termination latency, a timeout is an observed outcome at a measured
  termination time, not a censored client outcome. Its failure status still matters.
- For a response-arrival endpoint, observation can be censored only if absence
  of the response through c was actually observed and the underlying endpoint
  remains meaningful.
- A client timeout does not prove backend execution time exceeds c. The backend
  may already have committed while the response is delayed or lost.
- Cancellation or retry can change subsequent execution. Completion under a
  hypothetical no-cancellation policy is then a counterfactual, not a missing
  value established by the log.

AWS explains that timeouts bound client waiting, can coexist with completed
side effects, and retries can increase backend load. This supports the boundary
warning, not an assumption that every timeout is right censoring.
[Primary operational source, Introduction and Timeouts](https://aws.amazon.com/builders-library/timeouts-retries-and-backoff-with-jitter/).

NIST describes right censoring as an observed event-free duration with a later
event time unobserved, including different observation limits per unit. Here
the event is completion rather than component failure; that change is explicit.
[NIST 8.1.3.1](https://www.itl.nist.gov/div898/handbook/apr/section1/apr131.htm).

## Exact pointwise bounds without a fitted tail

Let E be exact completion observations x_i and C be strictly right-censored
observations c_j. The empirical completion fraction is F_N(t), always using
N=|E|+|C| as its denominator. For a finite t:

```text
L(t) = #{i in E : x_i <= t} / N
U(t) = [#{i in E : x_i <= t} + #{j in C : c_j < t}] / N

L(t) <= F_N(t) <= U(t).
```

The strict inequality c_j<t matters. An operation known to be unfinished through
100 ms cannot be counted as completed BY 100 ms.

Proof: every exact observation contributes a known indicator. A censored request
with c_j>=t contributes zero; one with c_j<t could complete on either side of t.
Choose every unknown completion above t to attain the lower count, or place
eligible unknowns between c_j and t to attain the upper count. These are sharp
POINTWISE bounds. The maximizing completion choices can differ across t; the
upper envelope need not itself be the CDF of one compatible completion history.

This is identification from a finite observed cohort, not probabilistic inference.
It needs no IID requests or independent-censoring assumption. It still needs the
recorded lower-limit statements to be true. Nonrandom selection and dependence
would matter when generalizing beyond that cohort.

## Sharp nearest-rank quantile endpoints

Fix p in (0,1] and k=ceil(pN). This is the inverse empirical CDF convention,
not an interpolated sample percentile.

Form the multiset of exact times and censoring limits. Its k-th smallest value
is the infimum b of the possible all-cohort quantile. The lower endpoint is
attainable exactly when

```text
#{i in E : x_i <= b} + #{j in C : c_j < b} >= k.
```

Otherwise the quantile is strictly greater than b. For an upper endpoint, keep
only the exact times: if there are at least k, their k-th smallest is the finite,
attainable maximum. If fewer than k exact completions exist, no finite upper
bound follows.

Proof: replacing every censored completion by its lower limit cannot increase
the k-th order statistic, establishing the infimum. Moving all censored times
arbitrarily close above their limits approaches that infimum; the counting
condition decides whether equality is possible. To maximize the quantile, move
all unknown times beyond every exact time. With at least k exact values, the
k-th exact value caps and attains it. Otherwise at least one unknown occupies
rank k and can be placed arbitrarily far away. The code checks these endpoints
against separately constructed complete histories.

For a common observation limit c, with every m observed completion at or before c:

```text
k <= m: all-cohort quantile = k-th observed completion
k > m:  all-cohort quantile > c, with no finite upper bound.
```

When k<=m, taking the p-quantile of the m completions is still generally wrong:
its rank is ceil(pm), not ceil(pN). The corresponding completed-subset inverse
CDF probability is pN/m, which is at most one in this case. Integer ranks and
the chosen percentile convention determine the boundary exactly.

## The constructed counterexample

All eight fixtures are in cases.json; the full generated table is table.md.

| Fixed cohort | Completed-only result | All-cohort result |
| --- | --- | --- |
| 989 at 1 ms; 11 unfinished through 100 ms; N=1000 | p99 = 1 ms | p99 >100 ms; no finite upper bound |
| 990 at 1 ms; 10 unfinished through 100 ms; N=1000 | p99 = 1 ms | p99 = 1 ms exactly |
| Same 990/10 cohort, asking p99.9 | p99.9 = 1 ms | p99.9 >100 ms; no finite upper bound |
| Exact 2,3,4 ms; one unfinished through 1 ms; N=4 | median =3 ms | median in [2,3] ms |
| Exact 1,2 ms; one unfinished through 1 ms; N=3 | median =1 ms | median in (1,2] ms |

Exactly 1% unknown is NOT automatically enough to destroy nearest-rank p99:
for N=1000 its rank is 990. The 990/10 row is the necessary boundary control.
A different percentile or interpolation convention changes the question.

Even below that 1% threshold, the completed-subset rank can be wrong. With 982
completions at 1 ms, nine at 50 ms and nine censored at 100 ms, completed-only
p99 selects rank 982 of 991 and returns 1 ms. All-cohort p99 selects rank 990
of 1000 and is identified as 50 ms. This is a separate control against assuming
that an identified full-cohort percentile equals the conditional percentile.

For the 989/11 row, setting all eleven hidden completions to 101 ms versus
60 seconds yields identical recorded data and different p99 values. Replacing
the censored values by the 100 ms cutoff instead produces a falsely exact
100 ms p99, which is not even compatible with T>100 ms.

The completion fraction by 100 ms is nevertheless known exactly: 989/1000.
A fixed deadline question can remain answerable when a tail-duration question
does not. This fraction is a finite-cohort result, not a confidence bound for
tomorrow's workload.

Google SRE advises separating successful-request latency from failure latency
and retaining error behavior. Our result does not call that separation wrong:
the mistake is relabeling a conditional successful subset as the whole workload.
[Primary source, The Four Golden Signals](https://sre.google/sre-book/monitoring-distributed-systems/).
For an application success-by-deadline SLI, retain the actual success status too.
Our completion indicator alone does not certify successful or durable writes.

## Why a survival estimator cannot create an observed tail

The Kaplan-Meier product-limit procedure updates an event-time estimate at
observed events using the corresponding risk sets.
[NIST 8.2.1.5](https://www.itl.nist.gov/div898/handbook/apr/section2/apr215.htm).
With 989 completions at 1 ms and eleven later censorings at 100 ms, its completion
CDF reaches 0.989 and supplies no observed completion step taking it to 0.99.
That simple specialization is our calculation, not a copied NIST dataset.

Fitting a parametric tail can output a number, but it adds assumptions not
identified by these records. Returning a censored or unbounded result is more
informative than silently inventing missing completions. Population survival
estimation has separate sampling and observation assumptions; this tool is not
a Kaplan-Meier estimator and does not assess those assumptions for real logs.

## Practical reporting contract

Record admission ID, logical-operation/attempt ID, latency boundary, exact
completion or last confirmed noncompletion time, status, observation cutoff,
and whether cancellation/retry changed execution. Preserve one complete admission
cohort including pending entries; a successes-only histogram cannot supply
a missing denominator.

Report the conditional completion distribution and its count, the full admitted
count, error/timeout/cancellation counts, and any still-pending observation limits.
Where applicable, publish a fixed-deadline count and a partially identified
quantile instead of assigning the cutoff as a completion time.

This does not correct coordinated omission. Requests that were never admitted
are outside this cohort and require a separate arrival-model analysis. It does
not remove histogram binning, clock error, population-sampling uncertainty,
right truncation from missing record IDs, or the effects of retries.

## Reproduction and evidence strength

All results use exact integer and rational arithmetic. No simulation, random
seed, storage access, benchmark timings, external package or fleet data is needed.
Twenty-one unit methods check endpoints, ties, the exact 1% boundary,
incompatible status inputs, duplicate cases, CLI misuse and retained artifacts.
An independent order-statistic construction checks 1,554 small cohorts,
5,910 rank endpoint pairs and 6,216 CDF extrema. Finite exhaustive checks support
the implementation; the preceding proof supplies the general argument.

Sources, locators and fetched-response hashes are retained. No source text is
rehosted, no claim of literature novelty is made, and mathematical self-review
is not independent peer review. See the existing latency analysis for the distinct arrival-model and histogram-correction questions.

## Deadline decision from the same bounds

Added 2 November 2026. For a fixed admitted cohort, let L(t) and U(t) bound the fraction completed by deadline t. A requirement F(t)>=q is established when L(t)>=q and refuted when U(t)<q; otherwise the observations leave it undecided. In the constructed 989/1000 case, the 100 ms completion fraction is exactly 0.989: it meets a 98% threshold but misses 99%, even though p99 has no finite upper bound. This is a deduction from the finite-cohort bounds, not a population guarantee, and completion alone does not establish successful or durable writes.

The inequalities are a direct consequence of L(t) <= F(t) <= U(t). This is a completion-fraction criterion for the recorded cohort, not an application availability SLO without success status, and not an extrapolation beyond the observation window.
