The recommended MCP config launches the local binary, so a server left running drifts behind releases silently — users discover the version gap only when something breaks. Per the reporter's preferred option 1, the server now checks the latest GitHub release in the background on startup (never blocking; reuses the upgrade command's release-redirect resolution so the two can't drift) and surfaces a one-line notice on three surfaces: one stderr line (the MCP host's server log), the initialize instructions (with do-not-run-it-yourself guidance for the agent), and codegraph_status. Discipline: results cache in ~/.codegraph/update-check.json shared across every proxy/daemon on the machine — 24h TTL on success, 1h backoff after failure, an outage never hides an already-known update, and a stale cache re-kicks a background refresh so long-lived daemons keep noticing. The initialize path is a memoized synchronous cache read (the respond-fast contract holds), and both handshake answerers (session + proxy) share one helper so they can't diverge. Never stdout. Hardening: the latest tag arrives from a network redirect via an on-disk cache and ends up inside agent-visible instructions, so only a canonical vX.Y.Z rebuilt from PARSED semver fields is ever interpolated — a tag carrying trailing text (parseSemver is not end-anchored) renders without it, and a non-version tag renders nothing and counts as a failed attempt. Off is off: CODEGRAPH_NO_UPDATE_CHECK=1 (dedicated) or DO_NOT_TRACK=1 (broad convention — already set by data-plane deployments) suppresses the network call and the notice entirely. Documented in TELEMETRY.md. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
8b82fe71f8
commit
47823944a3
@@ -28,6 +28,11 @@ a one-line notice is printed to stderr before the first time anything is sent.
|
||||
Off means off: when disabled, CodeGraph records nothing, opens no connection to the
|
||||
telemetry endpoint, and sends no "opted out" ping.
|
||||
|
||||
Separately from telemetry, the MCP server checks GitHub for a newer release in the
|
||||
background (at most once a day) so it can tell you an update exists — it fetches a
|
||||
version number and sends nothing about you or your machine. `DO_NOT_TRACK=1` disables
|
||||
this check too; to turn off only the update check, use `CODEGRAPH_NO_UPDATE_CHECK=1`.
|
||||
|
||||
## What is collected
|
||||
|
||||
Every payload carries this envelope:
|
||||
|
||||
Reference in New Issue
Block a user