Repository navigation
Conversation
A chat goes through many KAS sessions: a new one after an idle timeout, a gateway restart, or a model, project or harness switch. Each session carries the "telemetry is off" notice, and the dashboard added a notice row on the first turn of every one, so a long chat showed it on almost every message. _notice_steer_upgrade now skips the telemetry notice when the chat's loaded window already holds a notice row with the same text. A changed answer (the opt-out was not applied) has different text and still shows. The other session-start notices are unchanged. Closes kirodotdev#35781
|
This PR and #35788 both close #35781 and make the same fix: the KAS telemetry-off notice shows once per chat. Both change Please keep one of #35786 and #35788 and close the other, carrying over anything only this one has. |
Code change approver recommendation: A person should decideWhy: the decider raised 1 possible problem and estimates a 50% chance that this change introduces a defect; a person should check it. The fix stops the KAS telemetry notice repeating in the common case. But its "any identical notice row in the window" check hides an answer that comes back after a change. A chat whose sessions alternate between NOT_APPLIED and UNCONFIRMED (possible because the process telemetry setting comes from whichever folder started the process) loses the second NOT_APPLIED warning. The newest row then wrongly says the opt-out was sent. This contradicts the PR's and the spec's claim that a changed answer still shows. Compare against the latest telemetry row instead, and add a test for that sequence. Things to check (possible problems the decider raised; at this confidence many turn out to be fine):
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 |
Problem / Motivation
Goal: A KAS chat shows the "telemetry is off" notice once, not again on every new session of the same chat.
With kiro-cli telemetry off, a dashboard chat on the KAS harness shows the "Your kiro-cli telemetry is off..." notice again and again. In a long chat it shows on almost every message.
Why it matters
Everyone who opts out of kiro-cli telemetry and chats on KAS gets the same row repeated through the chat. It buries the conversation and makes a one-time fact look like a new warning each time.
Not a goal
shortcut:comment).What changed (motivation → approach → change)
A chat goes through many KAS sessions: a new one after an idle timeout, a gateway restart, or a model, project or harness switch. Each carries the notice, and the dashboard added a row on the first turn of each, with nothing to say the chat already showed it.
The session-start notice step (
_notice_steer_upgradeinsrc/kiro_crew/dashboard/chat_turn/turn_spec_hooks.py) now skips the telemetry notice when the chat's loaded window already holds a notice row with the same text. A changed answer ("not applied") has different text, so it still shows. The owning spec section says so.Backwards compatibility
Compatible: only the dashboard's notice rows change; no stored row, setting or API shape changes.
Removes nothing: the notice still shows on a chat's first KAS session and whenever its text changes; only repeats of a row the chat already shows are skipped.
Tests
test_a_chat_shows_the_telemetry_notice_once_across_its_sessions: three sessions of one chat give one row; a changed answer adds a row; the adapter-version notice still shows on every session.test_a_telemetry_row_from_another_role_does_not_hold_back_the_notice: the same words in a non-notice row do not count.Proof: PROVEN test/test_kas_cli_settings.py::test_a_chat_shows_the_telemetry_notice_once_across_its_sessions (head 10beda3)
Determinism: both new tests and their two neighbours passed 20 runs at
-n0, the whole file passed 10 runs at-n 4, and 5 shuffled orders passed.Manual verification
N/A — unit coverage sufficient: the change is one check on the chat's rows before a notice row is added, and the tests drive that step directly.
Related Issues
Closes #35781
Sibling sweep
Swept: git grep -n "telemetry_unconfirmed_notice|kas_telemetry_notice" -- src/
Siblings: none -- the dashboard's session-start notice step is the only place that turns this notice into a chat row.
Pattern harvest
Not generalizable: the other session-start notices are about the installed adapter and are meant per session; only this one states a per-chat fact.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)