Skip to content

fix(bulk): propagate wizard cancellation to prompts - #540

Open
sylvesterkaczmarek wants to merge 2 commits into
openai:mainfrom
sylvesterkaczmarek:fix/bulk-wizard-prompt-cancellation
Open

fix(bulk): propagate wizard cancellation to prompts#540
sylvesterkaczmarek wants to merge 2 commits into
openai:mainfrom
sylvesterkaczmarek:fix/bulk-wizard-prompt-cancellation

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Keep bulk-scan wizard cancellation effective while the workflow is waiting on interactive prompts.

Fixes #539.

Reproduction / evidence

runBulkScanWizard() already accepts an AbortSignal, and BulkScanPrompt already exposes a signal parameter on select, input, and confirm.

Current main at 37bf87a692fc72d41f7312cc48808d699d204fba forwards the signal through GitHub authentication and repository discovery, but omits it at four blocking prompt boundaries:

  • account/organization selection;
  • repository selection;
  • output-directory input;
  • final start confirmation.

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, and selectGitHubOwner() accepted one but did not forward it to prompt.select().

Fix

  • pass the caller signal to account selection;
  • pass it through selectGitHubRepositories() to repository selection;
  • pass it to the output-directory prompt;
  • pass it to the final confirmation prompt.

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 same AbortSignal instance.

The branch is based directly on current upstream main at 37bf87a692fc72d41f7312cc48808d699d204fba and 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.

@github-actions github-actions Bot added the bug Something isn't working label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bulk-scan wizard drops cancellation while waiting on interactive prompts

1 participant