def by_recovery
import cswap-bend-cli@0.1.0.0/policy/pick.bend as Pickimport Base
import cswap-bend-cli@0.1.0.0/policy/rank.bend as R
119# Is this candidate ranked by recovery rather than by headroom?
120def by_recovery(+rc: Maybe<&2, Nat>, +ar: Maybe<&2, Nat>, +ah0: Nat, +best: Nat, +now: Nat) -> Bool:
121 (Nat.is_le(ah0, 300n) && Nat.is_le(best, 300n)) || R.rec.within(rc, now) || R.rec.within(ar, now)