Files
FolderShare/docs/TASKS.md
T

13 KiB

Foldershare tasks

This file holds accepted, scoped implementation work. It is not a speculative backlog. Known current-state observations belong in CURRENT_STATE.md; durable decisions belong in DECISIONS.md.

Completed tasks

TASK-001: Create a ChatGPT handover ZIP snapshot script

  • Status: Complete — Captain accepted on 2026-11-04 after running the script from the project root.
  • Objective: Provide a repeatable local script that archives the project into a ZIP suitable for ChatGPT handover.
  • Scope: Add the script under scripts/, write ZIPs under docs/snapshots/, add docs/snapshots/ and .worktrees/ to a root .gitignore, and provide brief usage documentation. Include project source and context, including uncommitted documentation, while excluding generated dependencies, local environments, runtime data, secrets, Git metadata, and prior archives.
  • Non-goals: Change application behavior, deploy, upload the ZIP, or alter repository history.
  • Acceptance criteria: One documented command from the project root creates a ZIP in docs/snapshots/; a root .gitignore ignores that folder and .worktrees/; its contents include application source and the six context files; node_modules, .venv, api/share, local environment files, database/runtime files, .git, caches, and generated output are absent; repeated runs do not include earlier ZIPs.
  • Relevant areas: scripts/, docs/snapshots/, root .gitignore, api/, react/, docs/, and existing ignore rules.
  • Dependencies and unresolved decisions: Captain selected the script and ZIP locations and approved this task's branch/worktree convention. The script includes safe untracked files, including the context files. General merge and release conventions remain pending in DECISIONS.md.
  • Risks: Accidental inclusion of secrets or shared files; omission of useful untracked context. The script needs an explicit exclusion list and archive-content inspection.
  • Validation plan: Create a sample ZIP, list its entries, check required inclusions and forbidden paths, and run a second snapshot to verify prior ZIPs stay excluded. Review the task diff against the approved base.
  • Recommended specialist skill: Webapp Feature for this scoped repository utility; Code Review if an independent security-oriented diff review is useful.

Task record format

Create a numbered TASK-### only for an accepted scope. Record its objective, scope, non-goals, observable acceptance criteria, relevant files, dependencies and unresolved decisions, risks, required automated and manual validation, and specialist skill recommendation. Use these statuses:

  • Accepted: scope approved and ready to select.
  • In progress: implementation underway in the task worktree.
  • Implementation-ready / awaiting Captain validation: implementation, required agent checks, diff review, context update, and handoff are ready; Captain/manual acceptance remains.
  • Complete: acceptance criteria and required Captain/manual validation are satisfied and recorded.
  • 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.

TASK-007: Configure testtask

  • Status: Complete. Captain confirmed the graphical test worked on 2026-11-25 and authorized commit and merge into codex.

  • Objective: Make the installed roborto-testtask engine usable for isolated FolderShare manual testing.

  • Scope: Wrapper, engine configuration, project lifecycle hook, exact safe snapshots of checked-out task branches including uncommitted/permitted untracked files, disposable SQLite/accounts/media, loopback Flask/Vite services, readiness, cleanup and documentation.

  • Non-goals: Application changes, copying live databases/media/secrets, dependency installation, containerization, merge or deployment; do not modify TASK-002.

  • Acceptance: One documented command prepares TASK-002, verifies snapshot hashes, starts isolated API/frontend, passes HTTP smoke checks, prints disposable credentials, and removes only owned state on exit. Repeated runs work; occupied ports and existing snapshots fail safely; malformed IDs/unknown sources are rejected. Captain manual browser validation required.

  • Dependencies: Installed roborto-testtask, Firefox, Python API environment, Node >=18 and existing react/node_modules; candidate must support FOLDERSHARE_DATABASE_URI (TASK-002).

  • Branch/worktree: Captain approved codex base, task/TASK-007-testtask and .worktrees/TASK-007. Captain authorized local integration into codex on 2026-11-25.

  • Risks: Snapshot omissions, stale source, secret inclusion, unsafe cleanup, port conflicts and dependency drift. Use hash manifests, exclusions, ownership markers and loopback binding.

  • Validation: Shell/Python syntax, adapter safety tests and engine lifecycle smoke using TASK-002; record graphical-browser limitations honestly.

  • Specialist: Roborto Project Context and Webapp Feature; bounded diff review.

  • TASK-007 evidence: Six adapter safety tests pass; shell/Python syntax and diff checks pass. Repeated real-server lifecycle runs pass, including headless Firefox startup, frontend/API HTTP readiness, proxy logins and disabled-login denial; snapshots removed on exit. Occupied-port refusal preserves an unrelated listener. The adapter uses existing dependencies and leaves the source application intact.

  • Captain accepted the graphical Firefox run using TASK-002. Six adapter tests passed again and the owned snapshot was removed on shutdown.