@goodandready/dsh-key-rotation 0.8.55 → 0.8.56

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.56 - 2026-10-12
4
+
5
+ ### Fixed
6
+ - **Prevent Soft Transient Errors from Triggering Key Quarantine (#473)**:
7
+ - In `lib/rotate.js`, soft failures (`TIMEOUT`, 5xx, socket disconnects) no longer increment `failCounts` nor trigger the 30-minute `brokenUntil` quarantine.
8
+ - Synchronized `rotate.js` quarantine checks with `recordFailure` in `lib/pool.js` which deliberately excludes soft failures from exponential penalties.
9
+ - Added unit test coverage verifying soft failures do not trip quarantine while 3 hard failures correctly trigger recoverable quarantine.
10
+
3
11
  ## 0.8.55 - 2026-10-11
4
12
 
5
13
  ### Fixed
package/lib/rotate.js CHANGED
@@ -242,9 +242,10 @@ export function createRotate(deps) {
242
242
  }
243
243
  } else {
244
244
  pool.state.authFailCounts.delete(targetRef);
245
- if (!isQuota) {
246
- const _fc = (pool.state.failCounts.get(targetRef) ?? 0) + 1;
247
- pool.state.failCounts.set(targetRef, _fc);
245
+ // Soft/transient errors (TIMEOUT, 5xx, socket) do not count toward quarantine (#473).
246
+ // recordFailure already maintains pool.state.failCounts accurately for non-soft failures.
247
+ if (!isQuota && !cls.soft) {
248
+ const _fc = pool.state.failCounts.get(targetRef) ?? 0;
248
249
  if (_fc >= 3 && !pool.state.brokenUntil.has(targetRef)) {
249
250
  const quarantineMs = 1800000;
250
251
  pool.state.brokenUntil.set(targetRef, Date.now() + quarantineMs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-key-rotation",
3
- "version": "0.8.55",
3
+ "version": "0.8.56",
4
4
  "packageManager": "pnpm@10.33.2",
5
5
  "description": "Per-provider API key rotation for DeepSeek Harness: a key pool per provider, auto-created clone routes, and switching to the next key on quota/rate-limit errors. Includes a Settings section (Key Rotation) to edit the key pools, cooldown and switch codes.",
6
6
  "keywords": [