maxpool 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maxpool",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Multi-account Claude Code proxy with adaptive, rate-aware load balancing across Claude accounts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -2053,9 +2053,11 @@ export class AccountManager {
2053
2053
  next.peakWindows = peakWindows;
2054
2054
  }
2055
2055
  if (peakCap !== undefined) {
2056
- const c = Number(peakCap);
2057
- if (!Number.isFinite(c) || c < 0 || c > 1) return false;
2058
- next.peakCap = c;
2056
+ // The SAME coercion trap the read path documents: Number(null)/Number('')/
2057
+ // Number(false) are all 0 = the HARD BAR. A persisted 0 is then unreachable
2058
+ // by the read-path guard (typeof 0 === 'number'). Reject non-numbers here.
2059
+ if (typeof peakCap !== 'number' || !Number.isFinite(peakCap) || peakCap < 0 || peakCap > 1) return false;
2060
+ next.peakCap = peakCap;
2059
2061
  }
2060
2062
  if (peakDepreference !== undefined) next.peakDepreference = Boolean(peakDepreference);
2061
2063
  if (peakTimezone !== undefined) {