Skip to content

feat(privacy): offer Turn on once to installs off only by an old written false - #37463

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
feat/kiro-telemetry-off-notice
Nov 15, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
feat/kiro-telemetry-off-notice

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Public-build users who are off only because an older build wrote telemetry.enabled: false for them are asked once, in the Privacy chapter, whether to turn performance metrics on; until they say yes, only the daily heartbeat (already on for them) is sent.

Builds before local recording was on by default wrote a full default config on first boot, including telemetry.enabled: false. #22397 reads any written false as the person's own opt-out, so most existing installs are off without ever having chosen it, and they never see the version 3 notice that names Kiro telemetry (#37183).

Why it matters

Those people were never asked. Without this they stay off for good, and the product never hears from the bulk of its existing users, even ones who would say yes.

Not a goal

  • Turning anyone on without asking: the default stays off.
  • Asking people who are off for any other reason (env pins, DO_NOT_TRACK, policy, heartbeat off, CI, LTS).
  • A new privacy notice version: this reuses version 3.

What changed (motivation -> approach -> change)

Owner decision (2026-11-15): show these users one popup that names Kiro telemetry, with Turn on / Keep off (the button reads "Turn on performance metrics").

Want Change
Find exactly these users kiro_export.off_offer_due: a written telemetry.enabled: false, the heartbeat on, no env pin (DO_NOT_TRACK, KIROCREW_TELEMETRY), no policy pin, no config.local.json entry, no collector of the user's own, the destination listed (not LTS, not CI), and notice version 3 not yet acknowledged. Fails closed.
Show the chapter once The theme boot payload reports the stored notice version for them (instead of "current"), and the collection status adds off_offer; firstRun.tsx opens the chapter when offerOn.
Off form PrivacyChapter.tsx: title "Performance metrics are off", an intro saying that turning them on also sends product usage metrics to Kiro telemetry and that while off only the anonymous daily heartbeat and official app install receipts are sent, the five heartbeat fields right under the intro, a line naming Kiro telemetry, a fade at the bottom of the body while more is below (off form only), and "Turn on performance metrics" / "Keep off". Strings in all 13 catalogs plus the pseudolocale.
Turn on Writes telemetry.enabled: true, re-reads the collection status to confirm it took effect, then records the notice and Kiro acknowledgements. Any failure is followed by a read-back. Recording still off: "nothing changed". On: "Performance metrics are now on, but your choice could not be fully saved", and the chapter shows the on form, so Turn off is the way back. Unreadable: Turn on says "... performance metrics may now be on"; Keep off says "Your choice could not be saved or confirmed". No acknowledgement is recorded on a failure.
Theme payload core.py: the three /api/theme/boot and /api/config/theme response sites load config and build the payload with asyncio.to_thread, since off_offer_due reads config files and the policy profiles. telemetry.py api_telemetry_startup builds its state with asyncio.to_thread for the same reason.
Keep off Writes telemetry.enabled: false (already the stored value, so it also undoes a Turn on that half-landed), then records only privacy_ack_version, so it is not asked again.
CLI-only hosts A start with no dashboard prints notice.OFFER_TEXT once, on a terminal, pointing at kirocrew telemetry enable; it changes no setting.
Docs README, the export guide (who-sends table and a paragraph), metrics.md, the crew-log telemetry RFC's "not asked again" rule.

Backwards compatibility

No key, route or function is removed. The collection status gains off_offer; clients that ignore it behave as before. Users off by any rule other than the written false above see no change.

