fix(cli): stop blank api key exiting deep_research prompt#184
Merged
Conversation
_prompt_api_key validated the raw input length but consumed the stripped value, so an all-whitespace key (e.g. 8 spaces) passed the >= 8 check, stripped to empty, and hit typer.Exit -- quitting raven with no message. Validate the stripped value instead: whitespace-only input is now rejected and re-prompts, matching every other caller. deep_research's key prompt also had no clean cancel path (only Ctrl+C, which exits the whole process). Pass allow_back so a truly-empty submit cancels configuration without touching the stored key, and give the prompt a "cancel"-worded hint via a new back_label so the placeholder no longer says "go back" where it actually cancels. Add tests covering the stripped-value validation, the empty-vs-blank distinction, and cancelling both the fresh and reconfigure flows. Co-authored-by: Claude (claude-opus-4-8) <noreply@anthropic.com>
0xKT
added a commit
that referenced
this pull request
Jul 22, 2026
## Summary Bump version from 0.1.7 to 0.1.8. Release commit only touches `pyproject.toml` and `uv.lock` (kept in sync via `uv lock`). Changes bundled into this release since v0.1.7: - feat(importer): cold-start import from other AI tools with EverOS HTTP backend (#170) - fix(build): pin locked dependency versions in installers (#185) - fix(cli): stop blank api key exiting deep_research prompt (#184) - fix: use redirect-free install.ps1 url on windows powershell 5.1 (#182) - fix(tui): brighten selection highlight for readability (#175) - fix(commitlint): align subject-case with conventional-commits standard (#187) ## Type - [x] Other ## Verification - [x] Relevant lint / type checks pass locally ``` python3 scripts/check_commit_messages.py origin/main..HEAD # exit 0 git diff --stat # pyproject.toml + uv.lock, 1 line each ``` ## Risk - [x] Backward compatibility considered Version bump only; no source changes. ## Related Issues N/A Co-authored-by: Claude (claude-opus-4-8) <noreply@anthropic.com>
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
The deep_research API key prompt (onboard Step 5 and
raven deep-research enable) exited raven with no message when a blank key was entered, and hadno clean way to cancel once you started configuring.
Root cause:
_prompt_api_keyvalidated the raw input length (len(v) >= 8)but consumed the stripped value. An all-whitespace key (e.g. 8 spaces) passed
the check, stripped to empty, and hit
typer.Exit-- quitting raven. Thisshared helper backs 8 call sites, so the crash affected every no-back caller.
Changes:
re-prompts (the reported "8 spaces exits raven" case); a truly-empty submit
is the back/cancel signal only where a caller opts in.
configuration without touching the stored key (previously only Ctrl+C, which
killed the whole process).
_back_placeholder/_prompt_api_keytake anoptional label so the in-field hint reads "cancel" here instead of the
default "go back", which would have been misleading.
Type
Verification
uv run pytest tests/test_cli_onboard_commands.py tests/test_cli_deep_research_commands.py-> 95 passeduv run ruff checkon the changed files -> cleanRelevant tests pass locally
Relevant lint / type checks pass locally
User-facing docs or screenshots are updated when needed
Risk
The fix only changes rejection/cancel behavior of a blank submit; a valid key
flows through unchanged. The stripped-value validation and the empty-submit
cancel were verified against all 8
_prompt_api_keycall sites (2 alreadyused allow_back and are behavior-identical for a real key).
Related Issues
Closes #180