Skip to content

share: Show the master fingerprint after the threshold - #100

Draft
BenWestgate wants to merge 9 commits into
claude/new-issue-fixes-fvhbl3-84from
claude/new-issue-fixes-fvhbl3-86
Draft

BenWestgate wants to merge 9 commits into
claude/new-issue-fixes-fvhbl3-84from
claude/new-issue-fixes-fvhbl3-86

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

V1 status: Deferred to post-v1. Current behavior is Codex-reviewed; this enhancement is not required by the supplied adversarial audit and was removed from the frozen-candidate scope after late-stack overlap with #101 was confirmed.

Requested by Ben · project thread

Problem

ms32 secret shows the recovered master fingerprint, but ms32 share did not, so an operator deriving a new card could not compare the recovered seed with the separate wallet record before writing that card.

Change

On an interactive terminal, ms32 share prints Master fingerprint: XXXXXXXX above the derived share whether the threshold was entered as ordinary shares or included S. --plain and redirected output stay unchanged. The fingerprint is derived only after a threshold-capable basis is present.

Review stack

This post-v1 branch currently contains #99 as an ancestor after stack-maintenance PR #123. The unrelated <5250 cap commit was removed and its old tip is preserved on archive/100-pre-restack-20261004.

The focused #100 delta remains the reviewed cli.py / test_cli.py fingerprint-after-threshold change. It is intentionally outside the v1 candidate; rebase it onto the eventual post-v1 runtime before integration.

Validation

The focused behavior has a Codex ACK. Prior validation passed 926 tests plus Ruff and strict mypy. Existing share/recovery validation still requires a threshold-capable compatible basis before a fingerprint can be recovered; redirected and --plain output behavior is covered by tests.

Closes #86.

AI-assisted stack maintenance and review. Responsible-human review/authorship policy still applies before integration.

@BenWestgate BenWestgate self-assigned this Oct 1, 2026
@BenWestgate
BenWestgate marked this pull request as ready for review October 1, 2026 13:54
@BenWestgate
BenWestgate force-pushed the 30-recorded-fingerprint-gate branch 2 times, most recently from a7efaae to 054e8d9 Compare October 1, 2026 22:02
Gate restore and existing-seed wallet initialization on the independently recorded BIP32 master fingerprint before any Bitcoin Core wallet mutation. Keep the correction path from disclosing or reusing a fingerprint derived from the candidate being authenticated.

Fixes #30.
@BenWestgate
BenWestgate force-pushed the 30-recorded-fingerprint-gate branch from 054e8d9 to 115f2c2 Compare October 2, 2026 08:57
Codex Agent and others added 5 commits October 2, 2026 03:58
Every correction plan returned its target set, that same set as primary, an empty reduced set, and a true timed flag. Only the targets and primary set were consumed. Derive primary from targets at the call site and remove the other fields. The search engine also accepted reduced without reading it, so remove that argument and update its test and benchmark callers. Search order and capture accounting remain unchanged. Refs #46.
The preceding all-isinstance check rejects every non-share, so the list-comprehension predicate in recovery could never discard an item. Pass the validated list directly, using a type cast to express the established invariant to mypy. Recovery still copies and validates the sequence internally. Refs #46.
Without bitcoin-cli every ms32 command said "Install a reviewed
bitcoin-cli before creating a backup", even commands that create
nothing, and the codex32 hint didn't say what it leaves out.

Say that Bitcoin Core 32 or newer must run with RPC enabled and that an
unsynced regtest or signet node is enough for practice. Then say what
the command uses Core for: the master fingerprint and correction ranking
for secret, share and correct (with the codex32 fallback and what it
omits), or giving Core the master key for create and wallet.

ms32 correct now connects before its search instead of after it, so a
missing Core no longer costs up to ten seconds of discarded work.

Closes #84

Claude-Session: https://claude.ai/code/session_015CuLXqAvAovfoVcUmmogwa
Connecting before the search made two problems easier to hit. With
damaged input piped to `ms32 correct` and two Core networks running,
the network prompt read the exhausted pipe forever. With stderr
redirected, "Using Bitcoin Core on ..." and a blank line came before
`interactive confirmation required`, which the security model says
must be the only message.

Ask for a network only when stdin is a terminal; a pipe now gets "More
than one local Bitcoin Core network is running." Print Core's messages
only when stderr is a terminal. The gate test's fake now reports like
the real one, so it catches the extra output.

Claude-Session: https://claude.ai/code/session_015CuLXqAvAovfoVcUmmogwa
`ms32 secret` shows the master fingerprint with the recovered secret,
but `ms32 share` never did, so the operator couldn't compare it with
the wallet record before writing a new card. Print it above the derived
share on a terminal, whether every input is a share or one of them is
the secret. `--plain` and redirected output stay unchanged.

Closes #86

