Repository navigation
Conversation
8e3914b to
70334bf
Compare
70334bf to
4f86cc2
Compare
4f86cc2 to
5c11060
Compare
5c11060 to
e9c4922
Compare
e9c4922 to
eb75a69
Compare
eb75a69 to
a4e6eb5
Compare
a4e6eb5 to
3483d49
Compare
dd279a3 to
4643654
Compare
4643654 to
d965c8f
Compare
d965c8f to
5fd5d39
Compare
5fd5d39 to
aaa6f5e
Compare
173bc1d to
20d2fe9
Compare
20d2fe9 to
74ee02d
Compare
8d72758 to
2407fcc
Compare
mattpodwysocki
left a comment
There was a problem hiding this comment.
Verified the parts that matter most here rather than just reading the diff: ran the actual binary, confirmed mapbox config set telemetry off writes {"telemetry":false} to the real config.json and a fresh process reads it back, and that doctor reports telemetry_persisted/telemetry_allowed separately and correctly. Traced all three things it's supposed to gate, the event, the User-Agent markers, and the update-check, and confirmed each one actually checks the combined telemetry_allowed(), not just doctor's report of it. The key-by-key config.json parsing fix is real too: the old whole-struct Deserialize meant one bad key nulled everything, the new one isolates each key and keeps unknown ones on write, with tests that would catch a regression on either front.
The source_guards test stopping any other module from reading the env-only flag alone is a nice bit of insurance against exactly the bug class this PR is fixing.
Full suite, fmt, clippy all pass. Approving.
The merge-base changed after approval.
mapbox config set telemetry off stops the run's telemetry event in every shell, beside MAPBOX_CLI_NO_TELEMETRY for one. The setting is read again at exit, so the run that turns it off does not report itself.
The two opt-outs now mean the same thing, one for a shell and one for good: telemetry::telemetry_allowed reads both, so config set telemetry off also strips the User-Agent markers and silences the update notice, not only the event. mapbox doctor reports the setting as telemetry_persisted, with the reason in its text lines, and the Privacy section names it under How to Opt Out.
2407fcc to
e35b817
Compare
Stacked on #46.
Adds
mapbox config set telemetry off, which turns off the same things asMAPBOX_CLI_NO_TELEMETRY=1(event,User-Agentmarkers, update notice) in every shell.mapbox doctorreports it astelemetry_persisted.config.jsonis now read key by key, so one bad or unknown key no longer resets the opt-out. 0.3.0 still drops the key onconfig set; the CHANGELOG notes it.Verified: tests, each checked by breaking the code. Not verified: Windows locally.