Skip to content

test: cover full per-offering config migration on issuer transfer - #859

Open
ogbemercyada-sketch wants to merge 1 commit into
RevoraOrg:masterfrom
ogbemercyada-sketch:feat/transfer-extra-config-tests
Open

test: cover full per-offering config migration on issuer transfer#859
ogbemercyada-sketch wants to merge 1 commit into
RevoraOrg:masterfrom
ogbemercyada-sketch:feat/transfer-extra-config-tests

Conversation

@ogbemercyada-sketch

Copy link
Copy Markdown

Add comprehensive config-migration test matrix for accept_issuer_transfer verifying that InvestmentConstraints, ClaimDelaySecs, SnapshotConfig, and LastSnapshotRef follow the offering under the new issuer identity.

Changes:

  • Fix test_issuer_transfer_migrates_all_configs: correct set_concentration_limit signature (add missing max_staleness_secs=&0u64 arg), add assert for rounding mode defaulting to Truncation under old issuer, add descriptive failure messages
  • Add config_migration_setup() helper to de-duplicate test boilerplate
  • Add 10 new tests covering:
    • Partial config (only 2/7 set): unset configs remain at defaults after transfer
    • Transfer-then-set: new issuer can overwrite all configs post-transfer
    • Old-issuer exclusion: old issuer cannot set investment constraints, claim delay, or snapshot config after transfer (three separate boundary tests)
    • Fresh-registration isolation: old issuer registering a new offering after transfer starts with clean defaults, not contaminated by migrated-away keys
    • Large snapshot ref boundary: u64 value 0xFFFF_FFFF_FFFF survives migration
    • Both-zero investment constraints (min=0, max=0) migrate correctly
    • Zero claim delay set explicitly still yields 0 under both issuers
    • Multi-namespace isolation: ns_a transfer does not affect ns_b configs
  • Apply cargo fmt --all to fix pre-existing formatting drift in lib.rs, tax_bucket.rs, and test_tax_year.rs so CI fmt check passes

Closes #844

Add comprehensive config-migration test matrix for accept_issuer_transfer
verifying that InvestmentConstraints, ClaimDelaySecs, SnapshotConfig, and
LastSnapshotRef follow the offering under the new issuer identity.

Changes:
- Fix test_issuer_transfer_migrates_all_configs: correct set_concentration_limit
  signature (add missing max_staleness_secs=&0u64 arg), add assert for rounding
  mode defaulting to Truncation under old issuer, add descriptive failure messages
- Add config_migration_setup() helper to de-duplicate test boilerplate
- Add 10 new tests covering:
  * Partial config (only 2/7 set): unset configs remain at defaults after transfer
  * Transfer-then-set: new issuer can overwrite all configs post-transfer
  * Old-issuer exclusion: old issuer cannot set investment constraints, claim
    delay, or snapshot config after transfer (three separate boundary tests)
  * Fresh-registration isolation: old issuer registering a new offering after
    transfer starts with clean defaults, not contaminated by migrated-away keys
  * Large snapshot ref boundary: u64 value 0xFFFF_FFFF_FFFF survives migration
  * Both-zero investment constraints (min=0, max=0) migrate correctly
  * Zero claim delay set explicitly still yields 0 under both issuers
  * Multi-namespace isolation: ns_a transfer does not affect ns_b configs
- Apply cargo fmt --all to fix pre-existing formatting drift in lib.rs,
  tax_bucket.rs, and test_tax_year.rs so CI fmt check passes

Closes RevoraOrg#844
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@ogbemercyada-sketch 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

Development

Successfully merging this pull request may close these issues.

Add issuer-transfer config-migration tests for InvestmentConstraints, ClaimDelaySecs, and SnapshotConfig

1 participant