Repository navigation
Add comprehensive codex32 CLI, correction, and wallet integration #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
BenWestgate
wants to merge
82
commits into
master
Choose a base branch
from
reviewability-v1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
82 commits
Select commit
Hold shift + click to select a range
d041c7a
Update README.md
BenWestgate d602b40
fix error defs, rename functions, variables
BenWestgate 0ef306f
Add descriptor support and tests
BenWestgate 6b02914
Add command line interface (features incomplete)
BenWestgate d035ef8
Checkpoint accepted Gates 0 through 4
BenWestgate b20dde5
Validate checksum before profile lookup
BenWestgate f67f32a
Reduce sharing to fresh-index derivation
BenWestgate 8437951
Limit generation to BIP93 master seeds
BenWestgate 997d34a
Remove structural correction search
BenWestgate 8747cb3
Replace CLI with codex32-native commands
BenWestgate 279ac91
Narrow wallet interoperability
BenWestgate 266e250
Consolidate the reviewable v1 tree
BenWestgate c7f045a
Apply canonical Python formatting
BenWestgate 24e8324
Document frozen test fixture provenance
BenWestgate 877bf23
Reduce CLI and dependency surface
BenWestgate 1b31ed7
Localize untyped bip32 exception
BenWestgate 87145cb
Make wallet recovery modes explicit
BenWestgate ed87a27
Improve protected CLI input and checks
BenWestgate 04405bb
Make CLI language human-centered
BenWestgate 9e813ab
Improve validation and terminal feedback
BenWestgate f8cc496
Refine creation and recovery workflows
BenWestgate 5a7140b
Improve recovery input and correction guidance
BenWestgate 6edab4f
improved error messages for CLI commands and added a new CLI input mo…
BenWestgate 16e3f1e
implementation plan for production-ready v1
BenWestgate 8aa17dc
update plan
BenWestgate 5e79ab8
Set a reproducible Ruff baseline
BenWestgate a9b9778
Align the v1 release contract
BenWestgate 5244932
Expose bounded full-string correction
BenWestgate 75995d0
Assure Python 3.13 dependencies
BenWestgate 5170d85
Fix cross-platform CLI tests
BenWestgate 6067d21
Resolve Windows script directory
BenWestgate aa34df2
Type optional readline adapter
BenWestgate aa10d59
Preserve frozen corpus bytes
BenWestgate fa714e8
Record Gate 2 matrix evidence
BenWestgate aaea966
plan gate 3
BenWestgate 1e9e23b
Model structural correction bounds
BenWestgate 132d5c5
Add bounded structural correction
BenWestgate 4360a2a
Complete interactive wallet recovery
BenWestgate 6a3eb39
Ship reproducible recovery materials
BenWestgate 93718aa
Complete reviewability gate
BenWestgate 2aeb17d
Updated agents.md to use segwit_addr.py style code
BenWestgate 3215809
Update coding style for consistency.
BenWestgate 22990b9
Prepare codex32 1.0.0rc1
BenWestgate 528eed5
Refactor security model and improve checksum validation in parsing logic
BenWestgate 2cbe7ec
Improve creation and Bitcoin Core setup
BenWestgate 6696ee4
Improve card confirmation and test reviewability
BenWestgate 6802d86
Complete correction and recovery workflows
BenWestgate c377003
Refine repository contribution guidance
BenWestgate ea821ca
keep generation.py ruff formatted.
BenWestgate 51dfe54
Preserve compact exception declarations
BenWestgate fa82da4
Apply Ruff formatting to generation
BenWestgate 6d40bbf
Save v1 review work and checksum safeguards
BenWestgate 5007aca
Delegate wallet derivation to Bitcoin Core
BenWestgate e5cf604
Add contribution guidelines
BenWestgate b04f76c
Update .codex/config.toml to include new settings.
BenWestgate 1a14000
Remove checksum completion surface
BenWestgate 36d903d
Align wallet integration with Bitcoin Core v32
BenWestgate c118a83
Test exact Bitcoin Core v32 wallet help
BenWestgate 2c356e2
correction: Bound alignment cache
BenWestgate fba20e3
correction: retain target alignments
BenWestgate 92d75a7
bip93: Redact artifact string rendering (#25)
BenWestgate cf1a599
Include all code license notices (#15)
BenWestgate d6a9f99
Remove stale manifest exclusion
BenWestgate 6c0d763
build: Package referenced review evidence
BenWestgate 9c381f1
Restrict test workflow permissions
BenWestgate c243100
Remove repository agent overrides
BenWestgate f31f3dc
Test optimized mode in CI
BenWestgate 833c918
Require integer header thresholds
BenWestgate 26f933e
Validate supplied BIP32 master seeds
BenWestgate f19d462
docs: raise v1 review budget to 5200 lines
BenWestgate 992bc69
Remove Python wallet test dependencies
BenWestgate e990f09
Delegate wallet setup to Bitcoin Core
BenWestgate 863dbd8
wallet: Honor Unix rescan timestamps
55d06b0
docs: Correct Core rescan RPC list
e5b957a
ci: Verify wallet fixtures against Bitcoin Core
BenWestgate e6fcff1
correct: Interpret mixed-case damage
BenWestgate afdeffc
correct: Define correction exit statuses
BenWestgate dc12aed
cli: Remove pre-review dead code (#46)
BenWestgate aa5cebf
correct: Preserve mixed-case preflight seeds
BenWestgate 5325eb7
add README.md banner image
BenWestgate 1eed32c
wallet: Require the recorded fingerprint before import (#57)
BenWestgate 6dd7828
correct: Redact edit characters (#132)
BenWestgate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| tests/data/p70_correction_vectors.json -text |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Bitcoin Core wallet fixtures | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '.github/workflows/bitcoin-core-fixtures.yml' | ||
| - 'src/codex32/_bitcoin_core.py' | ||
| - 'src/codex32/_bip32.py' | ||
| - 'src/codex32/wallet.py' | ||
| - 'tests/data/wallet_fingerprints.json' | ||
| - 'tools/_wallet_test_vectors.py' | ||
| - 'tools/bitcoin_core_regtest.py' | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "17 9 * * 1" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| BITCOIN_CORE_ARCHIVE: bitcoin-32.0rc2-x86_64-linux-gnu.tar.gz | ||
| BITCOIN_CORE_SHA256: 0255103718033e6aee15fa944717fc277e047b845bff1e7408af0ea732d8d0c1 | ||
| BITCOIN_CORE_URL: https://bitcoincore.org/bin/bitcoin-core-32.0/test.rc2 | ||
|
|
||
| jobs: | ||
| verify: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
| python-version: "3.13" | ||
| - name: Download pinned Bitcoin Core | ||
| run: | | ||
| curl --fail --location --proto '=https' --tlsv1.2 \ | ||
| --output "$RUNNER_TEMP/$BITCOIN_CORE_ARCHIVE" \ | ||
| "$BITCOIN_CORE_URL/$BITCOIN_CORE_ARCHIVE" | ||
| echo "$BITCOIN_CORE_SHA256 $RUNNER_TEMP/$BITCOIN_CORE_ARCHIVE" | sha256sum --check | ||
| tar -xzf "$RUNNER_TEMP/$BITCOIN_CORE_ARCHIVE" -C "$RUNNER_TEMP" | ||
| - name: Verify every frozen wallet fingerprint against Core | ||
| env: | ||
| PYTHONPATH: ${{ github.workspace }}/src | ||
| run: | | ||
| core="$RUNNER_TEMP/bitcoin-32.0rc2/bin" | ||
| "$core/bitcoind" --version | head -1 | ||
| python tools/bitcoin_core_regtest.py \ | ||
| --bitcoind "$core/bitcoind" \ | ||
| --bitcoin-cli "$core/bitcoin-cli" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: Publish release | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| env: | ||
| SOURCE_DATE_EPOCH: "1763060600" | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
| python-version: "3.13" | ||
| - run: >- | ||
| python -c "import os,tomllib; | ||
| version=tomllib.load(open('pyproject.toml','rb'))['project']['version']; | ||
| assert os.environ['GITHUB_REF_NAME'] == f'v{version}'" | ||
| - run: >- | ||
| python -m pip install --require-hashes | ||
| -r requirements/release-build-dependencies.txt | ||
| - run: python -m build --no-isolation | ||
| - name: Normalize source-archive metadata | ||
| run: | | ||
| archive="dist/codex32-${GITHUB_REF_NAME#v}.tar.gz" | ||
| mkdir normalized-sdist | ||
| tar -xzf "$archive" -C normalized-sdist | ||
| tar --sort=name --mtime="@${SOURCE_DATE_EPOCH}" --owner=0 --group=0 --numeric-owner \ | ||
| -C normalized-sdist -cf - "codex32-${GITHUB_REF_NAME#v}" | gzip -n > "$archive.new" | ||
| mv "$archive.new" "$archive" | ||
| - name: Attach distributions to the GitHub release | ||
| run: gh release upload "$GITHUB_REF_NAME" dist/* | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| with: | ||
| name: distributions | ||
| path: dist/ | ||
|
|
||
| publish: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/p/codex32 | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | ||
| with: | ||
| name: distributions | ||
| path: dist/ | ||
| - name: Publish distributions to PyPI | ||
| uses: pypa/gh-action-pypi-publish@a892a5a61159132606e93a2fa6f4358831b04d26 # v1.14.2 | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,58 @@ | ||
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
|
||
| name: Python package | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "master" ] | ||
| pull_request: | ||
| branches: [ "master" ] | ||
|
|
||
| env: | ||
| SOURCE_DATE_EPOCH: "1763060600" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| test: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| python-version: ["3.12", "3.13"] | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - run: python -m pip install --upgrade pip | ||
| - run: python -m pip install --require-hashes -r requirements/cli-build-dependencies.txt | ||
| - run: python -m pip install --no-build-isolation -e '.[dev]' | ||
| - run: python -m pip check | ||
| - run: python -m pytest -q | ||
| - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' | ||
| run: python -O -m pytest -q | ||
| - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' | ||
| run: python tools/verify_correction_constants.py | ||
| - run: python -m mypy src/codex32 | ||
| - run: python -m ruff check . | ||
| - run: python -m ruff format --check . | ||
| - run: python tools/differential_correction.py --verify | ||
| - run: python -m build --no-isolation | ||
| - run: python tools/verify_wheel_environment.py | ||
|
|
||
| compatibility: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.10", "3.11", "3.12", "3.13"] | ||
|
|
||
| python-version: ["3.10", "3.11", "3.14", "3.15"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install flake8 pytest | ||
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
| - name: Lint with flake8 | ||
| run: | | ||
| # stop the build if there are Python syntax errors or undefined names | ||
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
| - name: Install package | ||
| run: pip install -e . | ||
| - name: Run tests | ||
| run: python -m pytest -q | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| allow-prereleases: ${{ matrix.python-version == '3.15' }} | ||
| - run: python -m pip install --upgrade pip | ||
| - run: python -m pip install --require-hashes -r requirements/cli-build-dependencies.txt | ||
| - run: python -m pip install --no-build-isolation -e '.[dev]' | ||
| - run: python -m pip check | ||
| - run: python -m pytest -q |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this build job is rerun after
gh release uploadsucceeded—for example because the following artifact-upload step failed—the same wheel and sdist names already exist on the release, so this command exits instead of allowing the release pipeline to recover. The GitHub CLI documentation exposes--clobberspecifically for replacing same-named assets; otherwise the workflow should detect and verify existing assets before uploading them.Useful? React with 👍 / 👎.