Tests

  • test/metrics/test_kiro_export_destination.py TestOffOffer: due and changes nothing; collection status reports it; not due for each of DNT, env pin, KIROCREW_TELEMETRY_DISABLED, heartbeat off, already acknowledged, unset, LTS, CI, a non-default home (checked on its own, so it holds after the dev-home export change in feat(metrics): send product metrics from non-default data homes too #37460), a collector of the user's own, a config.local.json entry, a policy pin; Turn on records and exports; Keep off sends nothing and is not asked again; the CLI line prints once on a terminal and writes no setting; no line into a log or on a dashboard start.
  • website/src/components/PrivacyChapter.test.tsx: off form text, heartbeat fields and buttons; Turn on writes then acks; a failed write says nothing changed; a write that does not take effect says nothing changed; a lost response that landed, or an ack that fails after the write, says metrics are now on and shows Turn off; an unreadable read-back says may now be on; Keep off writes the switch off and records only the notice version. A Keep off whose write fails says nothing changed while still off, and a neutral could-not-be-saved line when unreadable. website/src/test/App.test.tsx: an existing user off only by the old false gets the off form once.
  • Run locally: backend 393 passed (-n 2), frontend 230 + 139 style tests passed, tsc, pseudolocale check.

Manual verification

Rendered with the built SPA on a loopback static server, /api stubbed; screenshot below.

Screenshots / video

Off form shown to a user who is off only because of an older build's written false:

Privacy chapter off form at 1280x640: intro naming Kiro telemetry, heartbeat fields, bottom fade, Turn on performance metrics and Keep off

The same form at 1280x900:

Privacy chapter off form at 1280x900

Turn on whose save fails (PATCH /api/config/kirocrew stubbed to 500): the read-back shows recording still off, so the form says nothing changed:

Privacy chapter off form showing the save error after Turn on failed

Turn on whose switch lands but whose acknowledgement fails (PUT /api/config/theme stubbed to 500): the read-back shows recording on, so the chapter shows the on form (title on, Keep on / Turn off) with "Performance metrics are now on, but your choice could not be fully saved. Keep them on, or turn them off.":

Privacy chapter after a half-landed Turn on: on form saying metrics are now on, Keep on and Turn off

A failed write whose read-back is also unreadable (PATCH and the collection status stubbed to 500). The chapter falls back to its existing could-not-check form, which offers Turn off. Turn on:

Turn on whose result cannot be read back: may now be on

Keep off (no button is named that is not on screen):

Keep off whose result cannot be read back: could not be saved or confirmed

Related Issues

Follow-up to #37183. Related #21270.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of ba482abb4259c7e78f8afe6e3a4f476fa5268157 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] ba482ab

False positive or not applicable? A repository writer can comment:
/ai-review override gpt ba482abb4259c7e78f8afe6e3a4f476fa5268157 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of ba482abb4259c7e78f8afe6e3a4f476fa5268157 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the owner decision covers asking these users once, the probe fails closed, "Keep off" records the acknowledgement, and the rendered evidence covers the new off form.

Notes

  • off_offer_due treats every written false the same way (_stored_agent_value(...) is not False). Someone who ran kirocrew telemetry disable on purpose is asked once more along with everyone who got the old default. The PR accepts this cost but doesn't say so. Name it in the RFC's "not asked again" rule.

[DESIGN-REVIEWED] ba482ab

Description read

[DESCRIPTION-READ] b27caa449f8c2b23339f70ac8523999c19e87b822de8c4d774e31da19ec9fd2d

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of ba482abb4259c7e78f8afe6e3a4f476fa5268157 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The blind reader read both primary buttons correctly, and every new state is in a screenshot.

Notes

  • turnOnLanded: the reader asked about "could not be fully saved": "will it be off again after a restart?" Say what didn't save, e.g. "Performance metrics are on, but this screen could not record your answer, so it may appear again."
  • introOffer uses five names in one paragraph: performance metrics, product usage metrics, Kiro telemetry, heartbeat and "official app install receipts". The reader couldn't tell which ones overlap and didn't know what an install receipt is. Say in a few words what an install receipt is, or leave it out of the intro, since the scope line under Turn off already lists it.
  • turnOnPartial ("may now be on. Choose again.") hands the user to the could-not-check form, where the only choices are "Continue without changes" and "Turn off". The reader would not click "Continue without changes" because it "could mean leaving them on without knowing it". End the message with a named action instead, e.g. "Choose Turn off to be sure they are off."

[UX-REVIEWED] ba482ab

Description read

[DESCRIPTION-READ] 04ed404bf2ef0517a40f603340c6146781707da7a13cf6637eebc962a89daf2e

That sha256 names everything this verdict read: the PR description, plus the 9 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ human override accepted

@chenmingwei23 overrode this lane for ba482abb4259c7e78f8afe6e3a4f476fa5268157 via /ai-review override (this commit only).

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed ba482abb4259c7e78f8afe6e3a4f476fa5268157 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] ba482ab

Verdict parsed from the review's SHA-scoped output markers for commit ba482abb4259c7e78f8afe6e3a4f476fa5268157.

False positive or not applicable? A repository writer can comment:
/ai-review override fable ba482abb4259c7e78f8afe6e3a4f476fa5268157 false-positive: <reason, 20 to 500 characters>

@chenmingwei23
chenmingwei23 force-pushed the feat/kiro-telemetry-off-notice branch from c44f65b to ad2b84a Compare November 15, 2026 02:47
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 15, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Product decision (owner) for head ad2b84a:

