Repository navigation
Run the tests again, for the first time since 2021 - #33
Merged
Merged
Conversation
This repository has had no CI since July 2021. The .travis.yml it inherited stopped working when Travis ended its free open-source tier, and it was already broken before that -- its tarball job changes into electrum-nmc, the Namecoin repository this was forked from. Upstream Electrum moved to GitHub Actions after our fork point, so there was nothing to inherit either. 0 workflows, 0 runs. What that cost is on the record: a broken quotes contract in exchange_rate.py made test_wallet.py *hang* rather than fail, and the test it hung in already encoded the correct contract. Nobody saw it for years. The workflow runs flake8 and 20 of the 30 test modules -- 183 tests, green. Verified end to end in a clean container, every step as written: libsecp256k1 built from the pinned commit in contrib/make_libsecp256k1.sh, dependencies installed, linter clean, tests passing. Two things had to be fixed to get there: - contrib/requirements/requirements.txt asked for protobuf>=3.12 with no upper bound, and 3.21 rewrote the runtime so it refuses the _pb2.py files generated here. A fresh `pip install -r` produced a package that imports but cannot parse a payment request. Pinned to <3.21; regenerating the protos with protoc >= 3.19 would lift it. - flake8's --select matches by prefix, so E9,F63,F7,F82 quietly selects F824 as well. Ignored explicitly, with the six places it reports left as follow-up. Modules are picked by exclusion, so a new test file is covered without touching this workflow. The ten excluded ones fail on Bitcoin test vectors inherited at the fork -- addresses beginning bc1 rather than dc1, Bitcoin WIF keys, wallet files the wallet correctly refuses to open. 98 tests, and as far as I could tell not one a real defect; each needs a vector regenerated for this chain without deriving it from the code under test. Tracked separately. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This repository has had no CI since July 2021 — 0 workflows, 0 runs.
The
.travis.ymlit inherited stopped working when Travis ended its free open-source tier, and it was already broken before that: its tarball job still does- git clone https://github.com/$TRAVIS_REPO_SLUG.git && cd electrum-nmcelectrum-nmcis the Namecoin repository this was forked from. It changes into a directory that never existed here. Upstream Electrum moved to GitHub Actions after our fork point (4.1.5 was still on Travis), so there was nothing to inherit either.What that cost is on the record from this week: a broken
quotescontract inexchange_rate.pymadetest_wallet.pyhang rather than fail — andTestFiatalready encoded the correct contract (self.quotes = {'TEST': rate}). It sat there for years.What runs
E9,F63,F7,F82— the old Travis selection: syntax errors and undefined namesVerified end to end in a clean
python:3.9-slim-bookwormcontainer, every step exactly as written —libsecp256k1built from the pinned commit incontrib/make_libsecp256k1.sh, dependencies installed, linter clean, tests passing in 47 s.Modules are selected by exclusion, so a newly added test file is covered without touching the workflow.
Two things had to be fixed to get there
protobufhad no upper bound.contrib/requirements/requirements.txtasked forprotobuf>=3.12, and 3.21 rewrote the runtime so it refuses the_pb2.pyfiles generated here:A fresh
pip install -r contrib/requirements/requirements.txttoday produces a package that imports but cannot parse a payment request. That is a latent breakage independent of CI. Pinned to<3.21; regenerating the protos with protoc ≥ 3.19 would lift it.flake8's
--selectmatches by prefix.F82quietly selectsF824as well, which reports six redundantglobal/nonlocalstatements and would have made the linter red on day one. Ignored explicitly rather than by accident, and the six are written up in #32 — four are plain deletions, two need a partial edit, so they are follow-up work rather than something to fix on the way past.What is not covered
Ten modules, 98 tests, all failing on Bitcoin test vectors inherited at the fork:
As far as I could tell not one of them is a real defect — the second one is the wallet behaving correctly. Each needs a vector regenerated for this chain, and for the tests whose purpose is to pin address encoding that cannot be done by deriving it from the code under test without the test becoming circular. #32 has the full table and a suggested order, cheapest first. Take a module off the
EXCLUDElist as each is done.Deliberately not included: the Windows, Android, AppImage, macOS and tarball builds the old Travis file described. Those belong in a release workflow, not on every push.
🤖 Generated with Claude Code