Uh oh!
There was an error while loading. Please reload this page.
fix: resolve confirmed v0.40-dev bug-hunt findings - #395
Conversation
Adds intentionally-failing unit tests under tests/bugs/ that reproduce real
instability / wrong-result bugs found in the v0.40-dev line. Each test pins the
correct behavior and documents the source location, root cause, a concrete
reproduction, and a suggested fix direction. A follow-up change should fix the
underlying bug in src/ so these go green.
Bugs covered:
- contracts/index.ts arg parsing: crash on non-integer numeric args
(BigInt("1.5")); empty-string arg becomes number 0; odd-length b# hex drops
the last nibble; JSON args containing a float silently degrade to a raw
string (structure lost).
- wallet/browserSend.ts: nextLabel is cleared only on success, so a failed send
leaks its signing label onto the next transaction.
- wallet/browserBridge.ts: POST /api/connected accepts an empty/malformed body
and marks the bridge connected with an empty-string address.
- staking/StakingAction.ts: --staking-address without --network mutates the
shared BUILT_IN_NETWORKS singleton, leaking the address process-wide.
- vesting/validatorSetIdentity.ts: --extra-cid 0x... is UTF-8 re-encoded instead
of hex passthrough, corrupting on-chain identity bytes.
- staking/validatorExit.ts: a confirmed exit is reported as "Failed to exit"
when the cosmetic post-exit getEpochInfo() read transiently fails.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ja7QCkNnYByMDLou3qah6HImportant Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
MuncleUscles
commented
Jul 26, 2026
/run-e2e default v0.6 |
What
Adds regression coverage and fixes all 13 failures from the v0.40-dev bug hunt.
The fixes cover:
Address fixtures in the existing wallet-session tests were updated to valid EVM addresses so they exercise the stricter validation path correctly.
Validation
npm run buildnpm test -- --run --reporter=dot— 805 passedgit diff --check