Files
MagNetFlix/todo.txt
T
kiskaadee b32b4d09f1 docs(roadmap): resequence plan around Safe Walking Skeleton MVP
- Reorder docs/roadmap.md into an MVP-first vertical slice strategy (M2 Safe Walking Skeleton MVP followed by M3 hardening, M4 SSO/SSE/autocomplete UX, and M5 production Traefik deploy) while preserving all DEC-1 through DEC-8 invariants.
- Move former M1.8 (Base32 info_hash normalization and Alembic migration 003) into M3.1 so Milestone 1 closes cleanly in sync with Gitea Milestone #13 (6/6 issues), and enforce urn:btih:<40-hex> + [imdbid-...] checks in M2.
- Capture clean-room reproducibility constraints in M2 specs: fail-closed BFF AUTH_ENABLED=true default overridden in local Compose, canonical deployment env vars, relative template resolution inside services/bff/src, PUID:PGID bind-mount ownership, lazy Transmission client initialization, regular-file-only st_nlink checks, and incomplete-dir-enabled disabled.
- Update AGENTS.md section 2.5 to enforce four-way planning sync across docs/roadmap.md, todo.txt, Gitea issues/milestones, and Project Board #2.
- Narrow todo.txt active items strictly to the next immediate deliverable (Milestone 2: M2.1-M2.4).
2026-11-14 00:54:48 -05:00

23 lines
3.6 KiB
Plaintext

# Milestone 1: Contracts, Toolchain & Database Hardening (Complete — M1.8 moved to M3.1)
x 2026-10-31 (A) Create services/contracts workspace package with pyproject.toml (module-name = 'magnetflix') +contracts @workspace
x 2026-10-31 (A) Reconfigure buf.gen.yaml to output stubs into services/contracts/src, generate stubs + docs/api_spec.md, and track in Git +proto @contracts
x 2026-10-31 (A) Update services/worker and services/bff to depend on magnetflix-contracts via workspace dependency +deps @workspace
x 2026-10-31 (A) Update pyproject.toml to include tests/ in pyright, remove exclusions masking broken imports, and add test rule to Makefile +ci @workspace
x 2026-10-31 (A) Update services/worker/Dockerfile and services/bff/Dockerfile to copy services/contracts, and copy alembic/ into worker image +docker @deploy
x 2026-10-31 (A) Create Alembic migration 002_add_info_hash_and_partial_unique_index.py adding info_hash column and uq_download_jobs_active_imdb_id index +db @worker
x 2026-10-31 (A) Update DownloadJob ORM model and write unit tests in tests/test_db.py verifying duplicate active insertion rejection +test @worker
# Next Immediate Deliverable — Milestone 2: Safe Walking Skeleton MVP (See docs/roadmap.md for M3-M5)
(A) [M2.1] Implement Two-Tier Media Sanitizer in services/worker/src/worker/sanitizer.py (os.walk followlinks=False, reject symlinks/special/S_ISREG hardlinks/traversal/dangerous exts even inside Sample/, ignore clutter, discard samples & < MIN_VIDEO_BYTES video only, select largest video + subtitles) +sanitizer @worker
(A) [M2.1] Write unit tests in tests/test_sanitizer.py covering traversal, symlinks, hardlinks, dangerous ext inside Sample/, clutter ignore, subtitle size preservation, and largest video selection +test @worker
(B) [M2.2] Implement Stage 1 TmdbClient in services/worker/src/worker/metadata.py (lazy TMDB_API_KEY, ^tt\d{7,10}$ validation, /find/{imdb_id} v3 query, movie_results & release_date checks) +metadata @worker
(B) [M2.2] Implement core atomic relocator in services/worker/src/worker/relocator.py (sanitize_title, [imdbid-...] dup scan in MEDIA_DIR, disk_usage 1.05x check, .staging_<job_id> copy + os.replace swap, deterministic subtitle collision suffix) +relocator @worker
(B) [M2.2] Write unit tests in tests/test_metadata.py and tests/test_relocator.py +test @worker
(B) [M2.3] Implement lazy TransmissionClient wrapper in services/worker/src/worker/transmission.py via asyncio.to_thread +transmission @worker
(B) [M2.3] Implement minimal PipelineCoordinator in services/worker/src/worker/pipeline.py (urn:btih:<40-hex> + active dup/library checks, tracked asyncio.Task, 2s polling, short-lived sessions, finally cleanup) +pipeline @worker
(B) [M2.3] Implement gRPC PipelineServiceServicer in services/worker/src/worker/service.py & worker/main.py (SubmitDownload, GetJob omitting null completed_at, ListJobs offset/created_at DESC, UNIMPLEMENTED StreamJobStatus, SIGTERM shutdown) +grpc @worker
(B) [M2.3] Write tests in tests/test_transmission.py, tests/test_pipeline.py, and tests/test_grpc_service.py +test @worker
(B) [M2.4] Implement minimal FastAPI BFF in services/bff/src/bff/grpc_client.py, main.py, and services/bff/src/bff/templates/index.html (AUTH_ENABLED app default true, /healthz, POST/GET /api/v1/downloads, 3s polling form, gRPC->HTTP mapping) +api @bff
(B) [M2.4] Write API tests in tests/test_bff_routes.py +test @bff
(B) [M2.4] Author local docker-compose.yml (transmission healthcheck + incomplete-dir disabled, worker PUID:PGID + alembic upgrade head, bff AUTH_ENABLED=false, pre-created dirs) and run >= 100 MB public-domain torrent E2E verification +compose @deploy