docs: label Phase 0 scaffold targets on docs-only main

TEST-SPEC harness paths and compose Dockerfiles are deliverables until code
lands. Cases stay not run. Stops agents inventing alternate test trees.
This commit is contained in:
grokbot_ty
2026-09-09 19:45:25 +00:00
parent 8d65984936
commit f855f91b8b
4 changed files with 35 additions and 25 deletions
+10 -7
View File
@@ -38,13 +38,13 @@ SlabUploader/
├── README.md
├── docs/ # this plan set
├── deploy/
│ ├── docker-compose.yml
│ ├── docker-compose.yml # checked in; build contexts point at Phase 0 deliverables
│ ├── Caddyfile.fragment # slab site block (merged into host Caddy)
│ ├── INVENTORY.md # filled at Gate B on the designated host
│ ├── .env.example # SLAB_AES_KEY, APP_*, WOO_BASE_URL (https only)
│ └── backup.sh # sqlite .backup + images tar, with retention
├── frontend/ # SvelteKit app
└── backend/ # FastAPI app
│ ├── .env.example # Phase 0 deliverable (SLAB_AES_KEY, APP_*, WOO_BASE_URL)
│ └── backup.sh # Phase 0/6 deliverable (sqlite .backup + images tar)
├── frontend/ # Phase 0 deliverable — SvelteKit app (not yet in tree on docs-only main)
└── backend/ # Phase 0 deliverable — FastAPI app (not yet in tree on docs-only main)
├── app/
│ ├── main.py
│ ├── (no happy-path pipeline SoT here) # hybrid: TECH-SPEC modules live in frontend/ or shared pure TS; backend = store/Woo/inference/U2Net stub
@@ -58,10 +58,13 @@ SlabUploader/
└── Dockerfile
```
The layout above is the **scaffold target**. On docs-only `main`, `frontend/`, `backend/`, `deploy/.env.example`, and `deploy/backup.sh` are not yet in the tree. Compose still names those build contexts so Phase 0 does not invent paths.
## 3. docker-compose.yml (checked in)
Canonical file: `deploy/docker-compose.yml`. Placeholders: `deploy/.env.example`.
From **repo root**:
Canonical file: `deploy/docker-compose.yml`. Placeholders: `deploy/.env.example` (Phase 0 deliverable).
Compose `build.dockerfile` paths are **Phase 0 deliverable targets**, not proof the Dockerfiles exist yet.
From **repo root** (after Phase 0 scaffolds exist):
```
cp deploy/.env.example deploy/.env && chmod 600 deploy/.env
+7 -3
View File
@@ -53,15 +53,19 @@ Other abbreviations used in this document:
## 2. How cases are executed
Test automation lives in the repo under `backend/tests/` and `frontend/e2e/`. The harness uses:
This file is the engineer bar. It is not proof that the harness tree exists yet.
On docs-only `main`, `frontend/` and `backend/` are **not yet on this branch**. Paths below are **Phase 0 deliverable targets** until the code lands. Until then every Phase 0 (and earlier) case stays `not run`. Do not treat `frontend/e2e/` or `backend/tests/` as present. Do not invent a different test layout (for example `frontend/test/bvt/`) to satisfy this bar.
When code lands, automation lives under:
- **Unit tests**: `backend/tests/unit/` (pytest) and `frontend/src/__tests__/` (Vitest). These run against pure modules with no network calls.
- **API contract tests**: `backend/tests/contract/` (pytest + `httpx` TestClient). These hit the FastAPI app through its test client, asserting request/response shape, status codes, and revision handling.
- **Integration tests**: `backend/tests/integration/` (pytest + `httpx` TestClient + `respx` WooCommerce mock). These verify Woo create, duplicate SKU, taxonomy sync, stale-field recovery, and settings encryption round-trips without touching a real store.
- **UI end-to-end tests**: `frontend/e2e/` (Playwright). These exercise the full browser flow: capture, mask knobs, axis confirm, numbers entry, review, and publish. They run against a started Docker Compose stack with the FastAPI test server and mocked Woo endpoints.
- **Ops / deployment tests**: `deploy/tests/` (shell scripts). These verify compose health, backup/restore, and Caddy routing.
- **Ops / deployment tests**: `deploy/tests/` (shell scripts). These verify compose health, backup/restore, and Caddy routing. `docs/checks/check-structure.sh` is a docs-structure pin and may run before app code exists.
Test dependencies are pinned in `backend/tests/requirements-test.txt` and `frontend/package.json` (devDependencies). CI runs the full suite before any merge; the suite must pass with inference disabled.
Test dependencies are pinned in `backend/tests/requirements-test.txt` and `frontend/package.json` (devDependencies) when those packages exist. CI runs the full suite before any merge once the tree has code; the suite must pass with inference disabled.
---