/qa-flow:smoke [optional base URL to liveness-check instead of launching]from qa-flow
Reuse a running server or launch the app (stack-aware), then confirm it actually BOOTS and its key routes respond, before any deeper QA. Separate boot and per-route timeouts, and boot failures are classified by category (port in use, dependency, runtime mismatch, framework policy, app error) rather than dumped as a log. A fast liveness/smoke gate that fails loudly if the build won't come up. Free — the app's own server + curl, no paid tooling.
Ships in qa-flow. Installing the plugin adds it to Claude Code.
The build-verification floor: does the app boot, and do its key routes respond? Green unit
tests don't prove the app comes up — a bad initializer, missing env var, broken asset build, or a
bad migration can pass specs and still 500 on boot. Run this first (before
/qa-flow:functional, before verify's deeper phases) so "the build isn't testable" is caught in
seconds, not halfway through a suite.
Prereq: qa/qa.config.yml (run /qa-flow:setup-qa if absent). If $ARGUMENTS is a URL, skip
launching and just liveness-check that URL (an already-running or staging target).
Read the launch config — qa/qa.config.yml app: (stack-agnostic; Rails defaults shown):
app:
start: bin/dev # boot command (may be `bin/rails server -p 3000`)
port: 3000
health: /up # 200-when-ready route (Rails 8 ships this health endpoint)
routes: [/, /up] # key routes to hit
boot_timeout: 60 # seconds for the SERVER to answer <health> at all
route_timeout: 90 # seconds for the FIRST hit of any one route
No app: block? Infer the Rails default (bin/dev, port 3000, /up) and say so.
The two timeouts are not interchangeable. boot_timeout covers the server coming up;
route_timeout covers first-hit-per-route, because dev servers compile on demand. A
Next.js + Turbopack app reported "Ready in 10s" then spent 45–60s compiling each route on
first visit — with one timeout for both, the crawl clears boot and dies on route 2, which
reads as a broken app instead of a slow compile.
Probe before you launch — never start a second server. If the port already answers, reuse it and say so:
CODE=$(curl -sS -o /dev/null -w '%{http_code}' --max-time 5 "http://localhost:<port><health>" 2>/dev/null)
case "$CODE" in
''|000) : ;; # nothing answered on the port — safe to launch
*) REUSED=1; echo "reusing the server on <port> (health answered $CODE) — not launching a second" ;;
esac
Ask "did anything answer", not "did it answer healthily". curl -f exits non-zero on
4xx/5xx, so a server that is up with a failing health endpoint looks identical to an empty
port (exit 22 vs 7 — both just "non-zero" to an if). That is the one case where the probe
most needs to fire: it launches the second server into a build cache the first one is using.
%{http_code} separates them — 000 means no HTTP response reached us, anything else means
something is listening and speaking HTTP, whatever it thinks of its own health.
Then ask the second question, which is the one that matters with more than one session: is it MINE? "Something answered" and "the thing that answered is serving this working tree" are different facts, and only the first was ever checked:
OWNER_PID="$(lsof -nP -iTCP:"$PORT" -sTCP:LISTEN -t 2>/dev/null | head -1)"
if [ -r "/proc/$OWNER_PID/cwd" ]; then
OWNER_DIR="$(readlink -f "/proc/$OWNER_PID/cwd")" # Linux
else
OWNER_DIR="$(lsof -a -d cwd -p "$OWNER_PID" -Fn 2>/dev/null | sed -n 's/^n//p' | head -1)"
fi
if [ -n "$OWNER_DIR" ] && [ "$OWNER_DIR" = "$PWD" ]; then
REUSED=1
echo "reusing the server on $PORT — same working tree"
else
echo "REFUSING to reuse the server on $PORT: it is serving ${OWNER_DIR:-an unresolved directory}, not $PWD"
exit 2
fi
"One project directory" is the assumption that fails. With several worktrees the server on
that port was booted from a different directory, serving different code, against a
different database. Adopting it is not avoiding contention — it is testing somebody else's
checkout and reporting the result as yours. Measured on this machine while the fix was being
written: a Ruby server answering on 3001 resolved to a completely different project's
checkout than the one asking.
An unresolvable owner is a refusal, not a shrug. If the cwd cannot be read — a container, a remote runner, a process owned by another user — you cannot show the server is yours, and "cannot show" is not "is". Say so and stop; do not test against it and qualify the result afterwards.
The old text half-noticed this and filed it under reporting: "say in the report that the app was already running, since it may be running different code than the working tree." That sentence was the defect. If it may be running different code than the working tree, it is not a valid subject for a test of the working tree, and saying so in the report does not make the result mean anything.
When the server IS yours, the rest still holds: two dev servers against one project directory
contend over the same build cache (.next/, tmp/cache) and can corrupt it, and a reused
server is not yours to kill — skip teardown for it and say it was already running.
Otherwise launch in a test env, backgrounded, capturing PID + logs; always trap teardown so a failed run never leaks a server:
RAILS_ENV="${RAILS_ENV:-test}" <start> > qa/reports/smoke-boot.log 2>&1 &
APP_PID=$!; trap 'kill "$APP_PID" 2>/dev/null' EXIT
Use the app's own server — no paid tooling. Prefer a dedicated test/QA env; never a prod DB.
Check for prebuilt assets before running a heavy build. If the documented start command
chains a bundler (npm start = framework + webpack) and the built output is already present
and newer than its sources, the lighter server-only command serves fully-styled pages. Say
which path you took and why — an audited project already had static/app.css, so
hugo server alone was enough and a naive runner would have failed on webpack and given up.
Never silently skip a documented step: state the assumption so a stale-asset false pass is
attributable.
Wait for health — poll http://localhost:<port><health> until HTTP 200 or boot_timeout.
Poll; never sleep a fixed guess:
up=0; for i in $(seq 1 <boot_timeout>); do
curl -fsS -o /dev/null "http://localhost:<port><health>" && { up=1; break; }; sleep 1; done
Never came up → FAIL: "app did not boot within s." Classify it — do not eyeball the table:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/classify_boot_failure.py" qa/reports/smoke-boot.log
It prints the category, the signature it matched, the next action, and the log tail. Report all four — STOP. This is the "build not testable" signal.
The table below is what the script encodes; read it to argue with a verdict, not to produce one. An unrecognised log classifies as application-error, which is a real answer rather than a shrug: it is the common case and the one that files a bug instead of sending someone off to fix their toolchain.
Hit the key routes — for each in app.routes, capture the status, allowing
route_timeout for the first hit; 5xx = FAIL, 2xx/3xx pass, 4xx noted:
curl -s -o /dev/null -w "%{http_code}" --max-time <route_timeout> "http://localhost:<port><route>"
A route that exceeds route_timeout is FAIL: "route did not respond within s" — report
it as a route failure, distinct from a boot failure, so a slow first compile is not filed as a
dead app.
Export the base URL for the phases that follow: QA_BASE_URL=http://localhost:<port>.
Report a small table (route · status · pass/fail) + verdict, then tear the app down
(the trap handles it — unless you reused an existing server, which you must leave
running). On FAIL, do not proceed to functional/e2e — report and let the breakage be
filed as qa,from-qa,severity:s1 (same contract as verify's smoke gate).
A wall of stack trace is not a diagnosis, and the categories below have genuinely different owners. Classify the failure and give the tail; guessing a fix is worse than naming the class.
| Category | How it looks in the log | Next action |
|---|---|---|
| Port already in use | EADDRINUSE, Address already in use | re-run the step-2 probe — something answers on that port; reuse it or pick another |
| Missing / incompatible dependency | Module not found, Cannot find module, ERR_PACKAGE_PATH_NOT_EXPORTED | install, or the package's exports map does not expose that subpath — a dependency bug, not yours |
| Runtime / engine mismatch | NODE_MODULE_VERSION, unsupported engine, native ABI errors, a global the runtime injected | check the required runtime version against the installed one |
| Framework security / config policy | a policy or security block that never says "set this env var" | consult the gotcha table below; the framework is refusing, not crashing |
| Application error | anything else — bad initializer, missing env var, failed migration | the real defect; file it |
Never report "the app did not boot" alone. Name the category, attach the log tail, and say what you tried. An unclassified boot failure sends a developer to read the same wall of output you just read.
These read as application breakage and are not. Seeded from a real audit; add to it rather than re-diagnosing from scratch.
| Stack | Symptom | Cause / fix |
|---|---|---|
| Hugo ≥ 0.158 | boot fails with a wall of security-policy output that never mentions an env var | raw .html content is refused by default — needs HUGO_SECURITY_ALLOWCONTENT='.*' |
| Node 25 | SSR breaks on localStorage.getItem is not a function | Node injects a global localStorage; server-side code that feature-detects it now finds it and calls it |
npm packages with an exports map | a CSS/asset subpath import is unresolvable even though the file exists on disk | the package does not export dist/*; import a path it does export, or copy the asset |
| Next.js / Turbopack | boot succeeds, then route 2 times out | per-route first-hit compilation — that is route_timeout, not a hang |
/qa-flow:smoke → /qa-flow:functional or /qa-flow:verify
(boots + liveness, (reuse QA_BASE_URL; the full @smoke E2E + regression build on a proven-up app)
sets QA_BASE_URL)
This is the concrete boot that /qa-flow:verify Phase 0 assumes, and the fast pre-check before
the heavier Playwright @smoke set. Stack-agnostic: only the app: config differs per stack;
the launch → health → routes → teardown procedure stays the same. Free by default.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub fmanimashaun/claude-skills --plugin qa-flow8 commands in this plugin
/cases/qa-flow:cases — $ARGUMENTSAuthor and maintain the in-repo test-case catalogue (qa/test-cases.csv) from the PRD, app surface, qa-lead plan, and past defects. Automates the repetitive case-writing/upkeep; stable IDs, idempotent, Excel-openable. Free, no online tool./certify/qa-flow:certifyComprehensive release certification before dev->main — full regression plus release-only layers (load, DAST, cross-browser, a first-boot operator walkthrough, a forged-request authorization sweep); writes the stamp that unlocks the deploy gate/crawl/qa-flow:crawl — $ARGUMENTSCrawl every route in a browser and judge it — broken pages, dead controls, theme-only failures. Writes evidence the Python judges grade./functional/qa-flow:functional — $ARGUMENTSAgentic functional/exploratory testing of a running app via Playwright MCP — menu-scoped, evidence-based, driven from test-case titles. Writes a Markdown report + Excel-openable CSV with screenshots into qa/manual-tests/. Free, repo-local, no online tool./setup-qa/qa-flow:setup-qaSet up the independent QA workspace — detects the codebase's testing signals and PROPOSES a stack (qa/qa.config.yml) you confirm/override, then scaffolds only the chosen tools, seed personas, and case catalogue. Stack-agnostic, free by default./verify/qa-flow:verify — $ARGUMENTSIndependent QA verification after a feature merges to dev — smoke gate, sanity, and targeted regression to prove the change broke nothing previously certified