missing repo API

back to relay-eval

Query the repos a relay missed during a relay-eval measurement window.

What This API Means

A missing repo is first a stream comparison fact: relay-eval saw repository activity for a DID on at least one observed synchronization stream during a run, but did not see that DID on the relay being inspected.

Resolver checks, PDS hosts, and repo status are supporting evidence. They help explain the gap, but they are not the denominator.

stream gap unverified inactive evidence

Fastest Useful Query

Use this when you want the most recent retained detail rows for one relay.

GET /api/latest/diffs?relay=<relay-host>&limit=5000
curl -fsS 'https://relay-eval.waow.tech/api/latest/diffs?relay=relay.fire.hose.cam&limit=5000' | jq

Gap Counts

Complete missing-row counts for the selected run. Unchecked rows are aggregate counts, not all concrete DID rows.

/api/runs/:id/diffs/summary?relay=...

Likely Stream Debt

Only checked rows where the repo looks active elsewhere and absent from this relay.

/api/latest/diffs?relay=...&lane=live

Audit The Unknowns

Inspect resolver-budget leftovers, resolver failures, malformed DIDs, and inactive evidence.

lane=unchecked | review | inactive

Start With A Stable Snapshot

The summary endpoint gives complete counts, facets, lower-bound estimates, and the concrete run_id. Use that run_id for pagination so every detail page comes from the same measurement run.

GET /api/latest/diffs/summary?relay=<relay-host>
curl -fsS 'https://relay-eval.waow.tech/api/latest/diffs/summary?relay=relay.fire.hose.cam' \
  | jq '{run_id,total,checked,unchecked,estimate,classes:.facets.classifications}'
Lower bounds: when estimate.checked_limited is true, live_gap_display includes +. Treat that as "at least this many checked live gaps; unchecked rows remain."

Pull Retained Detail

This emits tab-separated DID, classification, and optional PDS columns for concrete rows retained in the selected run. Use the summary endpoint for complete unchecked counts.

relay='relay.fire.hose.cam'
run_id="$(curl -fsS "https://relay-eval.waow.tech/api/latest/diffs/summary?relay=${relay}" | jq -r '.run_id')"
cursor=''

while true; do
  url="https://relay-eval.waow.tech/api/runs/${run_id}/diffs?relay=${relay}&limit=5000"
  [ -n "$cursor" ] && url="${url}&cursor=${cursor}"

  page="$(curl -fsS "$url")"
  echo "$page" | jq -r '.diffs[] | [.did, .classification, (.pds // "")] | @tsv'

  cursor="$(echo "$page" | jq -r '.next_cursor // empty')"
  [ -z "$cursor" ] && break
done

next_cursor is a resume token. It is not a page number; pass it back as cursor to continue after the last emitted row.

Parameters

parametermeaning
relayRelay host to inspect, for example relay.fire.hose.cam.
limitRows per response. Defaults to 1000 and is capped at 5000.
cursorResume token from the previous response's next_cursor.
laneSemantic bucket: live, unchecked, review, inactive, or checked.
classificationExact stored classifier label such as active_missing.
qSubstring search over the DID.
pds_hostFilter by resolved PDS host, with or without https://.

Useful Examples

live only/api/latest/diffs?relay=relay.fire.hose.cam&lane=live&limit=5000
unchecked/api/latest/diffs?relay=relay.fire.hose.cam&lane=unchecked
DID search/api/latest/diffs?relay=relay.fire.hose.cam&q=76eyp
PDS host/api/latest/diffs?relay=relay.fire.hose.cam&pds_host=bracket.us-west.host.bsky.network

Lanes And Classifications

lanelabelshow to read it
liveactive_missing, legacy coverage_gapChecked lower-bound stream gaps. This is the strongest signal for relay coverage debt.
uncheckedclassification_not_attemptedResolver budget was not spent on this row. It belongs in the full gap set, but not in the live lower bound.
reviewmalformed_did, unsupported_did_method, did_resolution_failed, invalid_did_document, unresolvableNeeds operator interpretation. Often resolver/network or DID-document ambiguity.
inactiveno_pds_endpoint, deactivatedCurrent hosting evidence does not support treating this as live stream debt.
checkedanything except classification_not_attemptedRows where relay-eval spent classification effort.

Response Shape

{
  "run_id": 4208,
  "relay": "relay.fire.hose.cam",
  "limit": 5000,
  "diffs": [
    {
      "cursor": 527654185,
      "relay": "relay.fire.hose.cam",
      "did": "did:plc:...",
      "classification": "active_missing",
      "classification_version": 2,
      "pds": "https://bracket.us-west.host.bsky.network"
    }
  ],
  "next_cursor": 527659184
}

Use /api/latest/diffs for convenience. Use /api/runs/:run_id/diffs when paging, exporting, or comparing results.

Semantics are aligned with relay-eval's stream-comparison model and ATP sync concepts: atproto sync, repository, IETF sync draft, IETF repository draft.