Skip to content

correct: Say why the entry was invalid when suggesting a repair #85

Closed as not planned

Description

@BenWestgate

When a string is invalid, correct shows only the repaired string. So does the interactive "Possible correction" prompt in secret, share, wallet and create --existing. codex32 check already names the problem. Keep offering the repair, and print one line to standard error that says what was wrong:

  • Header: the threshold is not 0 or 2–9, or the threshold is 0 and the share index is not S.
  • Length: the string is not one of the valid lengths.
  • Character set: the string contains a character outside the bech32 alphabet, such as i, b or o.
  • Case: the string mixes upper and lower case. Say that codex32 strings are either all uppercase or all lowercase, so a mixed-case string is invalid for that reason. Also say that letter case doesn't change the seed or its fingerprint. A tester's main worry here was whether a different case recovers the same wallet.

Checked with BIP-93 test vector 1 damaged five ways: last letter lowercase, threshold A, index A with threshold 0, I or B in the data, and one extra character. correct repaired each one without saying what was wrong, and check named the cause every time. This was on a disposable tip that includes #42.

This builds on #42 (#37), which makes correct repair mixed-case input. Without #42, correct on reviewability-v1 reports "No valid correction found" when an uppercase string has a single lowercase letter.

Activity

  1. added
    enhancementNew feature or request
    correctionCorrection engine and correction UX.
    cliCommand-line interface behavior.
    on Oct 1, 2026
  2. added a commit that references this issue on Oct 2, 2026
    83cadeb
  3. added a commit that references this issue on Oct 22, 2026
    ec065a3
  4. added
    wontfixThis will not be worked on
    securitySecurity invariants, hardening, and security-sensitive boundaries.
    on Oct 22, 2026
  5. BenWestgate commented on Oct 22, 2026

    @BenWestgate
    OwnerAuthor

    Not planned. A reason line next to a suggested correction can anchor the user on one explanation and lead them to skip the full comparison with their backup; see #101. The case question is answered in the user guide by #97: either case gives the same seed and fingerprint.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliCommand-line interface behavior.correctionCorrection engine and correction UX.enhancementNew feature or requestsecuritySecurity invariants, hardening, and security-sensitive boundaries.wontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions