Repository navigation
fix(ENG-4588): don't let a late status from a cancelled wait resume it - #264
Merged
vgoat21 merged 1 commit intoNov 16, 2026
Merged
Conversation
Since the wait's statuses are fired after the current event delivery (fireLater), the Queued a wait reported can arrive after the wait has been cancelled and has ended. With the program no longer tracked, AnalysisLogComponent took it for a new analysis and started another wait, which cleared the cancel and polled on. This is what failed testCancelledMonitoringUntracksProgram on the release PR. Statuses a wait reports now carry their own source, and never start a wait: only Start Analysis, reopening a program and the like do.
akashb95
approved these changes
Nov 16, 2026
robertmarsal
approved these changes
Nov 16, 2026
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 the staging failure on the release PR (#219):
TestAnalysisLogComponent.testCancelledMonitoringUntracksProgram, which timed out inwaitForTaskson Ghidra 12.0.2.Problem
PR #263 made the analysis wait fire its status events after the current event delivery (
fireLater), so that Ghidra would stop dropping them. This created a new race:AnalysisLogComponenttreated that status as a new analysis and started another wait.In the test, the mock always answers Queued, so the new wait never ended. For users, cancelling the wait could quietly undo itself.
Fix
RevEngAIAnalysisStatusChangedEvent.WAIT_SOURCE, checked withisFromWait().AnalysisLogComponentno longer starts a wait for these statuses. Only Start Analysis, reopening a program and the like start one.Testing
testStatusFromACancelledWaitDoesNotResumeIt. It cancels a wait, delivers its late Queued, and checks that no wait starts and polling doesn't resume. It fails without the fix, timing out inwaitForTasksas on CI../gradlew buildExtensionpasses../gradlew testpasses: 411 tests, 0 failures.