3.0 KiB
Manual task testing
From /home/rob/projects/bortstack:
./scripts/testtask.sh 001
# Equivalent: ./scripts/testtask.sh TASK-001
An explicit ID is required. TASK-001/001/BS-001 selects canonical BS-001 at .task-worktrees/bs-001. The task wrapper verifies its branch before invoking installed roborto-testtask. Missing tasks fail clearly. There is no root executable or implicit default.
Prerequisites: Bash, Git, Python 3, flock, Docker Engine/Compose accessible to your user, standalone roborto-testtask and Firefox on a graphical desktop. The first build downloads base images and locked npm/Python dependencies; subsequent builds use Docker cache. No host application dependencies need installing.
The engine prompts for browser; default Firefox works when installed. Its readiness URL is http://127.0.0.1:18081/; API diagnostic port is 15001. Fixed loopback ports deliberately prevent simultaneous conflicting runtimes. Keep the terminal running; press Ctrl-C to stop its browser/processes and remove only bortstack-testtask-001 containers/network. Images remain cached. Nothing connects to SWAG or production services.
Snapshot
scripts/create-test-snapshot.py 001 can also run independently from the BS-001 task worktree. testtask invokes it automatically before every build. It copies Git-listed tracked and non-ignored untracked files including local edits/deletions, excludes secret/local/runtime paths, rejects symlinks and verifies copied content against source SHA-256 hashes. No commit or checkout is required.
The test-only copy lives in the task worktree’s .test-worktrees/task-001/, with .roborto-test-snapshot.json recording source, task, branch and per-file hashes. It is not a Git editing worktree. Only snapshots bearing matching ownership metadata may be refreshed; unknown directories are refused. The snapshot is retained for inspection after runtime cleanup. Rerun testtask after edits to refresh it; a snapshot represents the source at preparation time only. Never edit the snapshot.
Runtime
.roborto/testtask-compose.yml builds solely from the snapshot, using inherited API/nginx Dockerfiles. Flask uses disposable SQLite on container tmpfs to exercise inherited foundation behavior, registration is closed and email is disabled. This is test infrastructure, not acceptance of database/accounts for the final marketing website. No account or login is required to view the starter. The selected task determines UI: BS-001 has the inherited starter; BS-004 contains the grouped marketing shell, themes and homepage candidate.
The hook checks Docker/configuration, builds images, starts services, verifies frontend plus direct/proxied API readiness, and cleans up its own resources. One session lock per source worktree prevents conflicting snapshot refreshes. If an existing project-named container is found, it refuses to take over that environment.
Group review from integration root: ./scripts/testtask.sh TASK-004; this contains BS-002–004 without merging them into codex.