Send the client id with desktop update checks - #325
Merged
Conversation
The download service saw update checks as raw hits, with no way to tell one install checking hourly from many installs checking once. Attach the per-install client id the store already mints, using the same x-argus-client header sync sends to a Hub, so checks and update downloads can be counted per install. One header map covers both requests: the plugin reuses it for the manifest check and the artifact download that follows. The id is read from the store, which the sidecar doesn't create until its first open, so a cold launch can ask before there's anything to read. Successful reads are cached and misses stay retryable, and the update loop waits briefly before its first check so a fresh install's first contact carries the id. That wait sits in front of the first-run dashboard open, hence the short timeout: a store that never appears costs that one check its id instead of holding the open indefinitely. Disclose it in the privacy page, including that the identifier reaches GitHub when Argus downloads a new version, since the artifact request redirects there and reqwest carries non-sensitive headers across hosts. Update positioning.md's privacy bullet too, as it owns the claim and still described updates as coming from GitHub directly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mando
force-pushed
the
mando/update-check-client-id
branch
from
August 5, 2026 21:53
77435e2 to
73037eb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The download service (
argus-downloads) saw update checks as raw hits, so there was no way to tell one install checking hourly from many installs checking once. The tray app now attaches the per-install client id the store already mints, using the samex-argus-clientheadersyncsends to a Hub.One header map covers both updater requests: the plugin reuses it for the manifest check and the artifact download that follows, so the download service sees the same install on each.
Pairs with Agent-Deployment-Co/argus-downloads#1, which reads the header and uses it as the PostHog distinct ID. That side can deploy first; an unknown header is ignored.
Notes
argus.db, which the sidecar doesn't create until its first open, so a cold launch can ask before there's anything to read. Successful reads are cached, misses stay retryable, and the update loop waits up to 10s before its first check so a fresh install's first contact is attributable. That wait sits in front ofmaybe_open_on_first_run, hence the short timeout: a store that never appears costs that one check its id rather than holding the first-run dashboard open indefinitely.docs/privacy.mdnow covers the identifier, including that it reaches GitHub when Argus downloads a version (the artifact request redirects there, and reqwest carries non-sensitive headers across hosts).docs/contributing/positioning.mdowns that claim, so its privacy bullet is updated too; it also still described updates as coming from GitHub directly, which the Cloudflare change had made stale.desktop.metrics(on by default) gates the header. It's a visible Settings toggle under General > Updates rather than config-file-only: an opt-out nobody can find isn't much of an opt-out. The shell reads it at the point of use, like silent mode, so flipping it applies to the next check with no restart, and it also skips the client-id wait since there's nothing to wait for with metrics off.Test plan
cargo checkclean;cargo test10 passcargo fmt --checkdiffs are pre-existing and untouched)bun test test/docs-download.test.tsbun test696 pass,bun run typecheckclean (settings layout +resolveDesktopMetricscovered)client-...distinct id, that a fresh install's first check carries one, and that toggling Share update metrics off makes the next check anonymous🤖 Generated with Claude Code