agentleFS
localtaskrepolocaltaskrepo/lotar/.github/skills/smoke-suite-debugging/SKILL.md

smoke-suite-debugging

Skill2 starsChanged 33 days agoMITView on GitHub

Use this when smoke tests fail (binary/web assets, Playwright setup, server lifecycle, ports, env vars).

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ensure Playwright browsers exist

    line 8
  2. Distinctive:

    Ensure build artifacts are fresh

    line 11
  3. Distinctive:

    Run one smoke test first

    line 15
  4. Very specific:

    Prefer npx vitest watch --config smoke/vitest.config.ts --maxWorkers=1 --maxConcurrency=1 --no-file-parallelism for a serialized watch loop.

    line 56
  5. Distinctive:

    If needed, temporarily enable inherited stdio in the smoke helpers while debugging (but keep changes scoped and revert before finalizing).

    line 57

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Quick checklist

  1. Ensure Playwright browsers exist
  • npm run playwright:install
  1. Ensure build artifacts are fresh
  • Full build + smoke: npm run smoke
  • Quick smoke (assumes you already built): npm run test:smoke:quick
  1. Run one smoke test first
  • By name:
    • npm run test:smoke:quick -- -t "<substring>"
  • By file:
    • npm run test:smoke:quick -- smoke/tests/<suite>.smoke.spec.ts

Common failure modes

  • “Binary not found”
    • Smoke prefers target/debug/lotar, falling back to target/release/lotar.
    • Fix: run npm run build:smoke, or set LOTAR_BINARY_PATH to a freshly built custom binary.
  • “Port already in use”
    • By default the harness passes --port 0: the OS assigns the port at bind time (no probe-then-bind race) and the actual port is read back from the post-bind readiness banner, so default runs do not collide.
    • A pinned explicit port that is busy fails strictly by design. That may point to a server-lifecycle issue, but never kill or reconfigure a server this run did not spawn — ownership of a foreign listener cannot be inferred from the port alone.
    • To isolate lifecycle issues, re-run with --maxWorkers=1 --maxConcurrency=1 --no-file-parallelism. Vitest does not support --runInBand.
  • “SSE readiness / flaky waits”
    • Smoke uses LOTAR_SSE_READY hooks and server heartbeats; see docs/help/serve.md for the testing aids.

Restricted / sandboxed agent environments

Some agent harnesses run the shell in a sandbox that blocks certain OS operations. LoTaR's tests are already hardened for this, so you usually don't need to act — just recognize the signatures:

  • .git: Operation not permitted — the sandbox forbids creating anything named .git, so tests that run a real git init cannot use Git. Whether Git works is decided per invocation by an isolated probe, not per host: the Rust runner's probe can pass while the Node smoke probe fails in the same environment (or vice versa), so never generalize one probe's result. Nothing is compiled out:
    • npm run test:rust/test:rust:agent probe at run time and, when Git is unavailable, select the gitless nextest profile whose default filter excludes exactly the source-local git_required modules — all code still compiles, and exclusions are reported as skipped, never as passes.
    • Raw cargo nextest (no npm runner) still selects git_required tests; they fail closed via require_git() instead of passing silently.
    • Smoke git tests skip honestly via describe.concurrent.skipIf(!gitAvailable()).
    • Designated full-coverage runners set LOTAR_REQUIRE_GIT=1 (build refuses) and LOTAR_SMOKE_REQUIRE_GIT=1 (smoke probe fatal): missing Git must FAIL — no gitless fallback, compile-outs, or early-return passes. Do not add new gates or compile-out cfgs; see the tests README, testing-strategy, and platform guide.
  • Chromium won't launch (MachPortRendezvous … Permission denied, then Target page … closed) — the sandbox denies the browser's multi-process bootstrap. Set LOTAR_SMOKE_CHROMIUM_ARGS="--no-sandbox,--no-zygote,--single-process" (the smoke withBrowser helper reads this; empty by default so CI is unaffected).
  • mcp.protocol framed-compatibility test waits for a notifications/tools/list_changed notification after a config write — this depends on file-change detection. The MCP config watcher polls as a fallback (alongside the kernel watcher), so it fires reliably even when kernel file-watching is blocked. Primary smoke MCP clients use newline-delimited JSON (NDJSON); the framed client is explicit compatibility coverage.

Useful env vars

  • LOTAR_BINARY_PATH: override the binary used by smoke (LOTAR_BIN is ignored: agent jobs set it to their own lotar).
  • LOTAR_TASKS_DIR, LOTAR_HOME: smoke sets these per-test (see smoke/helpers/workspace.ts).
  • LOTAR_SMOKE_CHROMIUM_ARGS: comma-separated Chromium launch flags for restricted sandboxes (e.g. --no-sandbox,--no-zygote,--single-process); empty by default.
  • RUST_LOG=debug or LOTAR_DEBUG=1: can help when diagnosing server/CLI behavior (keep logs free of secrets/PII).

Debugging approach

  • Prefer npx vitest watch --config smoke/vitest.config.ts --maxWorkers=1 --maxConcurrency=1 --no-file-parallelism for a serialized watch loop.
  • If needed, temporarily enable inherited stdio in the smoke helpers while debugging (but keep changes scoped and revert before finalizing).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.