beta-real-debrid-downloader/tests
Sucukdeluxe efa0909e11 feat: Download System v2 — complete rewrite of download pipeline
Replace monolithic download-manager.ts (9500 lines) with 7 focused modules:

- error-classifier.ts: 25+ typed DownloadErrorKind enum, classifier functions
  for network/HTTP/debrid/extraction errors — no more string matching
- retry-manager.ts: Declarative per-error-kind retry policies, exponential
  backoff, shelving after 15 failures, state export/import
- stream-writer.ts: HTTP stream → file with pre-resume validation, stall
  detection, NTFS-aligned buffered writing, Range-ignored detection
- pipeline.ts: Single download lifecycle (unrestrict → stream → verify),
  throws typed errors, caller decides retry strategy
- post-processor.ts: Extraction state machine with hard caps (3 attempts
  per archive, 5 rounds per package), no infinite loops
- scheduler.ts: Queue management with priority-based slot allocation,
  heartbeat stall detection, global watchdog, provider cooldowns
- download-manager.ts: Drop-in orchestrator (~1500 lines), same public API

Fixes:
1. Hanging downloads: heartbeat-based stall detection + global watchdog
2. Wrong error classification: typed enum at point of origin
3. Unreliable resume: file size vs tracker validation, Range-ignored detection
4. Extraction loops: bounded retries with state machine

215 new unit tests for error-classifier and retry-manager (all passing).
Build compiles cleanly. Same IPC interface — UI unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 18:14:17 +01:00
..
app-order.test.ts Release v1.6.18 2026-03-04 17:31:20 +01:00
auto-rename.test.ts Fix session stats, extraction UX, and queue UI issues 2026-03-08 03:42:06 +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 Fix resume completion and rar fallback handling 2026-03-08 04:49:13 +01:00
error-classifier.test.ts feat: Download System v2 — complete rewrite of download pipeline 2026-03-08 18:14:17 +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 feat: Download System v2 — complete rewrite of download pipeline 2026-03-08 18:14:17 +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