Skip to content

fix(telemetry): send install ref and diagnostics with feedback (#1724) - #1744

Open
Dumbris wants to merge 4 commits into
mainfrom
claude/user-telemetry-debug-info-63f79f
Open

Dumbris wants to merge 4 commits into
mainfrom
claude/user-telemetry-debug-info-63f79f

Conversation

@Dumbris

@Dumbris Dumbris commented Oct 23, 2026

Copy link
Copy Markdown
Member

Summary

Investigation of #1724 showed that feedback issues have never carried their context. The client sends it under context, but the telemetry worker read top-level fields. The worker fix is smart-mcp-proxy/mcpproxy-telemetry branch fix/feedback-context. This PR pins the wire shape and sends what a maintainer needs to follow up on a report.

  • FeedbackContext gains go_version, tool_count and the daemon's uptime_minutes. Only while telemetry is enabled (config, env and the opt-out latch, rechecked just before sending), it also carries the heartbeat's own anonymous_id + machine_id and its enum-only diagnostics (last_startup_outcome, previous_shutdown, last_error_code, MCPX_* counts). The worker stores the ids privately and the public issue shows only fb-<id>.
  • internal/telemetry/testdata/feedback_contract.json is the wire contract, and the worker keeps an identical copy. Tests check that FeedbackRequest round-trips it and that a fully populated SubmitFeedback sends exactly its key paths. A mutation check confirmed that dropping Diagnostics fails the test.
  • diagnosticsSnapshot() / lastErrorCode() were extracted from the heartbeat builder and are shared by heartbeat and feedback; heartbeat behaviour is unchanged.
  • docs/features/telemetry.md gains a "Feedback submissions" section; the OpenAPI spec is regenerated.

Refs #1724 (the user's CPU report itself stays open; we're waiting on their reply to the pprof instructions).

Test plan

  • go test -race ./internal/telemetry/... ./internal/httpapi/...
  • golangci-lint v2 (.github/.golangci.yml): 0 new issues; go build -tags server ./...; make swagger-verify
  • Cross-model review (opencode gpt-6.1-sol): round 1 found HIGH (opt-out latch ignored) and MEDIUM (contract test one-directional), both fixed; round 2 CLEAN
  • After the worker deploys: mcpproxy feedback from a dev build and check the issue's Context table

🤖 Generated with Claude Code

Dumbris and others added 2 commits October 23, 2026 11:08
Feedback issues have never shown their context (#1724): the client nests it
under "context" while the telemetry worker read top-level fields. The worker
fix lands in mcpproxy-telemetry; this side pins the wire shape and sends
what a maintainer needs to follow up.

- FeedbackContext gains go_version, tool_count, daemon uptime_minutes and,
  only while telemetry is enabled, anonymous_id + machine_id (the heartbeat's
  own values) plus the heartbeat's enum-only diagnostics.
- testdata/feedback_contract.json is the wire contract; the worker keeps a
  byte-identical copy. Tests check the struct round-trips it and that
  SubmitFeedback sends nothing it does not declare.
- diagnosticsSnapshot / lastErrorCode are shared by heartbeat and feedback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ire shape

Review: feedback checked consent only before reading BBolt and ignored the
opt-out latch; the contract test only checked sent paths were allowed, so
dropping diagnostics/uptime/last_error_code passed. Consent is now
!optedOut && enabled, rechecked just before marshal, and the test wires
every store and requires the exact fixture key set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Deploying mcpproxy-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: c964bfd
Status: ✅  Deploy successful!
Preview URL: https://ffdc488f.mcpproxy-docs.pages.dev
Branch Preview URL: https://claude-user-telemetry-debug.mcpproxy-docs.pages.dev

View logs

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: claude/user-telemetry-debug-info-63f79f

Available Artifacts

  • archive-darwin-amd64 (32 MB)
  • archive-darwin-arm64 (29 MB)
  • archive-linux-amd64 (20 MB)
  • archive-linux-arm64 (17 MB)
  • archive-windows-amd64 (32 MB)
  • archive-windows-arm64 (28 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (28 MB)
  • installer-dmg-darwin-arm64 (25 MB)
  • smart-mcp-proxymcpproxy-goS6NRW4.dockerbuild (0 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 40181469450 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 88.13559% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/telemetry/telemetry.go 77.27% 3 Missing and 2 partials ⚠️
internal/telemetry/feedback.go 94.59% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

…-debug-info-63f79f

# Conflicts:
#	oas/docs.go
…-debug-info-63f79f

# Conflicts:
#	oas/docs.go

This branch has not been deployed

No deployments
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.

2 participants