Cursor rule
.cursor/rules/smoke-test.mdcPost-deploy health-check against a live URL. Validates HTTP status, response content, and critical endpoints. Runnable standalone OR as the final step of the deploy skill.
Cursor rules
Quality
58/100
Scores the file, not the repository.Length
913 words
25 headings · 10 code blocksRepository
119
— · pushed 1 days agoLast changed
3 days ago
First indexed 3 days ago.123456# Smoke Test78> **HARD GATE** — Do NOT run smoke-test against a URL that hasn't been deployed yet. Always run `deploy` first, then `smoke-test`.9>10> **HARD GATE** — A failed smoke test means the deployment is broken. Do NOT mark a deploy as successful until all smoke checks pass.1112Validate a deployed application is healthy by running HTTP checks against live URLs. Each check asserts HTTP status, optional body signal (regex), and optional response-time threshold.1314## Configuration1516Smoke checks live in `smoke-checks.yaml` at the project root:1718```yaml19base_url: "https://example.com"20checks:21 - name: "Homepage"22 path: "/"23 expected_status: 20024 content_signal: "welcome|ok"25 max_response_time_ms: 300026```2728| Field | Required | Default | Description |29|-------|----------|---------|-------------|30| `name` | Yes | — | Human-readable check name |31| `path` | Yes | `/` | URL path relative to base_url |32| `method` | No | `GET` | HTTP method |33| `expected_status` | No | `200` | Expected HTTP status code |34| `content_signal` | No | — | Regex or string in response body |35| `max_response_time_ms` | No | — | Fail if slower than threshold (ms) |3637Ad-hoc single-URL mode: `DEPLOY_URL=https://host bash scripts/run-smoke.sh`3839## Process4041### 1. Load checks4243```bash44SMOKE_CHECKS_FILE="${SMOKE_CHECKS_FILE:-smoke-checks.yaml}"45BASE_URL="${DEPLOY_URL:-$BASE_URL}"46test -f "$SMOKE_CHECKS_FILE" || test -n "$BASE_URL" || { echo "ERROR: no checks file or URL"; exit 1; }47```4849### 2. Run each check5051```bash52bash scripts/run-smoke.sh "${DEPLOY_URL:-}" "${SMOKE_CHECKS_FILE:-smoke-checks.yaml}"53```5455The runner performs curl requests per check, records pass/fail per assertion, and prints a summary.5657### 3. Assert results5859- Any HTTP status mismatch → FAIL60- Missing `content_signal` when configured → FAIL61- Response time over `max_response_time_ms` → FAIL62- Exit code non-zero → deployment not healthy6364### 4. Generate report6566Capture stdout from `run-smoke.sh` as evidence. Persist to `specs/verifications/smoke-<date>.log` for release-branch.6768## Integration with deploy skill6970```bash71DEPLOY_URL="$DEPLOY_URL" bash scripts/run-smoke.sh72```7374## Verify arc7576Part of **★ VERIFY ★**: `verify-work` → `validate-contracts` → `smoke-test` → `run-evals` → `audit-code`7778## Verify7980→ verify: `test -x scripts/run-smoke.sh && grep -q 'run-smoke.sh' skills/smoke-test/SKILL.md && ! grep -q 'See \[REFERENCE.md\](REFERENCE.md)$' skills/smoke-test/SKILL.md && echo OK`8182---8384# Smoke Test — Reference8586## Navigation8788| Lines | Section |89|-------|---------|90| 1 | Title |91| 3–17 | Navigation |92| 18–34 | Runner script |93| 35–46 | Configuration reference |94| 47–55 | Verification |95| 56–89 | Reference block 1 |96| 90–107 | Reference block 2 |97| 108–122 | Reference block 3 |98| 123–159 | Reference block 4 |99| 160–177 | Reference block 5 |100101## Runner script102103A ready-to-use runner is provided for standalone operation:104105```bash106bash scripts/run-smoke.sh [url] [smoke-checks-file]107```108109The runner:1101. Uses `$DEPLOY_URL`, `$SMOKE_CHECKS_FILE`, or CLI arguments1112. Runs all defined checks1123. Prints a pass/fail summary1134. Exits 0 on all pass, non-zero on any failure114115116---117118## Configuration reference119120| Variable | Default | Description |121|----------|---------|-------------|122| `SMOKE_CHECKS_FILE` | `smoke-checks.yaml` | Path to smoke checks YAML |123| `DEPLOY_URL` / `BASE_URL` | *(required)* | Base URL for all checks |124| `SMOKE_TIMEOUT` | `30` | Per-check timeout (seconds) |125| `SMOKE_RETRIES` | `0` | Number of retries on failure |126127128---129130## Verification131132→ verify: `test -f smoke-test/SKILL.md && grep -q 'name: smoke-test' smoke-test/SKILL.md && echo OK`133→ verify: `grep -qi 'smoke.checks.yaml\|checklist\|expected_status\|content_signal' smoke-test/SKILL.md && echo OK`134→ verify: `grep -ci 'pass\|fail\|summary\|report' smoke-test/SKILL.md | awk '{if($1>=2) print "OK"; else print "FAIL"}'`135→ verify: `grep -q 'smoke-test' SKILL-INDEX.md && echo OK`136137---138139## Reference block 1140141```yaml142# smoke-checks.yaml — auto-loaded if present at project root143base_url: "https://example.com"144checks:145 - name: "Homepage"146 path: "/"147 method: GET148 expected_status: 200149 content_signal: "bigpowers"150 max_response_time_ms: 3000151152 - name: "API Health"153 path: "/api/health"154 method: GET155 expected_status: 200156 content_signal: "ok|healthy"157158 - name: "API Jogos"159 path: "/api/jogos"160 method: GET161 expected_status: 200162 content_signal: "jogos|games"163164 - name: "Not Found handling"165 path: "/nonexistent"166 method: GET167 expected_status: 404168 content_signal: "not found|404"169```170171---172173## Reference block 2174175```bash176SMOKE_CHECKS_FILE="${SMOKE_CHECKS_FILE:-smoke-checks.yaml}"177BASE_URL="${DEPLOY_URL:-$BASE_URL}"178179if [ -f "$SMOKE_CHECKS_FILE" ]; then180 echo "Loaded smoke checks from $SMOKE_CHECKS_FILE"181elif [ -n "$BASE_URL" ]; then182 echo "No smoke-checks.yaml found. Using single URL check against $BASE_URL"183else184 echo "ERROR: No smoke-checks.yaml found and no DEPLOY_URL/BASE_URL set."185 exit 1186fi187```188189---190191## Reference block 3192193```bash194url="${BASE_URL}${path}"195start_time=$(python3 -c 'import time; print(int(time.time() * 1000))')196197# Perform the HTTP request198response=$(curl -s -o /tmp/smoke_body.txt -w "%{http_code}" "$url")199response_time=$(( $(python3 -c 'import time; print(int(time.time() * 1000))') - start_time ))200status=$response201body=$(cat /tmp/smoke_body.txt)202```203204---205206## Reference block 4207208```bash209checks_passed=0210checks_failed=0211failures=""212213# Assert status code214if [ "$status" -ne "${expected_status:-200}" ]; then215 echo " FAIL: expected status ${expected_status} but got $status"216 checks_failed=$((checks_failed + 1))217 failures="${failures} - $name: HTTP $status (expected ${expected_status})\n"218else219 echo " PASS: HTTP $status"220fi221222# Assert content signal223if [ -n "$content_signal" ]; then224 if echo "$body" | grep -qiE "$content_signal"; then225 echo " PASS: body contains \"$content_signal\""226 else227 echo " FAIL: body does not contain \"$content_signal\""228 checks_failed=$((checks_failed + 1))229 failures="${failures} - $name: missing content signal \"$content_signal\"\n"230 fi231fi232233# Assert response time234if [ -n "$max_response_time_ms" ] && [ "$response_time" -gt "$max_response_time_ms" ]; then235 echo " FAIL: response time ${response_time}ms exceeds ${max_response_time_ms}ms"236 checks_failed=$((checks_failed + 1))237 failures="${failures} - $name: response time ${response_time}ms (max ${max_response_time_ms}ms)\n"238fi239```240241---242243## Reference block 5244245```bash246total=$((checks_passed + checks_failed))247echo ""248echo "=== Smoke Test Summary ==="249echo "Total: $total | Passed: $checks_passed | Failed: $checks_failed"250251if [ "$checks_failed" -gt 0 ]; then252 echo ""253 echo "Failures:"254 echo -e "$failures"255 exit 1256else257 echo "All checks passed."258 exit 0259fi260```261
Also in danielvm-git/bigpowers
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| danielvm-git/bigpowers.cursor/rules/align-grid.mdc · 119 | Cursor rules | lint-formatdo-notagent-behaviour | 65/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/assess-impact.mdc · 119 | Cursor rules | testtesting-strategydeployment | 66/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/audit-code.mdc · 119 | Cursor rules | setuptestlint-formatstyle+4 | 66/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/audit-plan.mdc · 119 | Cursor rules | buildteststylegit | 74/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/build-epic.mdc · 119 | Cursor rules | buildgit | 58/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/change-request.mdc · 119 | Cursor rules | no sections | 48/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/commit-message.mdc · 119 | Cursor rules | lint-formatstyletypesgit+3 | 82/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/compose-workflow.mdc · 119 | Cursor rules | styledo-notagent-behaviour | 65/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/context7-mcp.mdc · 119 | Cursor rules | style | 54/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/deepen-architecture.mdc · 119 | Cursor rules | testtesting-strategydo-not | 57/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/define-language.mdc · 119 | Cursor rules | lint-formatdo-not | 65/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/delegate-task.mdc · 119 | Cursor rules | git | 62/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/deploy.mdc · 119 | Cursor rules | setupbuildtestdeployment | 77/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/develop-tdd.mdc · 119 | Cursor rules | teststylearchtesting-strategy+5 | 85/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/diagnose-root.mdc · 119 | Cursor rules | no sections | 39/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/dispatch-agents.mdc · 119 | Cursor rules | git | 54/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/edit-document.mdc · 119 | Cursor rules | no sections | 39/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/elaborate-spec.mdc · 119 | Cursor rules | test | 58/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/enforce-first.mdc · 119 | Cursor rules | no sections | 50/100 | 3 days ago | |
| danielvm-git/bigpowers.cursor/rules/evolve-skill.mdc · 119 | Cursor rules | no sections | 50/100 | 3 days ago |
Diff against .cursor/rules/align-grid.mdc Diff against .cursor/rules/assess-impact.mdc Diff against .cursor/rules/audit-code.mdc Diff against .cursor/rules/audit-plan.mdc Diff against .cursor/rules/build-epic.mdc Diff against .cursor/rules/change-request.mdc Diff against .cursor/rules/commit-message.mdc Diff against .cursor/rules/compose-workflow.mdc Diff against .cursor/rules/context7-mcp.mdc Diff against .cursor/rules/deepen-architecture.mdc Diff against .cursor/rules/define-language.mdc Diff against .cursor/rules/delegate-task.mdc Diff against .cursor/rules/deploy.mdc Diff against .cursor/rules/develop-tdd.mdc Diff against .cursor/rules/diagnose-root.mdc Diff against .cursor/rules/dispatch-agents.mdc Diff against .cursor/rules/edit-document.mdc Diff against .cursor/rules/elaborate-spec.mdc Diff against .cursor/rules/enforce-first.mdc Diff against .cursor/rules/evolve-skill.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
