You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(miner): wire the opt-in discovery-plane client into discover and attempt
Adds packages/loopover-miner/lib/discovery-index-client.js, gated fully
behind LOOPOVER_MINER_DISCOVERY_PLANE (default off, zero behavior
change when unset). Wires two integration points:
- discover-cli.js's runDiscover supplements the local fan-out with
hosted discovery-index results for the same scope, deduped against
local candidates (local always wins on a duplicate).
- attempt-cli.js submits a soft-claim right after the local
claim-ledger claim succeeds (before work begins), and a paired
release on every terminal outcome, using discovery-soft-claim.ts's
buildSoftClaimRequest directly against the claim-ledger's own
record shape -- no translation needed, the shapes already match by
design. The opt-in check happens at each attempt-cli.js call site,
not left to the client function's own internal check alone, so a
disabled plane costs zero calls and a test-injected override can't
bypass the gate.
A second, independent opt-in (LOOPOVER_MINER_DISCOVERY_TELEMETRY)
emits a low-cardinality anonymized operational event via the
package's own logger -- no hosted telemetry collector exists for the
discovery plane yet, so this is a structured local log line for now.
Regenerates env-reference.md/ams-env-reference.ts for the four new
env vars and updates DEPLOYMENT.md's discovery-plane section, which
was marked a placeholder pending this wiring.
Closes#7168
Copy file name to clipboardExpand all lines: packages/loopover-miner/DEPLOYMENT.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,4 +207,13 @@ and `LOOPOVER_MINER_CONFIG_DIR` are covered above under the fleet/state notes; t
207
207
208
208
## Optional hosted discovery plane (opt-in)
209
209
210
-
The Phase 6 **hosted discovery-index** is **off by default** — unlike Orb fleet export (`ORB_AIR_GAP` is the only opt-out). Operators who want cross-fleet metadata queries or soft-claim coordination must opt in explicitly. See [`docs/discovery-plane-operator-guide.md`](docs/discovery-plane-operator-guide.md) ([#4309](https://github.com/JSONbored/loopover/issues/4309), placeholder until [#4300](https://github.com/JSONbored/loopover/issues/4300) / [#4301](https://github.com/JSONbored/loopover/issues/4301) / [#4302](https://github.com/JSONbored/loopover/issues/4302) ship).
210
+
The Phase 6 **hosted discovery-index** is **off by default** — unlike Orb fleet export (`ORB_AIR_GAP` is the only opt-out). Operators who want cross-fleet metadata queries or soft-claim coordination must opt in explicitly, via `lib/discovery-index-client.js` ([#7168](https://github.com/JSONbored/loopover/issues/7168), wired against the hosted server from [#7164](https://github.com/JSONbored/loopover/issues/7164)/[#7166](https://github.com/JSONbored/loopover/issues/7166)):
211
+
212
+
| Variable | Read by | Purpose |
213
+
| --- | --- | --- |
214
+
|`LOOPOVER_MINER_DISCOVERY_PLANE`|`lib/discovery-index-client.js`| Master opt-in (truthy string, off by default). No hosted discovery-index traffic or telemetry unless set. |
215
+
|`LOOPOVER_MINER_DISCOVERY_INDEX_URL`|`lib/discovery-index-client.js`| Base URL of the hosted discovery-index service. Required for the plane to do anything once enabled. |
216
+
|`LOOPOVER_MINER_DISCOVERY_SHARED_SECRET`|`lib/discovery-index-client.js`| Optional bearer secret for the hosted endpoint, if it requires one. |
217
+
|`LOOPOVER_MINER_DISCOVERY_TELEMETRY`|`lib/discovery-index-client.js`| Second, independent opt-in for anonymized operational telemetry — can stay off while the plane itself is queried/claimed against. |
218
+
219
+
See [`docs/discovery-plane-operator-guide.md`](docs/discovery-plane-operator-guide.md) for the full invariant list (metadata-only, no compensation signals, credentials stay local).
0 commit comments