Repository navigation
test(rollout): pin the cleared speaker-grouping shadow allow-list (main shard 8/8 red since #26828) - #26853
Merged
Conversation
…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]>
There was a problem hiding this comment.
1 issue found across 1 file
Confidence score: 5/5
- In
test_rollout_cohort_deploy.py, the assertion can pass if the row has novaluefield, 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) |
There was a problem hiding this comment.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 since197be6283a(#26828), which is why "Backend unit shard 8/8" failson 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 servesSPEAKER_GROUPING_SHADOW: off), and set the key to""in both prod charts. The test still asserted the key isnon-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 listenSYNC_LINEAGE_RESOLVE_UID_ALLOWLISTandSTT_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) andtest_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 -qon main0d04614136: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