Builds before the default-on change wrote a full default config on first start, including telemetry.enabled: false, so most existing installs carry a false nobody chose. Those installs are asked once: the dashboard shows the Privacy chapter in its off form, naming Kiro telemetry, with Turn on / Keep off, and a terminal-only start prints one line pointing at kirocrew telemetry enable. The default stays off; nothing is recorded or sent unless the person turns it on, and Keep off is remembered so it never shows again. Not shown under DO_NOT_TRACK, an env pin, governance, heartbeat off, CI or in LTS builds. This replaces the "not asked again" rule only for that written-false case.

@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles ad2b84a owner-decision: owner decided a one-time off-form Privacy prompt (and one CLI line) for installs off only by an old written false; default stays off: #37463 (comment)

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@chenmingwei23 recorded a owner-decision release (class owner-decision) for the first-principles AI finding on ad2b84a29fd9d75fec7683bcc6d849866078462d.

owner decided a one-time off-form Privacy prompt (and one CLI line) for installs off only by an old written false; default stays off: #37463 (comment)

This decision applies only to this commit. A new push requires a new judgment.

@chenmingwei23
chenmingwei23 force-pushed the feat/kiro-telemetry-off-notice branch from ad2b84a to 298f647 Compare November 15, 2026 02:57
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 15, 2026
@chenmingwei23
chenmingwei23 force-pushed the feat/kiro-telemetry-off-notice branch from 298f647 to c748b8c Compare November 15, 2026 03:15
@KiroCrewCaptain

KiroCrewCaptain commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider thinks the change is probably fine but estimates a 20% chance that this change introduces a defect, above the 12% limit for approving on its own.

The PR adds a one-time Turn on / Keep off offer for public-build installs that are off only because an older build wrote telemetry.enabled:false. off_offer_due fails closed and excludes env pins, DNT, the heartbeat being off (so CLI and dashboard disablers are excluded), the overlay, policy, LTS, CI, non-default homes, the user's own collectors and an already-acknowledged notice. Each exclusion has a test. Turn on writes the switch, checks it took effect, then records the Kiro acknowledgement; Keep off records only the notice version. Kiro export stays gated on kiro_telemetry_ack_version, so no path sends data without consent. Failure paths read the state back and are tested. The theme payload and firstRun changes are consistent with existing state readers. The only red lane is the per-commit First Principles process gate, and the owner decision behind it is recorded. Approve, pending the CI jobs still running.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit ba482abb42 · 677 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@chenmingwei23
chenmingwei23 force-pushed the feat/kiro-telemetry-off-notice branch 3 times, most recently from 4e70bbb to 1c05e7e Compare November 15, 2026 04:29
…ten false

Builds before local recording was on by default wrote telemetry.enabled: false
into every new config, so most existing public-build installs are off without
having chosen it and never see the version 3 notice that names Kiro telemetry.

kiro_export.off_offer_due names that one case: a written false, the heartbeat
on (including no KIROCREW_TELEMETRY_DISABLED), no env pin (DO_NOT_TRACK,
KIROCREW_TELEMETRY), no policy pin, no
config.local.json entry, no collector of the user's own, the destination listed
(not LTS, not CI), the default data home (checked on its own, so dev homes
that export are still not asked) and notice version 3 not yet
acknowledged. For it the theme boot payload reports the stored notice version,
and the collection status reports off_offer, so the dashboard shows the Privacy
chapter once in an off form that names Kiro telemetry with Turn on performance
metrics / Keep off. Its intro says turning them on also sends product usage
metrics to Kiro telemetry, and that while off only the daily heartbeat and
official app install receipts are sent;
Turn on writes
telemetry.enabled: true, confirms it took effect, then records the notice and
Kiro acknowledgements. Any failure is followed by a read-back: recording still off says nothing
changed; on says metrics are now on and the chapter shows the on form (Keep on /
Turn off); unreadable says Turn on may now be on, or for Keep off that the
choice could not be saved or confirmed (no button named that is not on screen). The off form lists the five heartbeat fields under the
intro, before either button, and its body fades at the bottom while more is
below. Keep off writes telemetry.enabled: false (already stored) and records only the
notice version, so it is not asked again. A start with no dashboard prints one line pointing at
`kirocrew telemetry enable`, once, on a terminal, and changes no setting.

The theme payload and the telemetry startup state, which now read the policy
profiles, run off the event loop.

README, the export guide, metrics.md and the crew-log telemetry RFC describe the
exception.
@chenmingwei23
chenmingwei23 force-pushed the feat/kiro-telemetry-off-notice branch from 1c05e7e to ba482ab Compare November 15, 2026 04:56
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

/ai-review override first-principles ba482ab owner-decision: owner decided a one-time off-form Privacy prompt (and one CLI line) for installs off only by an old written false; default stays off: #37463 (comment)

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@chenmingwei23 recorded a owner-decision release (class owner-decision) for the first-principles AI finding on ba482abb4259c7e78f8afe6e3a4f476fa5268157.

