Skip to content

Commit 1d8e8b1

Browse files
committed
docs(discovery-plane): finalize operator guide now that the plane is shipped and live
#7164/#7166/#7167 all closed and the discovery-index server is now deployed at discovery.loopover.ai (Cloudflare Container + Worker). Rewrites the operator guide (packages/loopover-miner + the mirrored docs-site mdx) from "provisional/TBD" to the real, shipped opt-in mechanism: - Documents the real env vars, including LOOPOVER_MINER_DISCOVERY_SHARED_SECRET (used for bearer auth against the hosted index), which wasn't in the original TBD list at all. - Adds the maintainer-run instance's real URL and a verification step (dry-run discover) to the opt-in checklist. - Corrects a real invariant-list drift found while verifying: the doc claimed telemetry uses HMAC-hashed repo/issue correlation identifiers, but the shipped recordDiscoveryTelemetry only ever emits a bare {event, outcome} local log line -- no hosted telemetry collector exists yet, so there's nothing to hash today. - Marks server-side soft-claim dedup shipped (was "server-side dedup is #4250 [open]"). Closes #7169.
1 parent a6362d5 commit 1d8e8b1

2 files changed

Lines changed: 92 additions & 77 deletions

File tree

apps/loopover-ui/content/docs/ams-discovery-plane.mdx

Lines changed: 57 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ Operator-facing guide for the **optional** hosted discovery-index plane. This is
77
half of that roadmap item: how a `loopover-miner` instance opts in, what it may send, and what
88
never leaves the operator's machine.
99

10-
<Callout variant="warn" title="Provisional: opt-in wiring env vars are still TBD">
11-
The request/response **contract shape**, the telemetry event schema, and the client soft-claim
12-
request builder have now **shipped** as real, tested modules (see below). What remains
13-
**provisional** is only the operator-facing **opt-in wiring** — the env var names further below
14-
are still TBD pending the hosted server and the miner-side opt-in. Do not treat those env var
15-
names as stable API yet.
10+
<Callout variant="info" title="Shipped and live">
11+
The request/response contract, the client
12+
(`packages/loopover-miner/lib/discovery-index-client.ts`), and the hosted server
13+
(`packages/discovery-index`, deployed at `discovery.loopover.ai`) are all real and running. The
14+
walkthrough below reflects the actual opt-in mechanism, not a plan.
1615
</Callout>
1716

1817
<FeatureRow
@@ -25,7 +24,7 @@ never leaves the operator's machine.
2524
{
2625
title: "Telemetry event schema",
2726
description:
28-
"Anonymized telemetry event schema for the optional hosted plane. Shipped (packages/loopover-engine/src/miner-telemetry.ts).",
27+
"Event schema shipped (packages/loopover-engine/src/miner-telemetry.ts). See the Telemetry section below for what's actually wired up today vs. planned.",
2928
},
3029
{
3130
title: "Soft-claim request builder",
@@ -35,7 +34,7 @@ never leaves the operator's machine.
3534
{
3635
title: "Hosted server + opt-in wiring",
3736
description:
38-
"Still open -- the actual blocker for the opt-in mechanism below; the env var names remain TBD until it lands.",
37+
"Shipped and deployed at discovery.loopover.ai (packages/discovery-index, Cloudflare Container + Worker). Miner-side opt-in wiring shipped in discovery-index-client.ts.",
3938
},
4039
]}
4140
/>
@@ -64,9 +63,9 @@ defaults**:
6463
/>
6564

6665
<Callout variant="warn">
67-
Do **not** copy Orb's wording for this plane. Orb's header comment is explicit: "Export is
68-
ALWAYS ON… there is no opt-out flag" aside from `ORB_AIR_GAP`. The discovery plane is the
69-
opposite: **no hosted traffic unless the operator turns it on.**
66+
Do **not** copy Orb's wording for this plane. Orb's header comment is explicit: "Export is ALWAYS
67+
ON… there is no opt-out flag" aside from `ORB_AIR_GAP`. The discovery plane is the opposite: **no
68+
hosted traffic unless the operator turns it on.**
7069
</Callout>
7170

