beta-real-debrid-downloader/tests
Sucukdeluxe d0885ba552 Fix 16 bugs found by code review across all download modules
Critical fixes:
- Post-processor: remove double attempts increment (onProgress + onArchiveFailure both counted)
- Post-processor: fix slot leak when signal aborted after acquireSlot
- Scheduler: reset global watchdog high-water mark after stall event (prevents permanent misfires)
- Pipeline/DM: fix isPathInsideDir path traversal (add trailing separator check)
- Retry-manager: check per-kind exhaustion before shelve threshold (prevents bypass)
- Retry-manager: add MAX_SHELVE_COUNT=5 cap to prevent infinite shelve cycling

Important fixes:
- Scheduler: clear retryDelays and providerCooldowns on start()
- Scheduler: skip already-aborting slots in stall detection
- Download-manager: fix cleanupAfterExtraction using extractDir instead of outputDir for link removal
- Download-manager: add "extracting" to package normalizeSessionStatuses
- Download-manager: clear activeTasks map on stop()
- Download-manager: remove useless cachedDirectUrls re-insertion after success
- Stream-writer: remove duplicate truncation code in error path
- Stream-writer: skip alignedFlush in finally when bodyError already set (avoids 5min drain wait)
- Stream-writer: re-read elapsed after speed limiter sleep for accurate window reset
- Error-classifier: add HTTP 401 (Forbidden) and 410 (NotFound) classification

Tests updated to match new shelve/kind-exhaustion priority and 401 classification.
All 216 tests pass, build verified.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:33:06 +01:00
..
app-order.test.ts Release v1.6.18 2026-03-04 17:31:20 +01:00
auto-rename.test.ts chore: include pending changes from original project 2026-03-08 18:16:59 +01:00
backup-crypto.test.ts Redesign backup system: AES-256-GCM encrypted .mdd format 2026-03-07 16:39:19 +01:00
bestdebrid-web.test.ts Release v1.6.81 2026-03-06 12:09:39 +01:00
cleanup.test.ts Fix test suite: await async calls, update status expectations, add timeouts 2026-03-03 20:23:57 +01:00
container.test.ts Release v1.4.35 with 413 handling for both dcrypt endpoints 2026-03-01 02:00:52 +01:00
debrid.test.ts Release v1.7.1 2026-03-07 03:52:41 +01:00
download-manager.test.ts chore: include pending changes from original project 2026-03-08 18:16:59 +01:00
error-classifier.test.ts Fix 16 bugs found by code review across all download modules 2026-03-08 18:33:06 +01:00
extractor-jvm.test.ts Use bulk IInArchive.extract() for ~8x faster extraction, fix archive item resolution 2026-03-05 06:24:12 +01:00
extractor.test.ts Fix resume completion and rar fallback handling 2026-03-08 04:49:13 +01:00
integrity.test.ts Release v1.4.27 with bug audit hardening fixes 2026-02-28 14:12:16 +01:00
link-parser.test.ts Release v1.4.31 with full bug-audit hardening 2026-03-01 00:33:26 +01:00
mega-web-fallback.test.ts Comprehensive bugfix release v1.6.45 2026-03-05 03:53:28 +01:00
package-log.test.ts Add per-package detailed logs 2026-03-08 01:41:23 +01:00
package-order.test.ts Add daily traffic limits, auto-sort packages, Debrid-Link multi-key improvements 2026-03-07 02:29:48 +01:00
realdebrid.test.ts Release v1.4.27 with bug audit hardening fixes 2026-02-28 14:12:16 +01:00
resolve-archive-items.test.ts Use bulk IInArchive.extract() for ~8x faster extraction, fix archive item resolution 2026-03-05 06:24:12 +01:00
retry-manager.test.ts Fix 16 bugs found by code review across all download modules 2026-03-08 18:33:06 +01:00
self-check.ts Comprehensive bugfix release v1.6.45 2026-03-05 03:53:28 +01:00
session-log.test.ts Comprehensive bugfix release v1.6.45 2026-03-05 03:53:28 +01:00
storage.test.ts Fix session stats, extraction UX, and queue UI issues 2026-03-08 03:42:06 +01:00
update.test.ts Release v1.6.82 2026-03-06 16:43:49 +01:00
utils.test.ts Release v1.4.27 with bug audit hardening fixes 2026-02-28 14:12:16 +01:00