fix(bulk): propagate wizard cancellation to prompts - #540
Open
sylvesterkaczmarek wants to merge 2 commits into
Open
fix(bulk): propagate wizard cancellation to prompts#540sylvesterkaczmarek wants to merge 2 commits into
sylvesterkaczmarek wants to merge 2 commits into
Conversation
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.
Summary
Keep bulk-scan wizard cancellation effective while the workflow is waiting on interactive prompts.
Fixes #539.
Reproduction / evidence
runBulkScanWizard()already accepts anAbortSignal, andBulkScanPromptalready exposes a signal parameter onselect,input, andconfirm.Current
mainat37bf87a692fc72d41f7312cc48808d699d204fbaforwards the signal through GitHub authentication and repository discovery, but omits it at four blocking prompt boundaries:The focused regression injects a prompt implementation that records the signal received by each blocking call. With current-main call sites those values are
undefined; with this change all four receive the exact caller signal.The test drives the real wizard flow with deterministic GitHub responses, including both account and repository selection, then exits through the final confirmation without writing an inventory.
Root cause
Signal propagation stopped at the prompt call sites.
selectGitHubRepositories()did not accept a signal, andselectGitHubOwner()accepted one but did not forward it toprompt.select().Fix
selectGitHubRepositories()to repository selection;No prompt choices, repository filtering, discovery rules, or file-writing behavior change.
Tests / validation
Added
bulk-scan-discovery-cancellation.test.ts, which asserts the blocking prompt sequence and verifies every prompt receives the sameAbortSignalinstance.The branch is based directly on current upstream
mainat37bf87a692fc72d41f7312cc48808d699d204fbaand is not behind it. Production changes are 12 additions and 2 deletions; the remainder is focused regression coverage.Full repository tests cannot be run in this execution environment because the repository cannot be cloned here. Pushed-head CI remains the authoritative full-suite validation.
Risk
Low. This only supplies an argument that the prompt abstraction already supports. Behavior is unchanged when no signal is provided.