7271
## What the plane is for
@@ -79,57 +78,67 @@ The plane:
7978

8079
- Serves **public GitHub metadata only** (issue titles, labels, counts, timestamps, URLs — the
8180
same class of fields Phase 1 already uses locally).
82-
- May coordinate **soft claims** across the fleet (server-side dedup is still open; the client
83-
request shape has shipped).
81+
- May coordinate **soft claims** across the fleet, server-side dedup included.
8482
- Never receives source trees, diffs, tokens, or write credentials.
8583

8684
Local discovery (`opportunity-fanout` + `opportunity-ranker`) continues to work with **zero**
8785
hosted configuration.
8886

89-
## Opt-in mechanism (env var names still TBD)
87+
## Opt-in mechanism
9088

91-
The request/response contract has now shipped (see the scope table above), but the
92-
operator-facing opt-in env vars below are **not implemented yet** — treat them as
93-
**documentation placeholders** for the shape operators should expect once the opt-in wiring
94-
lands:
89+
Real, shipped env vars, read in `discovery-index-client.ts`:
9590

9691
<FeatureRow
9792
items={[
9893
{
99-
title: "LOOPOVER_MINER_DISCOVERY_PLANE (provisional)",
94+
title: "LOOPOVER_MINER_DISCOVERY_PLANE",
10095
description:
101-
"Default unset / false. Master opt-in. When not truthy (1, true, yes, on), the miner must not call the hosted index or emit discovery-plane telemetry.",
96+
"Default unset / false. Master opt-in. When not truthy (1, true, yes, on), the miner never calls the hosted index and never emits discovery-plane telemetry.",
10297
},
10398
{
104-
title: "LOOPOVER_MINER_DISCOVERY_INDEX_URL (provisional)",
99+
title: "LOOPOVER_MINER_DISCOVERY_INDEX_URL",
105100
description:
106-
"Default unset. Hosted index base URL. Required when the plane is enabled; ignored when opt-in is off.",
101+
"Default unset. Hosted index base URL -- set to https://discovery.loopover.ai for the maintainer-run instance, or point at your own deployment of packages/discovery-index. Required when the plane is enabled.",
107102
},
108103
{
109-
title: "LOOPOVER_MINER_DISCOVERY_TELEMETRY (provisional)",
104+
title: "LOOPOVER_MINER_DISCOVERY_SHARED_SECRET",
110105
description:
111-
"Default unset / false. Separate opt-in for anonymized operational telemetry. Plane queries can stay on while telemetry stays off.",
106+
"Default unset. Bearer token sent as Authorization: Bearer <value> on every hosted-index request. The maintainer-run instance at discovery.loopover.ai requires one -- ask the operator running it for a value.",
107+
},
108+
{
109+
title: "LOOPOVER_MINER_DISCOVERY_TELEMETRY",
110+
description:
111+
"Default unset / false. Separate opt-in for operational telemetry. Plane queries can stay on while telemetry stays off. Currently local-only -- see Telemetry below.",
112112
},
113113
]}
114114
/>
115115

116-
**Truthy-string convention** (when implemented): `/^(1|true|yes|on)$/i`, matching other
117-
`LOOPOVER_*` flags in this repo.
116+
**Truthy-string convention:** `/^(1|true|yes|on)$/i`, matching other `LOOPOVER_*` flags in this
117+
repo.
118118

119119
**Operator checklist (enabled plane):**
120120

