Skip to content

test(rollout): pin the cleared speaker-grouping shadow allow-list (main shard 8/8 red since #26828) - #26853

Merged
Nizarius merged 1 commit into
mainfrom
fix/rollout-cohort-test-speaker-shadow-allowlist
Dec 1, 2026
Merged

Nizarius merged 1 commit into
mainfrom
fix/rollout-cohort-test-speaker-shadow-allowlist

Conversation

@Nizarius

@Nizarius Nizarius commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

What changed and why

tests/unit/test_rollout_cohort_deploy.py::test_helm_retains_legacy_fallbacks[prod-backend-listen] and
[prod-pusher] have been red on main since 197be6283a (#26828), which is why "Backend unit shard 8/8" fails
on main and on every PR that merges it.

The test holds the listen and pusher charts' allow-lists in place "until a later removal PR". #26828 was that
removal for SPEAKER_GROUPING_SHADOW_UID_ALLOWLIST (the retired speaker-grouping shadow: prod serves
SPEAKER_GROUPING_SHADOW: off), and set the key to "" in both prod charts. The test still asserted the key is
non-empty. #26828's own CI was green because a chart edit does not select this test file.

One line: the assertion now pins the cleared value. The key must still be present, and the other fallbacks
(DREAM_AGENT_UID_ALLOWLIST, and for listen SYNC_LINEAGE_RESOLVE_UID_ALLOWLIST and
STT_LIVE_DEMAND_UID_ALLOWLIST) are asserted non-empty as before. No chart or config file is touched.

Not in this PR: mapping the listen and pusher chart paths to this test in
backend/scripts/select_backend_unit_tests.py, so the next removal fails on its own PR. Say if you want it here.

The other two red tests on main are separate: test_flag_budget.py (review dates of 2026-11-30, #26600) and
test_listen_overlay_workflow.py (the evidence scripts pin, #26839).

Product invariants affected

none

How it was verified

cd backend && .venv/bin/python -m pytest tests/unit/test_rollout_cohort_deploy.py -q on main 0d04614136:
2 failed before (the two prod parameters, assert ''), 10 passed after.

Tests

The changed test is the regression test. No product code changed.

UI evidence

UI-Evidence: none -- test only

Failure class (fixes)

Failure-Class: none

🤖 Generated with Claude Code

…the prod charts

#26828 set SPEAKER_GROUPING_SHADOW_UID_ALLOWLIST to an empty string in the prod listen and pusher charts
(the shadow is retired) and left this test asserting a non-empty value, so shard 8/8 has been red on main
since then. The key must still be present; its value is now pinned empty. The other fallbacks are
asserted as before.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 1 file

Confidence score: 5/5

  • In test_rollout_cohort_deploy.py, the assertion can pass if the row has no value field, so it may not verify that the value was actually cleared. Assert the row exists and check its literal value.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="backend/tests/unit/test_rollout_cohort_deploy.py">

<violation number="1" location="backend/tests/unit/test_rollout_cohort_deploy.py:45">
P3: This assertion also passes when the row has no `value` field, because the dict comprehension defaults missing values to ''. To pin the literal cleared value, read the row directly, e.g. assert the entry exists and its `value` key equals ''.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

if stage == 'prod':
assert env['DREAM_AGENT_UID_ALLOWLIST']
assert env['SPEAKER_GROUPING_SHADOW_UID_ALLOWLIST']
assert env['SPEAKER_GROUPING_SHADOW_UID_ALLOWLIST'] == '' # removed with the retired shadow (#26828)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: This assertion also passes when the row has no value field, because the dict comprehension defaults missing values to ''. To pin the literal cleared value, read the row directly, e.g. assert the entry exists and its value key equals ''.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At backend/tests/unit/test_rollout_cohort_deploy.py, line 45:

<comment>This assertion also passes when the row has no `value` field, because the dict comprehension defaults missing values to ''. To pin the literal cleared value, read the row directly, e.g. assert the entry exists and its `value` key equals ''.</comment>

<file context>
@@ -42,7 +42,7 @@ def test_helm_retains_legacy_fallbacks(component, stage):
     if stage == 'prod':
         assert env['DREAM_AGENT_UID_ALLOWLIST']
-        assert env['SPEAKER_GROUPING_SHADOW_UID_ALLOWLIST']
+        assert env['SPEAKER_GROUPING_SHADOW_UID_ALLOWLIST'] == ''  # removed with the retired shadow (#26828)
         if component == 'backend-listen':
             for key in (
</file context>

@Nizarius
Nizarius merged commit a81e586 into main Dec 1, 2026
67 checks passed
@Nizarius
Nizarius deleted the fix/rollout-cohort-test-speaker-shadow-allowlist branch December 1, 2026 03:25
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.

1 participant