Skip to content

cli: Say why no correction is shown - #208

Draft
BenWestgate wants to merge 1 commit into
claude/project-thread-jhiarh-friendly-errorsfrom
claude/project-thread-jhiarh-no-correction-reasons
Draft

BenWestgate wants to merge 1 commit into
claude/project-thread-jhiarh-friendly-errorsfrom
claude/project-thread-jhiarh-no-correction-reasons

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Before: recovery entry and create --existing always said "No unique correction found. Check your backup and re-enter it carefully.", whatever happened. correct had three messages of its own, two of which said "Check the original backup."

After: every path says what happened, then gives the same advice:

  • "No correction was found. Check your backup and re-enter it carefully."
  • "The correction search ran out of time. Check your backup and re-enter it carefully."
  • "Several corrections are possible. Check your backup and re-enter it carefully."

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. _suggestions now also returns whether the search completed. NO_CORRECTION and the three correct messages 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

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant