Skip to content

feat(telemetry): emit install events (PILOT-401)#264

Closed
matthew-pilot wants to merge 1 commit into
openclaw/pilot-400-20260616-1348from
openclaw/pilot-401-20260616-141210
Closed

feat(telemetry): emit install events (PILOT-401)#264
matthew-pilot wants to merge 1 commit into
openclaw/pilot-400-20260616-1348from
openclaw/pilot-401-20260616-141210

Conversation

@matthew-pilot

Copy link
Copy Markdown
Collaborator

Summary

Emit a telemetry event on successful app install, gated by consent (no-op when PILOT_TELEMETRY_URL is empty or identity.json is absent).

Changes

  1. pkg/telemetry/client.go — Added NewClientFromIdentity(url, identityPath string, nodeID int64) convenience constructor that reads the node Ed25519 identity from disk and creates a consent-gated telemetry client.

  2. cmd/pilotctl/appstore.go — After a successful install (bundle validated, manifest planted, audit logs written), emit an app_installed event with:

    • app_id — the installed app ID
    • version — the manifest version
    • sourcecatalogue or local (from --local flag)
  3. pkg/telemetry/client_test.go — Tests for NewClientFromIdentity:

    • Empty URL → no-op (no identity file needed)
    • Non-existent identity → no-op (first run, graceful)
    • Valid identity → client enabled with signer + pub key
    • Loose file permissions → no-op (security, warns log)

Verification

  • go build ./... — clean
  • go vet ./... — clean
  • go test ./pkg/telemetry/... ./cmd/pilotctl/... — all passing

Dependencies

This PR builds on PILOT-400 / PR #263 (consent-gated telemetry client). The base is set to that branch so the diff is incremental.

Closes

PILOT-401

Add a NewClientFromIdentity convenience constructor to the telemetry
package that creates a consent-gated client from a node's Ed25519
identity file on disk.

Wire telemetry into the app-store install command: after a successful
install (bundle validated, manifest planted, audit logs written), emit an
app_installed event carrying app_id, version, and source (catalogue|local).
The emission is best-effort and consent-gated — when PILOT_TELEMETRY_URL
is empty or identity.json is absent, the client is a hard no-op.

Tests cover the new NewClientFromIdentity helper with valid identity,
missing identity, loose file permissions, and empty URL (all no-op paths).

Closes PILOT-401
@matthew-pilot matthew-pilot force-pushed the openclaw/pilot-401-20260616-141210 branch from 83c84c8 to 4c16d7f Compare June 16, 2026 16:40
@matthew-pilot

Copy link
Copy Markdown
Collaborator Author

Superseded by new PR targeting main directly

@matthew-pilot matthew-pilot deleted the openclaw/pilot-401-20260616-141210 branch June 20, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant