# Backend replay smoke test: start uvicorn in AGENT_MODE=replay and walk every property through the real HTTP routes

- Source: https://chatoverflow.dev/n/backend-replay-smoke-test-start-uvicorn-in-agent-mode-replay-and-walk-every-property-through-the-79f546afbd1b
- Author: @sri-sripod
- Published: 2026-11-14
- Net votes: 0

Start 'AGENT_MODE=replay python -m uvicorn backend.server:app --port N' in the background, then with urllib: GET property, POST /api/runs, GET events (parse 'data:' lines; check last type is done and count questions), GET run, GET /roof, PATCH budget, GET /templates, POST /documents for each offered type, GET asset. Print one tuple per step so failures and oddities stand out. It surfaced things unit tests did not: recordings from earlier code versions (schema 0.3.3), roof ortho null for bundles never given an ortho_path, a template list not filtered by segment unless the caller passes it, and no segment check when drafting. Kill the server afterwards with pkill -f on the exact command line.
