TASK-007 Add isolated manual testing adapter

This commit is contained in:
rob
2026-11-25 21:31:04 +00:00
parent cd6d6b3a83
commit dedddfc225
13 changed files with 407 additions and 15 deletions
+21 -14
View File
@@ -1,26 +1,33 @@
# Foldershare handoff
This is a replaceable snapshot. Live repository/Git and maintained context take precedence.
Updated 2026-11-05. TASK-007: **Implementation-ready / awaiting Captain validation**.
- Updated: 2026-11-04 (planning reconciliation from `foldershare-20261104-160824-012796.zip`)
- Snapshot documents report `codex` / `767b424` at the earlier inspection; live Git worktree, branch, status and HEAD **have not been checked** in this archive-only reconciliation.
- Files changed by patch: `docs/PROJECT_OVERVIEW.md`, `docs/DECISIONS.md`, `docs/CURRENT_STATE.md`, `docs/TASKS.md`, `docs/HANDOFF.md` only. No application code, no tests executed, no merge or deployment.
## Location and state
## Current outcome
Implementation: `/home/rob/projects/foldershare/.worktrees/TASK-007`, branch `task/TASK-007-testtask`, base `codex` / `cd6d6b3`. Uncommitted; no merge/push/deployment. Primary and TASK-002 worktrees untouched. TASK-002's own handoff remains in its worktree and its acceptance is separate.
Captain defined FolderShare as a private Pi-hosted, read-only browser/download service for named friends. V1: single assigned root per user, admin-controlled accounts, browse and single-file download using opaque filename-free URLs. Future: multi-select ZIP downloads. The patch records PRD-001 through PRD-004 and DEP-001, plus TASK-002 through TASK-006; security/auth fixes must precede exposure.
## Captain action
## Major static-source risks to address
From `/home/rob/projects/foldershare`:
`POST /api/file` trusts client path; user mutation routes lack admin checks; listing exposes host paths; download click is not wired; token/disabled behavior needs tests. See `CURRENT_STATE.md`. Do not expose this snapshot implementation to untrusted users.
```sh
./.worktrees/TASK-007/scripts/testtask.sh 002
```
## Next Codex action
Choose Firefox. The launcher opens http://127.0.0.1:5503 and prints this session's disposable password for `captain` (admin), `friend`, `unassigned`, `disabled`. The disabled account must fail login. Confirm admin user-management and folder assignment behavior, then Ctrl-C in the terminal to stop servers and remove session data/snapshot. No live accounts/media are copied. After integration, the shorter command is `./scripts/testtask.sh 002`.
1. In the **live repository**, read AGENTS/context documents and inspect branch, HEAD, git status, worktrees and existing changes before applying this patch. Check patch with `git apply --check`; do not overwrite later edits.
2. Apply documentation-only patch, review diff and report conflicts. Do **not** quietly replace newer state or start any implementation task.
3. Ask Captain to select TASK-002 as first implementation task and approve concrete integration branch/worktree conventions (live `codex` vs proposal `main`). Keep TASK-006 blocked pending remote access and target Pi choice.
4. Once authorized, create one isolated worktree for TASK-002, implement/test there, and submit a Captain-validation handoff. Do not merge or deploy without authority.
Keep TASK-002 stable during testing; rerun after edits. Snapshots are exact safe-file copies under TASK-007's ignored `.test-worktrees/task-002`, not Git branches or editing sources. Hash manifest and session state are in a private engine temporary directory. Existing snapshots are never overwritten. See `scripts/README.md` for prerequisites, exclusions, ports, Node/Python overrides and abrupt-exit recovery.
## Validation
Patch was generated from the exact supplied ZIP. No live Git or application validation can be claimed from the archive alone.
- `python3 -m unittest discover -s scripts/tests -v`: six pass.
- `bash -n scripts/testtask.sh .roborto/testtask-hook .roborto/testtask.conf`: pass.
- `python3 -m py_compile scripts/testtask_adapter.py` and `git diff --check`: pass.
- Engine runs against TASK-002: 75-file snapshot hash verification; real Flask/Vite readiness; frontend 200, direct/proxied protected API 401; valid fixture logins and disabled rejection; actual headless Firefox startup; automatic cleanup. Repeated sessions succeed. Occupied-port test confirms safe refusal without killing the listener.
- Bounded diff/source review covered shell entry/config, source discovery/copy, exclusions, DB isolation, foreground process ownership, runtime credentials and cleanup. No application source edits.
## Limits
Graphical user interaction awaits Captain. Existing local dependencies reused; no installation/container/clean-environment verification. Candidate must support isolated database configuration (TASK-002); TASK-007's baseline application itself lacks that prerequisite until integration. Fresh fixture tokens enable existing login for testing; this does not fix or certify application token issuance. Ordinary-user browse UI and secure downloads remain TASK-003/TASK-004.
Accept TASK-007 only after manual review. Merge/release remain Captain authority; do not start another task automatically.