install.sh: report the install once, so installs can be paired to nodes - #48
Open
Alexgodoroja wants to merge 1 commit into
Open
install.sh: report the install once, so installs can be paired to nodes#48Alexgodoroja wants to merge 1 commit into
Alexgodoroja wants to merge 1 commit into
Conversation
…to nodes Nothing today connects "someone ran the installer" to "a node appeared on the network". Release download counts are per-tag and bot-polluted, and the registry only ever sees nodes that made it all the way to registration — the gap between the two is invisible, which is exactly the number worth having. On a first install only, mints a random install_id, writes ~/.pilot/install.json and POSTs that file once. The file on disk IS the payload, so `cat ~/.pilot/install.json` answers "what did it send" with nothing to cross-check. The daemon reports the same id alongside its node id later, which turns two anonymous counts into one funnel. Guarded on the file rather than $UPDATING, matching the config.json and auto-update.json writes above: re-running the installer is a repair or an upgrade, not a new install, and re-minting would double-count while orphaning the pair already reported under the old id. Off with PILOT_ANALYTICS=0. Deliberately an env var and not a flag — it stays out of --help, never prompts, and never gates the install. The POST is backgrounded with a 2s cap and its status discarded: a lost report is always preferable to a blocked install. The header's "does not send any personal data" claim is amended rather than left standing, and a new INSTALL ANALYTICS section states exactly what is sent. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Nothing today connects "someone ran the installer" to "a node appeared on the network". Release download counts are per-tag and bot-polluted; the registry only ever sees nodes that made it all the way to registration. The gap between the two is invisible — and it is the number actually worth having.
On a first install only, this mints a random
install_id, writes~/.pilot/install.json, and POSTs that file once tohttps://telemetry.pilotprotocol.network/v1/installs.The file on disk IS the payload
cat ~/.pilot/install.jsonanswers "what did it send" exactly, with nothing to cross-check:{ "install_id": "546fcaaacad3432236db3b8a30234dd7", "ts": "2026-08-28T01:17:02Z", "entrypoint": "curl-sh", "channel": "stable", "tag": "v1.13.9", "platform": "linux/arm64", "upgrade": false }No email, hostname, username, key material, or paths. The server additionally records the request's country and a salted hash of the IP — never the address.
Guarded on the file, not
$UPDATINGMatching the
config.jsonandauto-update.jsonwrites above. Re-running the installer is a repair or an upgrade, not a new install: re-minting would double-count and orphan the pair already reported under the old id. A host whose binaries were removed for a clean reinstall keeps the id it already reported.Opt-out is an env var, not a flag
PILOT_ANALYTICS=0(orfalse/no/off). Deliberately not a CLI flag — it stays out of--help, never prompts, and never gates the install. Anything unrecognised means on, the same waycommon/consenttreats a malformed consent flag astrue. The doc comment sits below line 32 so--help, which prints lines 4–32, is byte-identical to before.It cannot block or fail an install
The POST is backgrounded with a hard 2s cap and its exit status discarded. A lost report is always preferable to a blocked install, so the send is fire-and-forget: on a very slow network the report is dropped rather than waited on.
The header no longer over-promises
"Send any personal data anywhere" was true before this change and would not have been after. It is amended, and a new
INSTALL ANALYTICSsection states exactly what is sent and how to turn it off.Verified end-to-end
Ran in a Debian container as a non-root user with no TTY — a genuine
curl | shpath, against the live ingest:telemetry.installs,upgrade=falsePILOT_ANALYTICS=0install.json, nothing sentupgrade=truecorrectly detectedinstall.jsonunchanged, no second rowshellcheck -s shMerging this publishes immediately
notify-install-sh-sync.ymldispatches to the website'ssync-install-sh.yml, which uploads to thepilot-release-assetsR2 bucket. There is no separate release step — merge means live for every new install.Depends on
The receiving endpoint (
POST /v1/installs+ thetelemetry.installstable) is already deployed and live onpilot-telemetryrevision-00011-w58, so this can merge in either order. That change is committed but unpushed — I have READ onpilot-protocol/telemetryand it is private with forking disabled, so it needs someone with write access.🤖 Generated with Claude Code