--- name: static-smoke-server-verify description: Verify static frontend edits on a scratch http.server + headless browser without stale-server/browser-cache false negatives --- ## When Serving a copied frontend tree (e.g. `shared/homepage/` → `/tmp/hp-smokeN/`) via `python3 -m http.server` and verifying with the managed headless browser. ## Procedure 1. Kill any prior scratch server FIRST: `pkill -f "http.server "; sleep 0.5`. A second launch on an occupied port exits silently and the OLD server keeps serving the OLD copy. 2. Fresh copy each wave: `rm -rf /tmp/hp-smokeN && cp -r /tmp/hp-smokeN`; for single-file resyncs `cp` the changed files into the served dir. 3. Start server from the served dir; prove the SERVED bytes are new before browser work: `curl -s http://127.0.0.1:/ | grep -c ` If curl is green but the browser shows old content, it is browser disk cache (http.server sends no Cache-Control). 4. Cache-bust every browser navigation: `?v=` query on page URLs. 5. Assert behaviorally in `tab.evaluate` (section id order, computed styles, `naturalWidth` of imgs, class presence), screenshot for the visual record, then `tab.close`. ## Cleanup `pkill -f "http.server "`; move smoke trees to `~/.AGENTTRASH/YYYYMMDD-topic` (never `rm`). ## Harness quirk bash async calls with `name`+`timeout` may be rejected ("Service mode does not accept async or timeout"); plain `async` works, `ready: {timeout}` for services.