Repository navigation
cli: Say why no correction is shown - #208
Draft
BenWestgate wants to merge 1 commit into
Draft
BenWestgate wants to merge 1 commit into
BenWestgate wants to merge 1 commit into
Conversation
Recovery entry, `create --existing` and `correct` now name what happened when no correction is offered: the search found none, the search ran out of time, or several corrections are possible. Each ends with the same advice to check the backup and re-enter it carefully. None of them says how to edit the entry. One private helper in correction.py writes the message, so a GUI can use the same wording. NO_CORRECTION and the three separate `correct` messages are gone. `_suggestions` now also returns whether the search completed. Claude-Session: https://claude.ai/code/session_01Q1TNm1YeYW8K9W2eBvxmCD
This branch has not been deployed
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.
Before: recovery entry and
create --existingalways said "No unique correction found. Check your backup and re-enter it carefully.", whatever happened.correcthad three messages of its own, two of which said "Check the original backup."After: every path says what happened, then gives the same advice:
None of them says how to edit the entry. A correction with little checksum discrimination left still asks for YES, as before.
How: one private helper,
correction._no_correction_message(candidates, complete), writes the message, so a GUI can show the same text._suggestionsnow also returns whether the search completed.NO_CORRECTIONand the threecorrectmessages are gone. Tests cover each reason.Stacked on #161. Per project policy this needs a security review before it is marked ready.
Checks run locally on 985ce44:
python -m pytest(921 passed), ruff, ruff format, mypy.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q1TNm1YeYW8K9W2eBvxmCD