recon patch
This commit is contained in:
@@ -28,3 +28,71 @@ Create a numbered `TASK-###` only for an accepted scope. Record its objective, s
|
||||
- **Blocked**: work cannot proceed; state the blocking decision or dependency.
|
||||
|
||||
Do not mark a task Complete solely because automated checks pass. Keep each task's code, tests, and context changes on its dedicated branch; do not combine unrelated numbered tasks.
|
||||
|
||||
## Accepted V1 planning tasks (2026-11-04)
|
||||
|
||||
The scopes below translate Captain's explicit product requirements into implementation-sized tasks. **Accepted here means scope recorded for planning, not permission to implement, merge, or deploy without the required workflow preflight and task selection.** Take one task per branch/worktree; prioritize the security gate. Task IDs follow the snapshot's completed TASK-001.
|
||||
|
||||
### TASK-002: Enforce authorization and safe filesystem boundaries
|
||||
|
||||
- Status: Accepted; not started. **Release blocker; first implementation priority.**
|
||||
- Objective: Make user management and media access deny-by-default, including existing endpoints.
|
||||
- Scope: Require admin for create/update/delete user; block privilege escalation and self-service root changes; ensure disabled/deleted accounts cannot keep using access/refresh credentials; centralize server-side canonical media root/assigned-root containment; reject path traversal, symlinks escaping the media tree, malformed roots and missing files; remove client-controlled download path trust or disable old route pending TASK-004; ensure no server absolute paths leak in ordinary browsing responses.
|
||||
- Non-goals: New media UI, multi-root authorization, ZIP downloads or internet deployment.
|
||||
- Acceptance: Anonymous and normal users receive appropriate 401/403 for admin mutations; disabled users cannot authenticate or refresh; unassigned users see/download no media; traversal, absolute/encoded paths, sibling-prefix tricks and symlink escapes are denied; valid assigned descendants remain accessible; regression tests demonstrate outcomes; old unsafe routes inaccessible.
|
||||
- Relevant areas: `api/auth.py`, `api/models/user.py`, `api/routes/{file,user,token}_routes.py`, `api/settings.py`, new API tests.
|
||||
- Dependencies: Verify live config/runtime behavior and decide API response contract. Retain one-root permission model (PRD-002).
|
||||
- Validation: API syntax/import check, automated endpoint/path-security tests with temporary fixtures and user roles, inspect returned error messages for path leaks. Review diff; no real media used in tests.
|
||||
- Recommended specialist: Webapp Debug followed by Webapp Feature and Code Review.
|
||||
|
||||
### TASK-003: Secure folder browsing for assigned users
|
||||
|
||||
- Status: Accepted; not started.
|
||||
- Objective: Provide a usable browser rooted in each user's authorized directory without exposing real server paths.
|
||||
- Scope: Replace/adjust browsing API to return virtual paths or opaque IDs, list only authorized child folders/files and their safe metadata; wire navigation/breadcrumbs, empty/error states, and denied/unavailable-share behavior. Retain existing visual patterns unless specifically approved to redesign.
|
||||
- Non-goals: Upload, rename, delete, global search, multiple roots, ZIP selection.
|
||||
- Acceptance: Assigned user can navigate root/descendants but not climb above root or access siblings; no-root user sees a no-access state; admin can inspect available assignable folders via admin-only API; no host absolute paths in client payloads; unavailable NFS/share is handled without broken/infinite UI.
|
||||
- Relevant areas: API file routes/model; React FileBrowser and user-facing views.
|
||||
- Dependencies: TASK-002 shared authorization utilities; API shape documented during task.
|
||||
- Validation: API tests plus `npm run lint`, `npm run build`, manual navigation for admin/standard/no-root users.
|
||||
- Recommended specialist: Webapp Feature, Frontend Visual QA, Code Review.
|
||||
|
||||
### TASK-004: Opaque single-file downloading with resume
|
||||
|
||||
- Status: Accepted; not started.
|
||||
- Objective: Let an authorized user download one selected file through an opaque filename-free URL.
|
||||
- Scope: File-selection/download action, short-lived unguessable user-bound grants, server-side resolution and reauthorization, safe streaming, original filename in response headers, large-file/range support, error states, and prevention of source-path or token logging leaks where feasible.
|
||||
- Non-goals: Multi-select, ZIPs, media transcoding or streaming-player UI.
|
||||
- Acceptance: URL contains neither original filename nor physical path; unauthorized, expired, revoked, swapped-user, deleted-file and outside-root downloads are rejected; valid downloads preserve original filename; tested range/resume behavior; large files are not fully loaded in server memory; click handler actually triggers download.
|
||||
- Relevant areas: API file/download routes, auth and authorization service, React browser/download integration, API tests.
|
||||
- Dependencies: TASK-002 and browsing identifier/contract from TASK-003. Decide durable grant state vs signed token and resume semantics during design.
|
||||
- Validation: API integration/security tests including Range/206/416 handling where supported; frontend lint/build; manual large-file and interrupted-download verification using test data.
|
||||
- Recommended specialist: Webapp Feature and Code Review.
|
||||
|
||||
### TASK-005: Admin account and folder-assignment workflow
|
||||
|
||||
- Status: Accepted; not started.
|
||||
- Objective: Make the existing admin UI reliable for managing invited friends and a single permitted root per account.
|
||||
- Scope: Create accounts only as admin, assign/unassign valid roots, enable/disable accounts, reset/change passwords administratively, review/delete users with guardrails, and correct UI/API error/confirmation states. Preserve an admin bootstrap method without public registration.
|
||||
- Non-goals: Self-registration, invitations by email, sharing multiple disconnected roots, cosmetic redesign.
|
||||
- Acceptance: Non-admin cannot see or invoke admin management; create/disable/reset/delete operations have tested authorization; assigning a root immediately updates access; unassigning denies media; cannot accidentally remove final admin or disable self without recovery policy; UI accurately handles success/failure.
|
||||
- Relevant areas: `api/routes/user_routes.py`, model/migrations if needed, `react/src/views/{Users,User}`, routes/auth context.
|
||||
- Dependencies: TASK-002; consider overlap with security fixes limited to enforcing current route protections.
|
||||
- Validation: Automated admin/standard user tests, frontend lint/build, Captain's manual account-management review.
|
||||
- Recommended specialist: Webapp Feature, Frontend Visual QA, Code Review.
|
||||
|
||||
### TASK-006: Raspberry Pi deployment and operational safeguards
|
||||
|
||||
- Status: Blocked pending Captain's remote-access and target-Pi decisions; no deployment authorized.
|
||||
- Objective: Package and operate the app safely on a Pi accessing an existing media share.
|
||||
- Scope: Resource-conscious service/container configuration, read-only bind mount of media, resilient mount/dependency behavior, secure secrets, TLS via selected entrypoint, restart/logging strategy, backup/restore for account data, and a documented non-destructive deployment/rollback procedure.
|
||||
- Non-goals: Port forwarding or public release without explicit approval, moving the media library, ZIP preparation.
|
||||
- Acceptance: Tests/health checks handle absent share; a restarted app retains user metadata; media cannot be written by app process; TLS/auth and exposure model tested; documented recovery and rollback; Captain accepts before live launch.
|
||||
- Relevant areas: New deployment files/docs (not yet present); API settings/config.
|
||||
- Dependencies: TASK-002 through TASK-005; DEP-001 external-access choice, Pi host allocation, network share source, DNS/TLS route.
|
||||
- Validation: Build/start/stop on target Pi, mount failure simulation, authorization smoke tests, backup/restore rehearsal, manual access review.
|
||||
- Recommended specialist: Production Readiness Review and Deployment Check.
|
||||
|
||||
## Future feature concept (no numbered task yet)
|
||||
|
||||
- Batch file/folder selection and prepared or streamed ZIP download (PRD-004). Scope a task only when Captain schedules it. ZIP entries must reuse V1 path/permission protections; no compression-heavy default for large existing videos.
|
||||
|
||||
Reference in New Issue
Block a user