Skip to content

feat(telemetry): consent-gated telemetry client with Ed25519 signing (PILOT-400)#263

Merged
TeoSlayer merged 3 commits into
mainfrom
openclaw/pilot-400-20260616-1348
Jun 17, 2026
Merged

feat(telemetry): consent-gated telemetry client with Ed25519 signing (PILOT-400)#263
TeoSlayer merged 3 commits into
mainfrom
openclaw/pilot-400-20260616-1348

Conversation

@matthew-pilot

Copy link
Copy Markdown
Collaborator

Summary

Adds a consent-gated telemetry client to the daemon. When --telemetry-url (or env PILOT_TELEMETRY_URL) is set, events are signed with the node's Ed25519 identity and POSTed to the endpoint. When empty (default), the client is a hard no-op — no dial, no buffering, no goroutines.

What changed

  • pkg/telemetry/client.go — New package: telemetry.Client with Ed25519-signed HTTP POSTs matching the canonical telemetry signing contract (X-Pilot-Timestamp, X-Pilot-Public-Key, X-Pilot-Signature). Hard no-op when URL is empty.
  • pkg/telemetry/client_test.go — Tests: no-op paths, disabled state, SignMessage round-trip verification.
  • cmd/daemon/main.go — Added --telemetry-url flag.
  • pkg/daemon/daemon.go — Added TelemetryURL field to Config struct.

Verification

  • go build ./... — clean
  • go vet ./... — clean
  • go test ./pkg/telemetry/ — 5/5 PASS
  • make build — daemon + pilotctl binaries built

Closes PILOT-400

…(PILOT-400)

Adds a self-contained telemetry client package that emits signed events
to a configured endpoint only when consent is active (--telemetry-url
non-empty). When the flag is empty (default), the client is a hard no-op:
no dial, no buffering, no goroutines.

The client signs all requests with the node's Ed25519 identity following
the canonical telemetry signing contract (X-Pilot-Timestamp, X-Pilot-Public-Key,
X-Pilot-Signature). This matches the telemetry server's internal/sig verification
at pilot-protocol/telemetry.

Changes:
- pkg/telemetry/client.go: consent-gated telemetry client with Signed
  HTTP POST, lazy disabled init, configurable endpoint
- pkg/telemetry/client_test.go: tests for no-op paths, disabled state,
  SignMessage round-trip verification
- cmd/daemon/main.go: --telemetry-url flag (env PILOT_TELEMETRY_URL)
- pkg/daemon/daemon.go: TelemetryURL field in Config struct

Closes PILOT-400
Comment thread pkg/telemetry/client.go Fixed
matthew-pilot and others added 2 commits June 16, 2026 16:39
…tion

CodeQL flagged make([]byte, 0, len(ts)+1+len(body)) because len() sums
can overflow on 32-bit platforms when body is very large. Drop the body
from the capacity hint — append grows the buffer naturally.

PILOT-400
@TeoSlayer TeoSlayer merged commit 52050bc into main Jun 17, 2026
7 of 8 checks passed
@TeoSlayer TeoSlayer deleted the openclaw/pilot-400-20260616-1348 branch June 17, 2026 09:21
@matthew-pilot matthew-pilot added the canary-failed Canary harness tests failed for this PR label Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

canary-failed Canary harness tests failed for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants