Skip to content

feat(cua-driver): anonymous telemetry properties — capture_mode, mcp_client, display_server#1976

Draft
f-trycua wants to merge 1 commit into
mainfrom
feat/cua-driver-telemetry-enrichment
Draft

feat(cua-driver): anonymous telemetry properties — capture_mode, mcp_client, display_server#1976
f-trycua wants to merge 1 commit into
mainfrom
feat/cua-driver-telemetry-enrichment

Conversation

@f-trycua

Copy link
Copy Markdown
Collaborator

Enriches the existing entry-point telemetry with three bounded, anonymous (enum-only) properties, built per command + platform by a new telemetry::entry_event_properties(cmd) helper merged into the event payload.

Properties added

Property Events Bounded value set
capture_mode cua_driver_mcp, cua_driver_serve "som" | "vision" | "ax" (read from ~/.cua-driver/config.json, defaults to "som")
mcp_client cua_driver_mcp_config "claude" | "codex" | "cursor" | "antigravity" | "openclaw" | "opencode" | "hermes" | "pi" | "generic" (from --client; unknown/unspecified → "generic")
display_server all entry events, Linux only "wayland" | "x11" | "xwayland" | "unknown" (from the type of XDG_SESSION_TYPE / WAYLAND_DISPLAY; omitted on macOS/Windows)

Anonymity (no PII)

Every value is normalised to a fixed allow-list before it ever reaches the payload — never a path, command/tool arg, env value, or anything user-typed. capture_mode and mcp_client fall back to their safe default rather than emitting an unrecognised raw string. display_server reads only the category of the session env, never the socket name/value. The default-envelope-wins merge semantics in build_payload are preserved (the new keys don't collide).

No secrets touched: no new keys or endpoints; the existing public PostHog ingest key is unchanged (public-ingest-only by design).

Tests / build

cargo build -p cua-driver and cargo test -p cua-driver --bin cua-driver telemetry pass (16 telemetry tests, 8 new) asserting the bounded value sets and per-command attachment. Updated the privacy doc block at the top of telemetry.rs.

Follow-up (out of scope here)

The cua-driver mcp server emits no per-tool telemetry (only cua_driver_mcp at startup) — a known blind spot that needs a volume/sampling + crate-boundary design decision. Tracked in #1975.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KMXCW4M5uK1HRGjjH4wueZ

…client, display_server

Enrich the entry-point telemetry events with three bounded, anonymous
(enum-only) properties via a new telemetry::entry_event_properties helper:

- capture_mode ("som"|"vision"|"ax") on cua_driver_mcp / cua_driver_serve,
  read from the persisted ~/.cua-driver/config.json (default "som").
- mcp_client ("claude"|"codex"|"cursor"|"antigravity"|"openclaw"|
  "opencode"|"hermes"|"pi"|"generic") on cua_driver_mcp_config, from
  --client; unknown/unspecified collapse to "generic".
- display_server (Linux only; "wayland"|"x11"|"xwayland"|"unknown") on
  all entry events, derived from the *type* of XDG_SESSION_TYPE /
  WAYLAND_DISPLAY (never the value contents). Omitted on macOS/Windows.

All three are normalised to a fixed allow-list before reaching the
payload — no PII, no paths, no user-typed strings. No new keys or
endpoints; the existing public PostHog ingest key is unchanged.

Updates the privacy doc block in telemetry.rs and adds unit tests
asserting the bounded value sets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMXCW4M5uK1HRGjjH4wueZ
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Jun 22, 2026 7:27pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 085a1d61-6f19-4d53-91c3-e786c47397a5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cua-driver-telemetry-enrichment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

Linux visual regression artifacts

Matrix jobs now run independently. Download visual artifacts from this workflow run.
Each background-GUI job uploads a .gif of the interaction plus two annotated PNGs (<app>.png raw, <app>-atspi.png with AT-SPI element boxes); the cua-driver-linux-som-overlays artifact adds <app>-som.png cua Set-of-Marks overlays:

  • cua-driver-linux-cursor-click-gif
  • cua-driver-linux-background-terminal-gif
  • cua-driver-linux-parallel-drag-xserver
  • cua-driver-linux-background-gui-chromium
  • cua-driver-linux-background-gui-tk
  • cua-driver-linux-background-gui-gtk3-gedit
  • cua-driver-linux-background-gui-gtk3-mousepad
  • cua-driver-linux-background-gui-gtk3-scite
  • cua-driver-linux-background-gui-gtk4-characters
  • cua-driver-linux-background-gui-qt5-manuskript
  • cua-driver-linux-background-gui-qt5-klog
  • cua-driver-linux-background-gui-qt5-openambit
  • cua-driver-linux-background-gui-qt6-kate
  • cua-driver-linux-background-gui-qt6-kcalc
  • cua-driver-linux-background-gui-qt6-okular
  • cua-driver-linux-background-gui-qt6-qownnotes
  • cua-driver-linux-background-gui-electron-zettlr
  • cua-driver-linux-background-gui-electron-joplin
  • cua-driver-linux-background-gui-electron-logseq
  • cua-driver-linux-som-overlays

Open workflow run and download artifacts

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