Skip to content

fix(#831-#834): staleness boundary tests, full lifecycle cross-contra… - #942

Open
ahmadadebayo78-boop wants to merge 1 commit into
AtomicIP:mainfrom
ahmadadebayo78-boop:fix/831-832-833-834-treasury-upgrade-crosscontract-oracle
Open

fix(#831-#834): staleness boundary tests, full lifecycle cross-contra…#942
ahmadadebayo78-boop wants to merge 1 commit into
AtomicIP:mainfrom
ahmadadebayo78-boop:fix/831-832-833-834-treasury-upgrade-crosscontract-oracle

Conversation

@ahmadadebayo78-boop

Copy link
Copy Markdown

…ct tests, upgrade schema tests

#834: Add exactly-at-threshold (300s) and just-past-threshold (301s) staleness tests to oracle_tests.rs, covering both get_oracle_price and initiate_swap_with_oracle_price. Documents and locks the <= boundary in fetch_oracle_price_with_staleness_check.

#833: Add full-lifecycle cross-contract integration tests to cross_contract_tests.rs. Covers commit->initiate->accept->reveal->Completed, revoked IP rejection (IpRevoked), ownership-unchanged assertion after swap completion, and sequential swaps on the same IP after lock release.

#832: Uncomment and fix the broken upgrade schema test module in upgrade.rs. The entire #[cfg(test)] mod tests block was commented out and one test was dangling outside any module. Replaced with a proper live 14-test module covering valid upgrades, additive changes, version gate, missing/changed function/error/storage-key rejections, schema round-trip, and absence.

#831: Verified already fully implemented (no code changes needed). initialize() rejects zero/placeholder treasury with InvalidTreasury, tests exist in lib.rs, and both deploy scripts validate TREASURY_ADDRESS.
closes #831
closes #832
closes #833
closes #834

…cle cross-contract tests, upgrade schema tests

AtomicIP#834: Add exactly-at-threshold (300s) and just-past-threshold (301s) staleness
tests to oracle_tests.rs, covering both get_oracle_price and
initiate_swap_with_oracle_price. Documents and locks the <= boundary in
fetch_oracle_price_with_staleness_check.

AtomicIP#833: Add full-lifecycle cross-contract integration tests to
cross_contract_tests.rs. Covers commit->initiate->accept->reveal->Completed,
revoked IP rejection (IpRevoked), ownership-unchanged assertion after swap
completion, and sequential swaps on the same IP after lock release.

AtomicIP#832: Uncomment and fix the broken upgrade schema test module in upgrade.rs.
The entire #[cfg(test)] mod tests block was commented out and one test was
dangling outside any module. Replaced with a proper live 14-test module
covering valid upgrades, additive changes, version gate, missing/changed
function/error/storage-key rejections, schema round-trip, and absence.

AtomicIP#831: Verified already fully implemented (no code changes needed).
initialize() rejects zero/placeholder treasury with InvalidTreasury,
tests exist in lib.rs, and both deploy scripts validate TREASURY_ADDRESS.
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@ahmadadebayo78-boop 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