Files
descrybe/scripts/v1-process-smoke
greeneclipse 8580c996c3 Initial commit of Descrybe v2 without local scratch artifacts.
Drop one-shot tmp/axe scripts and agent i18n scratch so the Gitea tree is deployable.
2026-08-09 22:47:43 +02:00
..

Legacy v1 process smoke

Sequential create/process + poll against the legacy public surface:

  1. POST /api/v1/products/process with items[{ean,…}]
  2. GET /api/v1/products/process/{process_id} until COMPLETED / FAILED / CANCELLED

Not a load test (that is scripts/api-load-smoke). One job, low poll rate.

Auth (no secrets in this folder)

Set API_KEY (or -key). For local Platform Demo, use the seeded key documented in docs/demo-user.md (prefix dk_demo_lo…). Do not commit other keys.

Smoke (local)

API on :28471 and a worker must be running (npm run dev or scripts/run-api.ps1 + worker).

$env:API_BASE = "http://127.0.0.1:28471"
$env:API_KEY = "<paste from docs/demo-user.md>"
cd f:\laragon\www\_MY\descrybe-v2\scripts\v1-process-smoke
go run .

Defaults: one synthetic EAN (8700999000001), processing_type=full, poll every 2s, wait up to 3m.

go run . -eans 8806088803005,8700000000002 -processing-type full -wait 5m

Exit 0 on COMPLETED, 1 on failure/timeout, 2 on bad flags / missing key.

Cleanup leftover Demo smoke EANs

There is no product soft-delete HTTP API (GET/PATCH only). After a smoke run, leftover 8700999... rows stay on Platform Demo only (never A1).

Safe paths (Demo only; both refuse A1):

# SQL (preview SELECT is in the script header comments)
psql $env:DATABASE_URL -v ON_ERROR_STOP=1 -f scripts/cleanup-process-smoke-eans.sql

# Or via seed-demo
cd apps/api
go run ./cmd/seed-demo -purge-smoke-eans

Related: docs/live-public-api-e2e.md, docs/demo-user.md.