TASK-007 Add isolated manual testing adapter
This commit is contained in:
@@ -34,3 +34,11 @@ These observations are based on the supplied ZIP source, **not runtime exploit t
|
||||
- Tests and production deployment are still unverified. The ZIP is not a live Git repository; its HEAD/branch are historical snapshot metadata.
|
||||
|
||||
No source-code security fixes or runtime validation are part of this reconciliation patch.
|
||||
|
||||
## TASK-007 adapter implementation (2026-11-05)
|
||||
|
||||
- Worktree `/home/rob/projects/foldershare/.worktrees/TASK-007`, branch `task/TASK-007-testtask`, base `codex` / `cd6d6b3`; uncommitted and awaiting Captain validation. Primary worktree and TASK-002 implementation left untouched.
|
||||
- Testtask adapter now provisioned and smoke-tested in this worktree. Until integrated, invoke `./.worktrees/TASK-007/scripts/testtask.sh 002` from primary root; `scripts/README.md` documents prerequisites and lifecycle.
|
||||
- Six adapter safety tests pass; Python and shell syntax/diff checks pass. Repeated Flask/Vite lifecycle smoke checks passed, including real headless Firefox startup, HTTP 200 frontend/401 protected API, proxy logins and disabled-account rejection. Occupied-port refusal preserves unrelated listeners; cleanup removes owned snapshots. Source snapshot includes 75 safe files from TASK-002 and verifies hashes before readiness.
|
||||
- Uses existing dependencies (no install), ephemeral database/media/accounts and loopback 5502/5503. No real media or local databases used. Test fixtures seed initial access tokens; application login issuance is unchanged and not certified by this harness.
|
||||
- Graphical browser interaction and Captain acceptance remain. No production readiness, clean dependency-install verification, merge or deployment claimed. The earlier no-adapter observation applies to primary codex until TASK-007 integration. TASK-002's sibling worktree remains implementation-ready, unmerged.
|
||||
|
||||
@@ -68,3 +68,10 @@ Until approved, brief the concrete convention choice before creating later task
|
||||
## Pending: Git integration branch convention
|
||||
|
||||
The 2026-11-04 snapshot references work on `codex` while the existing proposal suggests `main`. There is no evidence that a general integration branch choice was approved. Before creating a task worktree, Codex must inspect live Git state and ask Captain to approve the integration base, worktree path, and eventual merge destination. A task branch is not authority to merge or deploy.
|
||||
|
||||
## WF-004: TASK-007 testtask implementation
|
||||
|
||||
- Accepted by Captain on 2026-11-05: codex base at cd6d6b3, task/TASK-007-testtask, .worktrees/TASK-007. Merge and deployment remain Captain authority.
|
||||
- Use the existing standalone roborto-testtask engine with a project adapter. Safe source copies are disposable testing snapshots, not Git checkouts or development sources. The adapter discovers a unique checked-out task/TASK-###-* branch and includes current tracked/permitted untracked source.
|
||||
- Flask/Vite bind only 127.0.0.1:5502/5503, with an isolated Vite proxy. Reuse existing dependency installations without installs or runtime source changes. Mutable Vite cache goes into run state.
|
||||
- SQLite, accounts and sample media are generated per session; no live state is copied. Candidate must support FOLDERSHARE_DATABASE_URI. No application code is patched to make the harness work.
|
||||
|
||||
+21
-14
@@ -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.
|
||||
|
||||
@@ -33,3 +33,7 @@ Local environment files and runtime data under `api/` are ignored by Git. Their
|
||||
## Product direction accepted 2026-11-04 (requirements; not verified implementation)
|
||||
|
||||
FolderShare is intended as a private, read-only, authenticated file browser and downloader for selected friends, hosted on a Raspberry Pi on Captain's LAN. The Pi will access an existing video library through a shared/mounted folder. Captain administers accounts and each account's accessible folder. An intended hostname is `share.roborto.net` (subject to DNS/network-access design). V1 permits browsing and single-file downloads; multi-select file/folder ZIP downloads are deferred. These are product requirements, not claims that the current application implements them safely.
|
||||
|
||||
## Manual testing adapter (TASK-007, pending integration)
|
||||
|
||||
`scripts/testtask.sh`, `.roborto/testtask.conf` and `.roborto/testtask-hook` adapt the installed `roborto-testtask` engine using `scripts/testtask_adapter.py`. The adapter uses disposable source copies, SQLite/accounts/media and loopback Flask/Vite services. See `scripts/README.md`; existing local Python/Node installations are prerequisites, not bundled dependencies. These files are present on TASK-007 only until integration.
|
||||
|
||||
@@ -96,3 +96,19 @@ The scopes below translate Captain's explicit product requirements into implemen
|
||||
## 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.
|
||||
|
||||
Reference in New Issue
Block a user