real-debrid-downloader/tests
Sucukdeluxe cf5c498ee9 Fix: Mega-Debrid-Rotation verteilt jetzt ueber ALLE Accounts (Round-Robin statt First-Wins)
Symptom (User): 4 Accounts hinterlegt, aber die Rotation nutzte nur die
Accounts 1-3 — der 4. wurde nie angefasst, ausser man deaktivierte die
anderen manuell.

Ursache (im Live-Log des Servers belegt, rd_downloader.log): Die
Account-Schleife in unrestrictWithAccounts startete bei JEDER
Link-Aufloesung bei Account 1 und nahm den ersten brauchbaren
(First-Usable-Wins-Failover). Ein spaeterer Account kam nur dran, wenn
ALLE davor am Tageslimit/Cooldown/deaktiviert waren. Live-Verteilung:
Account 1 = 749 OK + 1314x "Tageslimit — bis Neustart gesperrt",
Account 2 = 1733 OK + 448x Tageslimit-Sperre, Account 3 = 1603 OK ohne
ein einziges Limit — die Kette endete deshalb IMMER spaetestens bei
Account 3, und Account 4 tauchte im gesamten Log mit keinem einzigen
Event auf (nicht getestet, nicht geskippt). Accounts 1-2 liefen also
staendig ins Tageslimit, waehrend die Kapazitaet von Account 4 jeden
Tag verfiel.

Fix: Round-Robin-Cursor in unrestrictWithAccounts. Jede Aufloesung
startet beim Account NACH dem zuletzt getesteten (Modulo ueber die
Liste), alle bestehenden Checks (deaktiviert, lokales Tageslimit,
Cooldown, Park-bis-Neustart) bleiben unveraendert und werden in der
neuen Reihenfolge durchlaufen. Damit verteilen sich Links gleichmaessig
ueber alle Accounts, kein Account wird mehr stumpf bis ans Limit
gehaemmert, und Account 4 nimmt automatisch teil. Der Cursor ist
Modul-State (bei App-Neustart wieder Account 1), die "naechster
Account"-Vorschau im Fehlerpfad folgt der Modulo-Reihenfolge, und
resetMegaDebridRuntimeStateForTests setzt ihn fuer deterministische
Tests zurueck. Die Debrid-Link-Key-Rotation (separate Schleife) bleibt
unveraendert First-Wins — dort ist kein Account konfiguriert; bei
Bedarf gleiches Muster nachziehen.

Nebenfix: Das Support-Bundle exportiert jetzt auch
logs/account-rotation.log (+ .old) — genau dieses Log fehlte im Bundle
und haette die Diagnose sofort geliefert (die Datei kollidiert
namentlich mit dem gleichnamigen Log des Multi-Hoster-Uploaders, daher
war zunaechst das falsche Log in der Analyse).

Tests: 2 neue Regressionstests (5 Links auf 4 Accounts -> 1,2,3,4,1;
Cooldown-Account wird in der Reihe uebersprungen), Suite 806 gruen,
tsc=6 Baseline, self-check + build ok.
2026-06-11 14:16:17 +02:00
..
account-check.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
account-rotation-log.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
app-order.test.ts Release v1.6.18 2026-03-04 17:31:20 +01:00
audit-log.test.ts Harden support logging and debug setup 2026-03-09 02:47:49 +01:00
auto-rename.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
backup-crypto.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
backup-payload.test.ts Backup: nur Settings als Default + 4 Selektions/Flicker-Bugfixes 2026-06-07 04:40:54 +02:00
bestdebrid-web.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
cleanup.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
container.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
debrid.test.ts Fix: Mega-Debrid-Rotation verteilt jetzt ueber ALLE Accounts (Round-Robin statt First-Wins) 2026-06-11 14:16:17 +02:00
debug-server.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
desktop-rename-log.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
download-completion.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
download-manager.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
error-ring.test.ts Add extended diagnostics logging 2026-06-07 17:00:06 +02:00
extractor-jvm.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
extractor.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
fs-error.test.ts Add extended diagnostics logging 2026-06-07 17:00:06 +02:00
german-audio-integration.test.ts Feature: Tonspur-Ergebnis sichtbar am Paket (audioStripSummary) 2026-06-09 20:42:22 +02:00
hybrid-collect-race.test.ts Fix: Hybrid-Race liess .DL.+Doppeltonspur auf einzelnen Episoden zurueck 2026-06-10 15:53:47 +02:00
integrity.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
item-log.test.ts Harden download integrity, extraction safety, and update security 2026-03-28 16:27:21 +01:00
link-export.test.ts Add app runtime statistics 2026-03-09 04:59:00 +01:00
link-parser.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
log-timestamp.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
mega-public-api.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
mega-web-fallback.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
notify-hooks.test.ts Test: Regressionstests fuer die Failed-Transition-Benachrichtigung (Mixed-Paket, Dedup, Run-Guard, Marker-Freigabe) 2026-06-10 00:37:40 +02:00
notify.test.ts Fix: Webhook-Zustellung haertbar — Discord-Rate-Limit, Retries, Kappung, Logging 2026-06-10 00:17:57 +02:00
package-log.test.ts Harden download integrity, extraction safety, and update security 2026-03-28 16:27:21 +01:00
package-order.test.ts Backup: nur Settings als Default + 4 Selektions/Flicker-Bugfixes 2026-06-07 04:40:54 +02:00
realdebrid-web.test.ts Fix Real-Debrid web login session reuse 2026-03-09 00:03:05 +01:00
realdebrid.test.ts Release v1.4.27 with bug audit hardening fixes 2026-02-28 14:12:16 +01:00
rename-log.test.ts Add dedicated rename support logging 2026-03-09 04:48:58 +01:00
resolve-archive-items.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
selection.test.ts Backup: nur Settings als Default + 4 Selektions/Flicker-Bugfixes 2026-06-07 04:40:54 +02:00
self-check.ts Comprehensive bugfix release v1.6.45 2026-03-05 03:53:28 +01:00
session-log.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
session-restart-loss.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
startup-health-check.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
storage.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
trace-log.test.ts Harden support logging and debug setup 2026-03-09 02:47:49 +01:00
update-restart-resume.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
update.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
utils.test.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
video-processor.test.ts Fix: zu weite Deutsch-Erkennung konnte falsche Tonspur behalten 2026-06-08 22:31:34 +02:00