Claude-Session: https://claude.ai/code/session_015CuLXqAvAovfoVcUmmogwa
@BenWestgate
BenWestgate force-pushed the claude/new-issue-fixes-fvhbl3-86 branch from eb37865 to 8aaf0fa Compare October 2, 2026 17:18
@chatgpt-codex-connector

This comment has been minimized.

1 similar comment
@chatgpt-codex-connector

This comment has been minimized.

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-generated review (Codex), posted at the maintainer's request.

Not ACKing a3a27b0 yet: this raises the installed-code budget from 5,200 to 5,250 without the explicit authorization AGENTS.md requires. The fingerprint-after-threshold behavior itself looks sound.

@BenWestgate BenWestgate added area: cli Command-line interface behavior. area: wallet/core Wallet integration and Bitcoin Core boundaries. gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review. labels Oct 4, 2026
@BenWestgate
BenWestgate force-pushed the claude/new-issue-fixes-fvhbl3-86 branch from a3a27b0 to 8aaf0fa Compare October 4, 2026 19:00
@chatgpt-codex-connector

This comment has been minimized.

@BenWestgate
BenWestgate changed the base branch from 30-recorded-fingerprint-gate to codex/remove-unreachable-v1-branches October 4, 2026 19:00

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-generated current-head follow-up review (Codex), posted at the maintainer's request.

ACK 8aaf0facce2d now that the unrelated <5250 cap commit has been removed.

The change displays the master fingerprint only on the interactive ms32 share path after a threshold-capable basis is available. --plain and redirected output remain unchanged, and the derivation/recovery validation that establishes the seed is unchanged. No security or correctness blocker found in this focused diff.

The PR is stacked on #105 and preserves <5200; run final CI on the actual integrated #105 + #100 tip before freeze. Responsible-human authorship/review policy still applies.

Temporary stack refresh: bring the reviewed #105 cleanup into #99's feature branch so the PR head and CI represent the intended combined tree. Human integration will rewrite/squash agent-authored history under repository policy.
Temporary stack refresh: bring the reviewed #105 cleanup into #100's feature branch so the PR head and CI represent the intended combined tree. Human integration will rewrite/squash agent-authored history under repository policy.
@chatgpt-codex-connector

This comment has been minimized.

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex current-head review at 13fef0f: no findings. Since the prior ACK, the only new commit brings in #105’s already exact-head-reviewed behavior-preserving cleanup; the fingerprint-after-threshold behavior is unchanged and remains confined to interactive output.

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI-generated current-head stack review (Codex), posted at the maintainer's request.

Code ACK 13fef0f39ec9 for the actual #105 + #100 head. #105 is now an ancestor of this branch; comparing #105 (361feb7) to the head yields only the focused cli.py and test_cli.py fingerprint-after-threshold changes. The unrelated <5250 cap change is absent.

The behavior remains scoped to interactive ms32 share: the fingerprint is available only after a threshold-capable basis is recovered, while --plain and redirected output remain unchanged.

Fresh current-head Python-package run #752 is still queued at the time of this review. Treat this as an exact-head code ACK with CI pending. Responsible-human authorship/review still applies before integration.

Temporary stack maintenance: make #99 an explicit ancestor of #100 so review and CI cover the intended late-v1 CLI stack. Human integration will rewrite/squash agent-authored history under repository policy.
@chatgpt-codex-connector

This comment has been minimized.

@BenWestgate
BenWestgate changed the base branch from codex/remove-unreachable-v1-branches to claude/new-issue-fixes-fvhbl3-84 October 4, 2026 19:16

Copy link
Copy Markdown
Owner Author

V1 disposition (Codex, 2026-10-04): defer this post-audit enhancement from the v1 candidate.

The focused behavior is reviewed and the current branch is cleanly stacked after #99, but the feature is not required by any validated DeepSeek/GLM/Kimi/consolidated audit finding. Attempting to carry #100 and #101 together exposed an actual overlap conflict in the late CLI stack. Resolve that after v1 rather than expanding the frozen-candidate review scope.

Keep this PR open for post-v1; its current-head code ACK remains useful. Human authorship/review is still required when integrated.

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex current-head review at 14b27b2: no findings. The restack now shows only #100’s reviewed fingerprint-after-threshold delta on top of current #99; the runtime/test change is unchanged in substance and still keeps the fingerprint on interactive, non-plain output only.

@BenWestgate
BenWestgate marked this pull request as draft October 4, 2026 19:18
@BenWestgate BenWestgate removed the gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review. label Oct 4, 2026
@BenWestgate
BenWestgate force-pushed the claude/new-issue-fixes-fvhbl3-84 branch 2 times, most recently from 3847389 to 27f4cc6 Compare October 6, 2026 14:33
@BenWestgate BenWestgate added the post-v1 label Oct 7, 2026 — with Claude

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

area: cli Command-line interface behavior. area: wallet/core Wallet integration and Bitcoin Core boundaries. post-v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants