Repository navigation
cli: Remove duplicated messages - #157
BenWestgate wants to merge 1 commit into
Conversation
Drop checks whose messages an earlier check already gives or makes unreachable: create's ms-only and --existing checks, the wallet commands' MasterSeed check, and create's HeaderCollision suffix, which repeated the library message. Ask the blank-wallet question in one place instead of three. Refs #156 Claude-Session: https://claude.ai/code/session_01Q1TNm1YeYW8K9W2eBvxmCD
3dd9404 to
50cbc19
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
BenWestgate
left a comment
There was a problem hiding this comment.
Focused security review — commit 50cbc19a500e2b324cc144f85b4c8bbdfc03a567 (PR #157, relative to #155 at 377f2bc).
Security ACK: no reportable findings in the two-file diff.
_master_seed: the removed runtimeisinstance(MasterSeed)check was redundant at the current trusted-artifact boundary._artifacts(profiles=(Profile.MS,))validates and filters the HRP,parse_codex32constructsMasterSeedformssecrets, andrecover_secretreparses the recovered secret.BitcoinCore.initializealso retains an independentMasterSeedtype check._create:_creation_headerreturns onlyProfile.MSor raises for other application prefixes; the remaining terminal guard rejects redirected input before Core connection or generation. The deletednot existing and not sys.stdin.isatty()branch was unreachable after that guard. Existing-source type, confirmation, identifier, and ceremony checks remain.HeaderCollision: itsCodexErrorstill reaches the generalexcept CodexErrorhandler and stops creation. Only the duplicated suggestion suffix is removed.BitcoinCore._select: the factoreduse(name)helper preserves all three explicit[y/N]prompts, exact affirmative choices (y/yes, case-insensitive), and rejection behavior. Eligibility is checked when listing candidates and rechecked after selection and before sensitive import; fingerprint/identity verification and relocking paths remain intact. No new bypass or sensitive-data output was found.
Read all changed source hunks and the relevant parsing, recovery, creation, Core eligibility/identity, and CLI call paths. Existing tests cover non-ms and redirected creation rejection, wallet-selection confirmations, unsafe-wallet filters, and identity gating. Exact-head GitHub CI passed: Python package run 39726929553 and Bitcoin Core wallet fixtures run 39726929557. The PR commit is absent from the local checkout, so tests were not rerun locally; this is a focused static security review supported by exact-head CI.
This sign-off applies to the current head 50cbc19, not future changes or the eventual fully integrated release candidate. Keep the #155 → #157 → #161 stack order and retest on the final integrated head.
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Before: some CLI messages repeated another message or sat behind a check that an earlier check already makes unreachable:
createsaid "Only Bitcoin master-seed backups can be created." after the header parser had already requiredms1.createchecked "Use --existing when supplying a seed or secret." after it had already required an interactive terminal.ms.After: each message lives in one place. What users see is unchanged, except that a header collision now prints only the library sentence.
How: one commit removes the four checks and adds a small
use()helper inside_select. Library: 4,859 to 4,844 logical lines. It's stacked on #155; retarget toreviewability-v1after #155 merges. #156 lists the remaining duplicates, which need a decision or a security review.Checks: 909 tests pass, plus
python -O -m pytest, mypy, ruff, verify_correction_constants and differential_correction. It touches no recovery, checksum or generation code.Refs #156
Generated by Claude Code