owner decided a one-time off-form Privacy prompt (and one CLI line) for installs off only by an old written false; default stays off: #37463 (comment)

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 15, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) November 15, 2026 06:36

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed head ba482ab. off_offer_due fails closed. It skips DO_NOT_TRACK, the env pins, the heartbeat being off, a policy pin, a config.local.json entry, a collector of the user's own, LTS, CI, a non-default home, and a notice that is already acknowledged. Each of those has its own not-due test, and deleting any one of those checks makes at least one test fail. Turn on writes telemetry.enabled: true only after a click. Kiro export still waits for its own acknowledgement. The new config reads in the theme payload run off the event loop. PR Readiness is green on this head.

One thing done well: Turn on reads the collection status back before it records any acknowledgement, and every failure path reads the state back before it tells the person anything.

The design is signed off under the standing maintainer sign-off for changes by team members.

  • Optional: Keep off only writes privacy_ack_version, and off_offer_due (kiro_export.py:245) and the CLI stamp check (notice.py:191) compare it against the live PRIVACY_NOTICE_VERSION. So the next notice bump asks everyone who chose Keep off again. You could compare against a fixed version 3, or store Keep off under its own key, and add a test that bumps the constant.
  • Optional: no test fails if you delete the off_offer_due guard in _maybe_print_offer (notice.py:193). A not-due case on the headless terminal path, reusing the table from test_it_is_not_due, would cover it.
  • Optional: the RFC and metrics.md hunks could say that someone who turned off only performance metrics in Settings is asked again, as the README already does. The CLI disable command and the chapter's Turn off are not asked again, because both also turn the heartbeat off.

@KiroCrewCaptain
KiroCrewCaptain merged commit 8de422d into main Nov 15, 2026
102 of 103 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the feat/kiro-telemetry-off-notice branch November 15, 2026 06:37
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 15, 2026
chenmingwei23 added a commit that referenced this pull request Nov 16, 2026
…f-form offer (#37460, #37463, #37545)

Backport to release/0.13.0 of three main commits, picked with
git cherry-pick -x in main's merge order and squashed into one commit.
They follow up #37183, which #37471 already put on 0.13:

- #37460 (2a679d6): the built-in
  kiro-telemetry destination is also returned under a non-default
  KIROCREW_HOME. kiro_export.destinations() drops only the
  is_default_home() check; the LTS, CI and test-suite gates and every
  consent gate stay. The heartbeat keeps its own default-home rule.
- #37463 (8de422d): installs that are off
  only because an older build wrote telemetry.enabled: false into their
  config are shown the Privacy chapter once, in an off form that names
  Kiro telemetry, with Turn on performance metrics / Keep off.
  kiro_export.off_offer_due decides that case; Keep off records only the
  notice version so it is not asked again.
- #37545 (09b0ddc): test only. The
  TestOffOffer tests fake the default data home, since the offer is asked
  only there and the test home is a private KIROCREW_HOME.

All three picks applied without conflicts; each backported patch is
identical to its main commit (git range-diff shows no change).

(cherry picked from commit 2a679d6)
(cherry picked from commit 8de422d)
(cherry picked from commit 09b0ddc)

Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com>
chenmingwei23 added a commit that referenced this pull request Nov 16, 2026
…f-form offer (#37460, #37463, #37545)

Backport to release/0.13.0 of three main commits, picked with
git cherry-pick -x in main's merge order and squashed into one commit.
They follow up #37183, which #37471 already put on 0.13:

- #37460 (2a679d6): the built-in
  kiro-telemetry destination is also returned under a non-default
  KIROCREW_HOME. kiro_export.destinations() drops only the
  is_default_home() check; the LTS, CI and test-suite gates and every
  consent gate stay. The heartbeat keeps its own default-home rule.
- #37463 (8de422d): installs that are off
  only because an older build wrote telemetry.enabled: false into their
  config are shown the Privacy chapter once, in an off form that names
  Kiro telemetry, with Turn on performance metrics / Keep off.
  kiro_export.off_offer_due decides that case; Keep off records only the
  notice version so it is not asked again.
- #37545 (09b0ddc): test only. The
  TestOffOffer tests fake the default data home, since the offer is asked
  only there and the test home is a private KIROCREW_HOME.

All three picks applied without conflicts; each backported patch is
identical to its main commit (git range-diff shows no change).

(cherry picked from commit 2a679d6)
(cherry picked from commit 8de422d)
(cherry picked from commit 09b0ddc)

Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com>
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