# Post-Deploy Smoke Runbook Run both steps after every deploy — staging first, then prod. --- ## Step 1 — CLI smoke (`smoke_muse.sh`) Verifies the published tarball installs cleanly and the 18 core CLI checks pass. Installs into a throwaway venv; never touches the dev editable install. ```bash # Staging (auto-detects version from pyproject.toml) bash deploy/smoke_muse.sh # Prod bash deploy/smoke_muse.sh --url https://musehub.ai # Explicit version (e.g. during rollback verification) bash deploy/smoke_muse.sh --version 0.2.0rc7 ``` **Exit codes** | Code | Meaning | |------|---------| | 0 | All 18 checks passed | | 1 | One or more checks failed | | 2 | Setup error (tarball not found, venv failure) | **What it checks (Phase 1)** `version` · `init` · `add_empty` · `add_file` · `commit` · `status_clean` · `log_count` · `read_message` · `ls_files` · `branch_count` · `branch_current` · `diff_clean` · `checkout_b` · `checkout_main` · `branch_delete` · `tag_add` · `tag_list` · `verify` --- ## Step 2 — Wire benchmark (`bench_cli.py`) Verifies push/clone/fetch/pull round-trips against the live hub and checks latency gates. Run `xs` for a quick gate check after every deploy; run `s` or `m` before releasing a new wire protocol version. ```bash # Quick (xs — ~10s, all verbs, localhost + staging) python3 tests/bench_cli.py --size xs # Staging only python3 tests/bench_cli.py --size xs --hubs staging # Wider coverage before a wire protocol release python3 tests/bench_cli.py --size xs s --hubs staging # Multiple runs for latency statistics python3 tests/bench_cli.py --size xs --runs 3 ``` **Latency gates (fail if exceeded)** | Verb | xs | s | m | |------|----|---|---| | push (staging) | 5 s | 10 s | 20 s | | clone (staging) | 5 s | 10 s | 20 s | | fetch (staging) | 5 s | 10 s | 20 s | | pull (staging) | 5 s | 10 s | 20 s | `xl` has no gate (used for stress testing only). **Note:** bench_cli creates and cleans up transient repos named `bench-*` on the hub. It will never touch `muse`, `musehub`, `agentception`, or other permanent repos. --- ## Sequence ``` deploy → smoke_muse.sh (pass?) → bench_cli.py --size xs (pass?) → done ``` If either fails: do not promote staging to prod. Investigate, hotfix, redeploy.