Skip to content

wallet: Remove legacy bails-wallet - #202

Merged
BenWestgate merged 3 commits into
masterfrom
201-simplify-this-project-by-removing-bails-wallet
Oct 1, 2026
Merged

BenWestgate merged 3 commits into
masterfrom
201-simplify-this-project-by-removing-bails-wallet

Conversation

@BenWestgate

@BenWestgate BenWestgate commented May 17, 2025 •

Copy link
Copy Markdown
Owner

What

  • remove the custom bails-wallet entry point and its bundled wallet/Codex32 implementation
  • remove the Sparrow installer/runtime and its menu/desktop integration
  • purge managed legacy wallet files from tmpfs and Persistent Storage during install/update
  • repair the legacy read-only Bitcoin Core wallets directory after Persistent Storage is available
  • keep the persisted source mirror exact so deleted managed files do not survive updates
  • preserve recovery guidance for users of the removed wallet

Why

CipherStick should remain a narrow Tails + Bitcoin Core integration rather than own private-key handling or install an additional wallet coordinator. Removing both layers reduces the trusted code and package-supply-chain surface.

Closes #201
Closes #205
Closes #214

Testing

  • rebased onto current master at 462c5f1; current head 0a3f5f2 is mergeable
  • mandatory rebase preserved the reviewed 21-file scope and the current 100644 launcher mode; the three logical commits remain intact
  • Lint CI, dependency review, and CodeQL all pass on the rebased head
  • git diff --check
  • bash -n b bails/.local/bin/bails-menu bails/.local/bin/install-core bails/.local/bin/wrapped
  • exercised the legacy purge helper against fake Tails data: managed wallet files were removed, unrelated files survived, and an empty root was rejected
  • verified legacy Sparrow runtime/cache/desktop/MIME files are removed, bitcoin: is reassigned to Bitcoin Core, unrelated .local files survive, and Persistent .sparrow wallet data is preserved
  • verified the source-mirror rsync --delete removes stale destination files while /release-key.asc preserves updates: Authenticate signed releases #223's managed authenticated-update key
  • verified the wallet permission repair restores owner write permission on a real directory without dereferencing a symlink
  • repository search finds no remaining set_pass/SimplePassphraseDialog runtime references
  • all current inline review threads addressed

Merge ordering

Merge #202 first, then retarget and merge #230 immediately so the removed legacy flow is replaced by the reviewed python-codex32 flow without an intentional release gap.

Waiting for human

Pre-merge runtime gate: on Tails 7.13, update a previous CipherStick installation that has a read-only wallets directory, reboot, and verify Bitcoin Core can create a wallet. The 2026-09-29 fresh-install create/restore pass does not exercise this upgrade-only repair path.

@BenWestgate BenWestgate linked an issue May 17, 2025 that may be closed by this pull request
8 tasks
@BenWestgate
BenWestgate requested a review from epiccurious May 17, 2025 08:02
@BenWestgate
BenWestgate force-pushed the 201-simplify-this-project-by-removing-bails-wallet branch from 0927e1e to 3e53933 Compare September 19, 2026 00:34
@BenWestgate BenWestgate changed the title Simplify this project by removing bails-wallet wallet: Remove legacy bails-wallet Sep 19, 2026
@BenWestgate
BenWestgate force-pushed the 201-simplify-this-project-by-removing-bails-wallet branch from 2c02652 to f120780 Compare September 21, 2026 08:32
@BenWestgate

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f120780adf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread b

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f4806d9a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread README.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c58871c7e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread b
Comment thread bails/.local/bin/install-core Outdated
@BenWestgate

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd05699d06

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread docs/LEGACY_WALLET_RECOVERY.md Outdated

BenWestgate commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner Author

Ready for human review after history cleanup. #202 is now one atomic non-merge commit (8623e0a) on current master; its tree is identical to the pre-rewrite e3cd0c3 tip, so no code/content changed during the squash. The upgrade cleanup, correct Bitcoin URI MIME rewrite, and legacy read-only wallet-directory migration are all included. All review threads are resolved and CI is green. #234 remains a disable-only duplicate. #230 is stacked directly on this branch; merge sequence: #202 → #230. Please sign off on the force-pushed head.

