Problem
Two keeper-facing bulk-scan getters in reader have zero test coverage anywhere in the repository:
get_liquidatable_positions (contracts/reader/src/lib.rs:1108) — scans positions and returns those currently below the liquidation threshold, presumably for a liquidation keeper to consume.
get_pending_orders (line 702) — scans and returns orders not yet executed/expired.
grep -rn "get_liquidatable_positions\|get_pending_orders" --include="*.rs" . | grep -v reader/src/lib.rs
# no output
Note get_adl_eligible_positions, the sibling bulk-scan function for ADL, does have direct test coverage (get_adl_eligible_positions_returns_profitable, get_adl_eligible_positions_excludes_losing) — these two functions are the ones that were skipped.
Why it matters
Both are the kind of "keeper polls this list, then acts on each entry" entry point where a filtering bug (returning positions that are actually healthy, or omitting genuinely liquidatable ones; including already-executed orders) has an operational impact — keepers either waste gas on no-op transactions or miss real liquidations/executions — and would not be caught by anything in CI today.
Suggested fix
Mirror the get_adl_eligible_positions tests: seed a mix of liquidatable/healthy positions and pending/executed/expired orders, and assert get_liquidatable_positions/get_pending_orders return exactly the expected subset.
Problem
Two keeper-facing bulk-scan getters in
readerhave zero test coverage anywhere in the repository:get_liquidatable_positions(contracts/reader/src/lib.rs:1108) — scans positions and returns those currently below the liquidation threshold, presumably for a liquidation keeper to consume.get_pending_orders(line 702) — scans and returns orders not yet executed/expired.Note
get_adl_eligible_positions, the sibling bulk-scan function for ADL, does have direct test coverage (get_adl_eligible_positions_returns_profitable,get_adl_eligible_positions_excludes_losing) — these two functions are the ones that were skipped.Why it matters
Both are the kind of "keeper polls this list, then acts on each entry" entry point where a filtering bug (returning positions that are actually healthy, or omitting genuinely liquidatable ones; including already-executed orders) has an operational impact — keepers either waste gas on no-op transactions or miss real liquidations/executions — and would not be caught by anything in CI today.
Suggested fix
Mirror the
get_adl_eligible_positionstests: seed a mix of liquidatable/healthy positions and pending/executed/expired orders, and assertget_liquidatable_positions/get_pending_ordersreturn exactly the expected subset.