#536

fix(legacy): handle cancelled source selection

OpenIams4kurawants to merge intofrom

Summary

  • Fixes: When the source selector is cancelled with Ctrl-D, prompt_select returns None and input_handler raises TypeError while evaluating int(None) instead of returning to the main menu.
  • Root cause: The next-step input path assumes prompt_select always returns a numeric option and indexes options without handling its documented no-result exit path.

Closes #513

Regression evidence

  • Before: uv run python -m pytest tests/legacy/test_pentest_gpt.py -q exited 1

  • After: uv run python -m pytest tests/legacy/test_pentest_gpt.py -q exited 0

Verification

  • uv run python -m pytest tests/legacy/ -q
  • make ci

Scope

  • 2 files changed, +27 / -0 lines