@chatgpt-codex-connector

This comment has been minimized.

@BenWestgate
BenWestgate force-pushed the 201-simplify-this-project-by-removing-bails-wallet branch from e3cd0c3 to 8623e0a Compare September 25, 2026 16:22
@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 (Claude), posted at the maintainer's request.

Concept ACK, approach ACK. Not ACKing 8623e0a yet: the permission repair doesn't run on the upgrade path it was added for, and set_pass.py is left behind.

Tested: I ran remove_legacy_wallet_files against a fake Tails dotfiles tree with regular files, $HOME symlinks into dotfiles, a symlinked directory and .pyc globs. It removes exactly the listed paths, deletes links without following them, and leaves everything else. CI is green.

Also:

  • The PR body should describe the purge and the permission repair, and how both were tested on Tails. Suggested test: previous release with a read-only wallets directory, then Update CipherStick, reboot, and Create Wallet in Bitcoin Core.
  • Merge #230 right after this, so master never ships without a codex32 path.
  • nit: the single commit mixes three changes: the purge mechanism, the Sparrow removal (#205) and the bails-wallet removal. Consider three atomic commits.
  • nit: the commit body isn't wrapped at 72 columns.
  • nit: the bails.desktop mode change (755 to 644) is unrelated.

Comment thread bails/.local/bin/install-core Outdated
Comment thread b Outdated
Comment thread b Outdated
Comment thread docs/LEGACY_WALLET_RECOVERY.md Outdated
Comment thread README.md Outdated
Comment thread docs/Advantages_and_Disadvantages.md Outdated
@BenWestgate
BenWestgate force-pushed the 201-simplify-this-project-by-removing-bails-wallet branch from 8623e0a to 06ea1fd Compare September 25, 2026 17:30

Copy link
Copy Markdown
Owner Author

Review addressed in 06ea1fd: the wallet permission repair now runs on the CipherStick update path, the dead bails Python package is removed, the persisted source mirror uses --delete, stale wallet documentation is corrected, and the unrelated bails.desktop mode change is reverted. Kept this as one coherent commit; the 72-column commit-body nit is unchanged. All six inline threads are resolved and CI is green. Hold merge for the Tails 7.13 upgrade/runtime gate, then merge #230 immediately after.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 06ea1fdf44

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread docs/Advantages_and_Disadvantages.md Outdated

@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, posted at the maintainer's request.

ACK f7c574b for the removal code. The release-key --delete interaction is fixed and all CI is green.

Merge only as the first half of the #202 → #230 sequence; #230 restores the Codex32 feature that this branch's docs still describe.

@BenWestgate
BenWestgate force-pushed the 201-simplify-this-project-by-removing-bails-wallet branch from f7c574b to 3581b71 Compare September 27, 2026 00:57

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3581b71202

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

Comment thread b

@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, posted at the maintainer's request.

ACK 5f2a876. The rebase keeps the reviewed removal behavior; the new delta correctly marks Codex32 backups external until #230 lands. Lint, dependency review and CodeQL are green.

Merge immediately before #230.

@BenWestgate
BenWestgate force-pushed the 201-simplify-this-project-by-removing-bails-wallet branch from 5f2a876 to 06922fb Compare September 27, 2026 01:17
@chatgpt-codex-connector

This comment has been minimized.

BenWestgate added a commit that referenced this pull request Sep 29, 2026
Remove the recursive debug.log-based ibd-progress backup wizard now that Bitcoin Core owns synchronization status and the old wallet flow is gone. Clean up only its project-owned autostart/state files during installs and upgrades while leaving user data untouched.

Closes #265

Refs #170, #202, #249
Remove the in-tree bails-wallet, bundled codex32 helpers, decrypt-vault flow, and Sparrow installer so CipherStick no longer owns private-key handling or a second wallet stack. Update the menu, desktop metadata, documentation, and CI to match the reduced scope while preserving recovery guidance for existing backups.

Existing installs may still contain removed managed files or a wallets directory made read-only by the old flow. Purge only those known legacy paths during install/update and restore owner write permission on a real wallets directory without dereferencing symlinks. This prevents removed code from remaining executable and lets Bitcoin Core and python-codex32 create or import wallets after an upgrade.

Fixes #201

Fixes #205

Fixes #214

Refs #240
@BenWestgate
BenWestgate force-pushed the 201-simplify-this-project-by-removing-bails-wallet branch from 06922fb to 0a3f5f2 Compare September 30, 2026 01:31

@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.

LGTM

nit: about putting the removal script in ./b but we can move it later.

Copy link
Copy Markdown
Owner Author

Pre-merge runtime check passed on head 0a3f5f2. On Tails 7.13, @BenWestgate updated an older CipherStick install with this branch (bails/b --update), with its Persistent Storage unlocked at boot, then rebooted. Creating a wallet in Bitcoin Core worked, which confirms that the read-only wallets folder repair runs on the upgrade path.

One thing to know: on --update, the "CipherStick update successful" dialog appears before the background Persistent Storage copy and wallets repair finish. If a user closes the terminal immediately, the repair may not run. Master has the same flow, so this PR doesn't introduce it.


Generated by Claude Code

@BenWestgate
BenWestgate merged commit 99b4a3a into master Oct 1, 2026
5 of 6 checks passed
@BenWestgate
BenWestgate deleted the 201-simplify-this-project-by-removing-bails-wallet branch October 1, 2026 01:24
BenWestgate pushed a commit that referenced this pull request Oct 1, 2026
#202 was merged into master with new commit IDs but the same tree as
this branch's base, so this branch's content is already correct.
Record master as merged so GitHub sees no conflict.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjUU3NvvEE8SGD3RdpXWDr
BenWestgate pushed a commit that referenced this pull request Oct 1, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjUU3NvvEE8SGD3RdpXWDr
BenWestgate pushed a commit that referenced this pull request Oct 1, 2026
#202 was merged into master with new commit IDs but the same tree as
this branch's #202 base, so this branch's content is already correct.
Record master as merged so GitHub sees no conflict.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjUU3NvvEE8SGD3RdpXWDr
BenWestgate pushed a commit that referenced this pull request Oct 1, 2026
Resolve the Settings menu conflict: keep #202's removal of the Sparrow
button and handler, and keep this PR's Practice Passphrase button.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjUU3NvvEE8SGD3RdpXWDr
BenWestgate pushed a commit that referenced this pull request Oct 1, 2026
Resolve the Settings menu conflict: keep #202's removal of the Sparrow
button and handler, and keep this PR's Load AssumeUTXO Snapshot button.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjUU3NvvEE8SGD3RdpXWDr
BenWestgate pushed a commit that referenced this pull request Oct 1, 2026
Resolve the Settings menu conflict: keep #202's removal of the Sparrow
handler, and keep this PR's update-cipherstick launcher.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjUU3NvvEE8SGD3RdpXWDr
BenWestgate pushed a commit that referenced this pull request Oct 1, 2026
#202 removed the last Python file, so the Python scan now fails with
no source code found on master and every PR. Drop the Python-only
extractor settings and the .local rename that existed for it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjUU3NvvEE8SGD3RdpXWDr
BenWestgate pushed a commit that referenced this pull request Oct 1, 2026
This branch carried old copies of #202's and #226's commits. Take
211's tree and reapply only this PR's change (README link and
THREAT_MODEL.md), updated for the merged codex32 restore flow and the
checkout check's corruption-only scope.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjUU3NvvEE8SGD3RdpXWDr
BenWestgate pushed a commit that referenced this pull request Oct 1, 2026
This branch carried old copies of #202, #226 and #227. Take 212's tree
and reapply only this PR's change: HANDOFF.md, the README handoff link,
the copied-chainstate trust warning and the new FAQ handoff entry,
fitted to #226's rewritten FAQ.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjUU3NvvEE8SGD3RdpXWDr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant