[Chore] Add mnemonic codec regression tests and a real npm test CI gate - #7
Draft
roomote-conceal-network[bot] wants to merge 1 commit into
Draft
Conversation
Author
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.
What changed
Added a standalone C++ test harness for the mnemonic codec in
cpp/Mnemonics— the first test coverage in this repository.tests/mnemonics_test.cppcompiles directly againstMnemonics.cpp,CRC32.cpp, and the word list with a plain host compiler (no React Native host app needed) viascripts/run-cpp-tests.sh, wired up asnpm test.The eight tests cover:
CI now runs
npm testafter the existing lint/format/check/cpp steps, so the tests gate merges. Thenpm run cpp/cpp:fixformat scope was extended fromcpptocpp testsso the new test source is format-checked too.Why this change was made
The critical mixed-case mnemonic decode fix from #4 (and polish in #5) merged with zero test coverage: no test script, no test files, and no CI test job, even though CLAUDE.md documented
npm testas part of the quality gate. That doc/gate drift is closed by making the gate real and reconciling CLAUDE.md with what actually runs.Impact
No runtime behavior changes — the codec itself is untouched. Refactors of the mnemonic codec are now guarded by regression tests; as a sensitivity check, the mixed-case test was verified to fail against a copy of
Mnemonics.cppwith the #4 normalization fix reverted. The full local gate (npm run lint && npm run format && npm run check && npm run cpp && npm test) passes.