Repository navigation
test(metrics): fake the default home in the off-offer tests again - #37545
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check: this is a test-only change. It puts back the default-home fake in the one class whose tests depend on it, and leaves the shared fixture and production code alone. [DESIGN-REVIEWED] 89e67b3 Description read[DESCRIPTION-READ] 99aa7d1f97b4c0e8f61bf51ce7475157c1ee94c61f02e2abdf64cf87d5dc542b 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
7f38976 to
89e67b3
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Read the diff at 89e67b3: test-only, one autouse fixture on TestOffOffer that fakes beacon.is_default_home through the floor monkeypatch, so the class runs on the default home again after #37460 and #37463 crossed (#37546). The in-class test that sets it to False still overrides it. No product code changes.
…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>
…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>
Problem / Motivation
Goal: main's Backend Tests go green again: the off-offer tests run on the default data home they assume.
Three
TestOffOffertests intest/metrics/test_kiro_export_destination.pyfail on main at 87b11b5 (assert False is True):test_it_is_due_and_changes_nothing,test_the_collection_status_reports_itandtest_a_headless_terminal_start_prints_the_line_once. Two PRs merged minutes apart: #37463 added these tests, which rely on the sharedhomefixture fakingbeacon.is_default_home()as True, and #37460 removed that fake from the fixture becausedestinations()no longer reads it.off_offer_due()still asks only on the default home, so on the private test home it answers False.Why it matters
Every PR based on current main gets a red
Backend Testsshard and a red Coverage Gate for tests it did not touch.Not a goal
off_offer_due()or to who is asked; the default-home rule stays.homefixture, which feat(metrics): send product metrics from non-default data homes too #37460 shaped fordestinations().What changed (motivation -> approach -> change)
The offer tests lost a fake they depended on -> give that one class its own fake ->
TestOffOffergains an autouse fixture that setsbeacon.is_default_hometo True through_floor_monkeypatch, so a test's ownmonkeypatch.undo()cannot lift it. Thehomecase oftest_it_is_not_duestill sets it to False through the sharedmonkeypatch, which wins, so the not-on-a-dev-home check keeps its meaning.Backwards compatibility
Compatible: test-only change.
Removes nothing: test-only change; no code path changes.
Tests
test/metrics/test_kiro_export_destination.py: 78 passed, three runs, random order (it failed 3 on main before the change).test/test_flake_pattern_ratchet.pypasses; the repository semgrep rules (semgrep scan --config semgrep/, diff-scoped) andscripts/check_comment_history.pyagainst main report nothing.Proof: not provable -- test-only change
Manual verification
N/A -- test-only change.
Related Issues
Fixes #37546
Refs #37463, #37460
Checklist