Repository navigation
fix(queue-stall): clear the stall alert with a reason the platform accepts (#4578) - #4593
Merged
Merged
Conversation
…cepts (Abilityai#4578) The stall service passed free-text reasons ('queue head moved', 'queue drained') to platform_alerts.clear, which forwards them to ask_service.clear_platform. That only accepts condition_cleared or superseded, so the ValueError was swallowed and the alert stayed pending. Use the default reason and add a test that every clear reason in the service is accepted.
Contributor
|
merge-train (2026-11-17): on the train as is. Validated at |
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.
Fixes #4578
Description
The
dispatch_queue_stalledalert never ended on its own.queue_stall_servicecalledplatform_alerts.clear(..., reason="queue head moved")andreason="queue drained", butplatform_alerts.clearforwardsreasontoask_service.clear_platform, which only acceptscondition_clearedorsuperseded. TheValueErrorwas swallowed byclear("never raises"), which returned 0, so the stall row stayed pending after the queue moved on and the sweep summary showed no error.Both call sites now use the default reason (
condition_cleared), as the issue suggests.Related Issue
Fixes #4578
Journey Impact
Journey Impact: none: bug fix in the stall alert clear path; no journey promise changes
Type of Change
Testing
New:
test_every_clear_reason_is_one_the_platform_acceptsintests/unit/test_4257_queue_stall_monitor.py. It scans theplatform_alerts.clear(...)calls inqueue_stall_service.pyand asserts any literalreasonis inask_service.PLATFORM_ENDING_REASONS. It is a static (AST) check in the style oftest_no_clear_site_names_a_person_kind, so it does not execute the clear path; it fails before the change and passes after. The 4257 queue-stall unit tests (monitor and setting) pass; the full suite was not run.Checklist
This PR was prepared with AI assistance (Claude Code).