121-
**1.** Set `LOOPOVER_MINER_DISCOVERY_PLANE=true` (exact name may change).
121+
**1.** Set `LOOPOVER_MINER_DISCOVERY_PLANE=true`.
122+
123+
**2.** Set `LOOPOVER_MINER_DISCOVERY_INDEX_URL=https://discovery.loopover.ai` (or your own
124+
deployment's URL).
122125

123-
**2.** Set `LOOPOVER_MINER_DISCOVERY_INDEX_URL` to the operator-trusted index endpoint.
126+
**3.** Set `LOOPOVER_MINER_DISCOVERY_SHARED_SECRET` if the index you're pointing at requires one.
124127

125-
**3.** Optionally set `LOOPOVER_MINER_DISCOVERY_TELEMETRY=true` if you want anonymized
126-
operational events for the hosted service — not required for index queries.
128+
**4.** Optionally set `LOOPOVER_MINER_DISCOVERY_TELEMETRY=true` for local operational log lines
129+
about plane usage — not required for index queries.
127130

128-
**4.** Keep `GITHUB_TOKEN` (or equivalent) on the instance only; never configure tokens intended
131+
**5.** Keep `GITHUB_TOKEN` (or equivalent) on the instance only; never configure tokens intended
129132
for the hosted plane to receive.
130133

131-
With opt-in off (default), behavior is byte-identical to today: local SQLite ledgers, local
132-
fan-out, no hosted calls.
134+
**6.** Run `loopover-miner discover <owner/repo> --dry-run --json` and check the response for
135+
hosted-index candidates alongside your local fan-out to confirm the plane is actually being
136+
queried.
137+
138+
Every call in the client is fail-open: a network error, timeout, or non-2xx response degrades
139+
silently to "no supplement" rather than failing the miner's own discover/attempt work. With
140+
opt-in off (default), behavior is byte-identical to today: local SQLite ledgers, local fan-out,
141+
no hosted calls.
133142

134143
## Contrast with local soft-claims today
135144

@@ -158,17 +167,21 @@ operators:
158167
telemetry payloads.
159168
- **No compensation signals in the plane** — raw reward values, wallet addresses, hotkeys, trust
160169
scores, or private rankings never cross this boundary.
161-
- **Telemetry is a second opt-in** — even with the plane enabled, anonymized telemetry remains
162-
separately gated.
163-
- **Anonymized identifiers only** — when telemetry ships, repo/issue correlation uses HMAC-hashed
164-
identifiers keyed by a **per-instance dedicated secret** the collector never holds (same
165-
posture as `getOrCreateAnonSecret` / `hmacField` in `src/selfhost/orb-collector.ts` — key
166-
separation from GitHub App / webhook secrets).
167-
- **Low-cardinality reason buckets** — any free-text-adjacent telemetry fields use bucketed
168-
categories (Orb's `bucketReasonCode` pattern), not raw maintainer or model prose.
170+
- **Telemetry is a second opt-in** — even with the plane enabled, telemetry remains separately
171+
gated behind `LOOPOVER_MINER_DISCOVERY_TELEMETRY`.
169172
- **Core miner still works offline** — claims, plans, queues, and local ledgers do not require
170173
the hosted plane; `loopover-miner doctor` / `status` remain no-network commands.
171174

175+
### Telemetry: local today, not yet sent to the hosted service
176+
177+
`recordDiscoveryTelemetry` (`discovery-index-client.ts`) currently emits a structured **local log
178+
line** (`event`, `outcome` — both fixed, low-cardinality strings; no repo/issue identifiers, no
179+
free text) via the miner's own logger. No hosted telemetry-collector endpoint exists yet, so
180+
nothing about telemetry events leaves the operator's machine today regardless of this flag. The
181+
originally planned design called for HMAC-hashed repo/issue correlation identifiers once a real
182+
collector ships — that collector doesn't exist yet, so there is nothing to hash today; this
183+
section will be updated again once it does.
184+
172185
### Never included (client → hosted plane)
173186

174187
Inventory style matches `src/selfhost/orb-collector.ts` ("No diffs, no code…") adapted for
@@ -184,8 +197,9 @@ discovery-plane domain:
184197

185198
### Never retained by the hosted service (server-side)
186199

187-
The server operating doc (maintainer-only) will restate the same boundary: **never holds source
188-
or actor-capable credentials.** This client guide does not define server retention policy.
200+
The server (`packages/discovery-index`) never holds source or actor-capable credentials — see
201+
that package's own README and operations docs for its full boundary and incident-response
202+
documentation. This client guide does not define server retention policy in detail.
189203

190204
## Related docs
191205

0 commit comments

Comments
 (0)