Skip to content

Add deposit worker integration test, pin deps, add key rotation - #1011

Open
evans-storm wants to merge 1 commit into
kellymusk:masterfrom
evans-storm:fix/896-897-898-deposit-test-deps-pin-key-rotation
Open

Add deposit worker integration test, pin deps, add key rotation#1011
evans-storm wants to merge 1 commit into
kellymusk:masterfrom
evans-storm:fix/896-897-898-deposit-test-deps-pin-key-rotation

Conversation

@evans-storm

@evans-storm evans-storm commented Aug 31, 2026

Copy link
Copy Markdown

Summary

Closes #896
closes #897
closes #898

  • Add integration test for deposit detection worker #896 — Added tests/deposit_worker_flow.rs: creates a wallet, mocks BlockchainListener with a fake deposit, runs poll_once (now pub), and verifies the payment row and XLM balance are created correctly. A second test confirms re-polling the same tx_hash doesn't double-record the payment or double-credit the balance.
  • Pin all Cargo dependencies to exact versions #897 — Every direct dependency in Cargo.toml now pins an exact version (matching what Cargo.lock already resolved to), not a caret range. Cargo.lock stays committed as the source of truth for transitive versions. Added .github/workflows/cargo-lock-check.yml running cargo check --locked so a Cargo.toml bump committed without regenerating the lockfile fails CI instead of silently drifting.
  • Implement WALLET_ENCRYPTION_KEY rotation without downtime #898 — Added --rotate-key, re-encrypting every wallet's secret_key_encrypted from WALLET_ENCRYPTION_KEY to WALLET_ENCRYPTION_KEY_NEW. Documented why this is safe without downtime today (nothing in the live server decrypts a wallet secret yet — see the doc comment on src/rotate_key.rs) and what would need to change once that's no longer true. A row that fails to decrypt with the old key is left untouched and reported, so a partial rotation is safe to re-run.

Also fixes a pre-existing extractor.rs compile break (ApiError gained a field member; two call sites weren't updated), needed for this branch to build.

Test plan

Closes kellymusk#896, kellymusk#897, kellymusk#898.

- kellymusk#896: Add tests/deposit_worker_flow.rs — creates a wallet, mocks
  BlockchainListener with a fake deposit, runs poll_once (now pub), and
  verifies the payment row and XLM balance are created correctly, plus
  that re-polling the same tx_hash does not double-record or
  double-credit.
- kellymusk#897: Every direct dependency in Cargo.toml now pins an exact version
  (matching what Cargo.lock already resolved to), not a caret range.
  Cargo.lock stays committed as the source of truth for transitive
  versions. Added .github/workflows/cargo-lock-check.yml running
  `cargo check --locked` so a Cargo.toml bump without a regenerated
  lockfile fails CI instead of silently drifting.
- kellymusk#898: Added `--rotate-key`, re-encrypting every wallet's
  secret_key_encrypted from WALLET_ENCRYPTION_KEY to
  WALLET_ENCRYPTION_KEY_NEW. Documented why this is safe without
  downtime today (nothing in the live server decrypts a wallet secret
  yet) and what would need to change once that's no longer true. A row
  that fails to decrypt with the old key is left untouched and
  reported, so a partial rotation is safe to re-run.

Also fixes a pre-existing extractor.rs compile break (ApiError gained
a `field` member; two call sites weren't updated), needed for this
branch to build.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MufZfphu6ouEFfuYyJxdwA
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@evans-storm Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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