Files
magpie/docs
yetone 409581c053 routing: Least used first spends credits about to lapse first (kudi3699 on X)
kudi3699: a WorkBuddy account with a 5000-credit pack ending next March,
half used, plus check-in credits ending soon, was ranked by the whole
pool's used share in "Least used first", so it was never picked and the
check-in credits were lost. Smart (Renewal, Lapse) and Use before expiry
(Pace) already went by the plugin's runsOutAt/runsOut; Least used did not.

Allowance.Lapsing is what a window loses at RunsOut (RunsOutLeft of Of, at
most what is left) as points of the used share, fading to nothing a week
out; an amount not told is 0. routes.Seat.Lapsing at >= 0.5 points puts a
seat with room ahead of the rest, soonest Lapse first, then Used as before.
A seat at 90%+ is not helped. It is the shared runsOutAt/runsOut field, so
any plugin that sends it gets this. The WorkBuddy plugin already reports it
(0.2.27, the soonest pack incl. check-in rewards), so no plugin change and
no mover min change.

Run (mote): go vet routes/provider/gateway; GOOS=linux -tags nogui and
GOOS=windows vet; go test internal/routes, internal/provider (all),
internal/gateway -run "WorkBuddy|LeastUsed|Smart|Pace|Routing". Broken by
hand: urgent() forced false turns TestLeastUsedSpendsLapsingFirst and the
gateway test red. Not run: the full suite (started after the tag), real
WorkBuddy accounts, the plugin's bun tests (plugin untouched).
2026-11-12 17:56:38 +08:00
..