)]}'
{"watcher/decision_engine/strategy/strategies/workload_stabilization.py":[{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"5e4a207d9426ae067fab8e60b0cae4d1cb9dbad2","unresolved":false,"context_lines":[{"line_number":592,"context_line":"            hosts_load \u003d self.get_hosts_load()"},{"line_number":593,"context_line":"            min_sd \u003d 1"},{"line_number":594,"context_line":"            balanced \u003d False"},{"line_number":595,"context_line":"            migrated_instances \u003d set()"},{"line_number":596,"context_line":"            for instance_host in migration:"},{"line_number":597,"context_line":"                if instance_host[\u0027instance\u0027] in migrated_instances:"},{"line_number":598,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"0bedfe59_c33d0e00","line":595,"updated":"2026-10-30 18:44:07.000000000","message":"The core of this fix is the migrated_instances guard in do_execute(), but the added test only exercises the alternate-destination path: its first candidate is rejected by the disk check, so migrated_instances is still empty when every candidate is evaluated. The skip branch and the add-after-migrate bookkeeping are never evaluated against a following stale entry, so removing the guard would leave the entire unit suite green while re-opening the duplicate-migration crash this change fixes.\n\n**Severity**: WARNING | **Confidence**: 0.85\n\n**Impact**: A future refactor of do_execute or simulate_migrations could silently reintroduce the bug: the second self.migrate() call would reach migrate_instance\u0027s remove_edge on a missing edge, raising networkx.NetworkXError and failing workload_stabilization audits on fullsearch clusters, with no CI signal to catch it.\n\n**Suggestion**:\nExtend the new test (or add one) where a duplicate candidate follows a successful migration: mock check_threshold to return two disk-valid entries for the same instance whose first destination migrates, then assert strategy.migrate was called exactly once with the first destination and that the stale entry was skipped without a second migrate call. This directly reproduces the bug-2170351 scenario.","commit_id":"a677d5387167ebc4992f8ac1fc50918ff450618d"}]}
