Files
2026-10-23 18:19:44 +02:00

6.7 KiB

Proxer-Downloader rollout roadmap

Baseline: upstream 211bfd174dd78eac36f3c74411ecaa72f56eec79.

The user approved the roadmap and authorized Phase 1 on 23 October 2026. The intended server is Debian 13, under the download account's home directory, with /mnt/media/WIP/ access through plex and administrative sudo available. After installing Phase 1 and the resolution fix, the user confirmed successful episode downloads, verification pause, manual confirmation, retry of the affected episode, and completion of the full queue. The user then authorized Phase 2, confirmed that both series and single downloads worked with its UI, and requested the dashboard, state-specific clear actions, numbered workers, current-download cards, season naming, and MongoDB token caching. The assistant has not accessed or changed the production server.

All phases preserve the exact contents and paths under scripts/lib/. New code stays outside that directory, and Python bytecode writing is disabled.

Current status: Phases 0, 1, and 2 are implemented locally. The user confirmed the initial Phase 2 workflow in production; the requested refinements are documented in the current report, including their acceptance checks. They preserve the unresolved-link pause fix. Phase 3 is the next planned implementation phase and awaits authorization.

Phase Scope Acceptance gate
0 — Review Clone and inspect the source; map data flow and preservation boundary Clean reviewed baseline and complete protected-tree manifest
1 — Reliable behavior Truthful subprocess results; child startup handling; safe input/output validation; corrected video title; public status projections; safe rendering; shared configuration; deployment feasibility Failed or malformed results cannot become successful jobs; infrastructure failures preserve pending requests; offline regressions and protected-tree checks pass
2 — UI shell and requested refinements Responsive top bar; default dashboard; active worker cards; accessible submission with season preview; filters, pagination and state-specific clear actions; numbered quick-add; per-submission token-cache validation Both modes work on mobile/keyboard; refresh preserves interaction state; bounded activity/history; failed access checks never enqueue or expose tokens; protected stream unchanged
3 — Shared execution modules Extract the shared Python executor and Node planning/process/supervisor services; structured events; temporary output and publication policy Compatibility of filenames/flags/stream call order; explicit results; safe output publication
4 — Recoverable queue Explicit authoritative states; ownership and heartbeats; attempts; recovery; retries; global concurrency; grouping and indexes Safe concurrent claims and worker-loss recovery; stale attempts cannot publish accepted output; reversible data migration
5 — Worker management Persisted defaults/overrides; pause/drain/restart/cancel; operational limits; proven external bandwidth control Settings are enforced and survive restarts; per-worker and shared bandwidth caps hold under concurrent transfers
6 — Release validation End-to-end staging checks; deployment documentation; migration/rollback; pilot with one, then two, then four workers Stable job lifecycle and recovery; measured limits; protected tree unchanged

Phase 1 boundaries

The legacy collections remain in place. Successful and ordinary failed jobs are still recorded in their respective history collections before removal from the queue; this sequence is not an atomic cross-collection transaction. Do not mix old and new worker code during a rollout. Stop or drain existing work before replacing the worker/script pair, because the new worker requires the new completion record and stdin credential interface.

Phase 2 delivers the top-bar redesign and improves the existing worker controls. Persisted advanced worker settings and enforced bandwidth control remain in Phase 5. Neither Phase 1 nor Phase 2 installs a bandwidth limit, privileged helper, network namespace, traffic-control rule, systemd unit, or sudoers entry.

The Debian bandwidth assessment recommends validating a separately privileged shaper on an isolated worker traffic path. The host's actual route/interface/capability details and measured incoming-rate behavior remain prerequisites for choosing the backend.

Phase 2 boundaries

The first UI release changed only web code and did not require a worker restart. The subsequent requested refinements add diagnostic identity to atomic worker claims and clear that identity when a claim is released. The metadata does not grant ownership, implement a lease, authorize recovery, or change download/verification behavior. Restart both web and workers after applying the refinement update to enable attribution on future claims. Drain waiting and active work before stopping and replacing worker code.

Series naming changes only for new web requests that explicitly provide season. The form always provides it; legacy clients that omit it retain their previous names. Existing files, queued filenames, standalone CLI names, and all Python/protected stream code are unchanged.

The token cache and numbered worker counter add documents to the existing settings collection. Existing queue credentials are not rewritten. Access checks use the first requested source and cannot guarantee validity after a token rotates mid-queue. No destructive migration is introduced.

Selected status results remain paginated, recent history is capped at five records per history state, and activity reads/display are capped at 50 jobs and 50 workers with explicit truncation notices. The shared summary avoids record/log/file/PM2 reads. Exact counts and literal filename searches still query legacy collections. Index planning, cursor pagination, durable ownership, recovery, and grouped jobs remain in Phase 4.

Rollback and migration

Keep the source version and database snapshot for each deployed phase. For Phase 1 rollback, stop the new workers and verify their children have terminated before restoring the old worker and Python entrypoints together. Additional history metadata is additive; no destructive database migration is introduced here. Rollback to the old application also restores its known reliability limitations and should be deliberate.

The later ownership/state migration requires draining legacy workers, preserving original records and filenames, and reconciling any in-flight attempts. Historical records lacking original source information remain historical; missing retry metadata must not be fabricated. Worker generations with different ownership rules must not run against the same active queue.