Skip to content

Remove duplicated user messages #156

Open

Description

@BenWestgate

Several user-facing messages repeat another message, or sit behind a check an earlier check already makes. Each copy is code to review and keep in sync.

Clear duplicates (first PR):

  • create: "Only Bitcoin master-seed backups can be created." _creation_header only returns ms, and rejects other prefixes with "The set header must begin with ms1."
  • create: "Use --existing when supplying a seed or secret." This can't be reached, because create already requires an interactive terminal.
  • create: HeaderCollision appends "; choose another set header" to the library's "new share set must use a different set header".
  • Wallet commands: "Wallet commands accept only Bitcoin master-seed secrets." _parse already rejects anything that isn't ms, and an ms secret is always a MasterSeed.
  • Bitcoin Core wallet choice: the "Use blank wallet …? [y/N]" prompt and its y/yes check are spelled out three times.

Needs a decision:

  • _FRIENDLY_SET_ERRORS rewords library errors for interactive entry, while piped input shows the library text for the same mistake. Dropping it would surface terse internal text such as "ms and bip39_12w cannot be combined" and "invalid Long codex32 checksum". The single-copy fix is to move the friendly wording into the library. That changes recovery-code messages, so it needs a security review. Two entries are wrong: MismatchedThreshold says "different numbers of shares" for a threshold-0 secret entered into share, and SecretInRecoverySet can't be reached.

Share generation (needs a security review):

  • generation._identifier repeats Header's identifier checks.
  • generation._seed_input repeats MasterSeed.from_seed's length check.

Recovery code (needs a security review):

  • bip93 "interpolation did not produce a secret" appears twice, and the second check is covered by the basis_secret_type check after it.

Smaller repeats (about 1–2 lines each):

  • "No unique correction found…" in create --existing vs NO_CORRECTION.
  • "Enter one of the displayed numbers.", "That wallet is no longer eligible. Choose again." and "Waiting; press Ctrl-C to stop." are each written twice in _bitcoin_core.py.

Activity

  1. self-assigned this
    on Oct 22, 2026
  2. added a commit that references this issue on Oct 22, 2026
  3. BenWestgate commented on Oct 22, 2026

    @BenWestgate
    OwnerAuthor

    The friendly-error wording decision is implemented in draft PR #158 (stacked on #157): _FRIENDLY_SET_ERRORS is removed, the messages now originate in the library, and threshold-0 recovery has an accurate distinct diagnostic. The scoped security diff review found no actionable issues; all 10 CI jobs pass (909 tests on Ubuntu/Python 3.12). This covers the friendly-set-errors portion of the issue; other duplicate-message candidates remain open.

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

Metadata

Metadata

Assignees

Labels

cliCommand-line interface behavior.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions