# Set up f+ DST for this repository

f+ DST is reliability testing for your own code: it runs one of your tests in a deterministic simulator, in an
isolated VM on f+'s machines, searches for the timing faults (and, when you ask, the injected disk, network and
process-restart faults, all inside that VM) that make it fail, and hands back each failure as a finding: the error, a schedule that replays it bit for bit, its smallest
schedule, and a check that a fix holds. Do the steps in order, in the repository's folder; each names the failure
customers hit there. The end is a finding, or an honest "nothing reproduced yet" with the core-hours searched. A
finding is a failing schedule that replays, not yet a bug in your code: first findings in an existing suite are often
the test's own timing (an injected pause outlasting a fixed sleep or deadline) or its setup, and each says which it
suspects (section 6). The
reference is https://staging.extrafunctional-staging.fyi/api.md.

### Quick fit check (decide in the first minute, before spending any image or credit)

Decide **within the first minute** from the repo's languages and top-level layout alone — before reading deep code, running `init`, or building an image.

- **Sweet spot — Linux backends.** Services, job runners, queues, databases, networked daemons, and anything with multiple processes or threads talking, timeouts, retries, or persistence that builds and runs on Linux.
  - **Database-backed apps (Postgres / Redis / ClickHouse):** use `fplus dst init -compose docker-compose.yml` or a small `services.yaml` — see [recipes/services-multinode.md](recipes/services-multinode.md#8-database-backed-app-postgres--redis).
  - **Languages not in `init -lang` (Elixir/Erlang/Gleam BEAM, Haskell, PHP/Laravel, Ruby/Rails, Zig, etc.):** `init -lang` only lists built-in templates — **any Linux program runs on f+ DST** via the generic Dockerfile path (`fplus dst init -cmd "<test command>"`) or `services.yaml` (see section 3 for per-language examples; silence in `-lang` never means unsupported).
  - **Repo with no tests yet (`"no test specified"` or no test suite):** f+ DST needs a runnable test or workload — do not push an image with nothing to run. Look next door for a sibling repo with tests, or write one small integration test or workload (exercising concurrency, retries, timeouts, or persistence) first.
- **Look next door before saying no — then re-check the new repo before hunting.** Even if this repo isn't a fit, check or ask for an adjacent backend in the org: a small relay or sync server next to a frontend is a target if it has state or concurrency, as is a separate API repo, a compiler's package registry or LSP server, smart contracts' off-chain indexer or relayer, or a mobile app's sync server. **After any redirect, run the same fit and layer check on the new repo's tests before spending credit on a first hunt:** if the redirected repo only has sequential unit tests (no concurrent requests, background sync, or multi-process/server traffic), stop and flag it — target a service-level or integration test (with local stubs for any external APIs it calls) rather than hunting sequential unit tests.
- **Not a fit — name their exact stack and what would make it a fit:**

| Stack / workload | Why it's not a fit — and what would make it one |
| --- | --- |
| Solidity / Foundry (on-chain-only smart contracts) | Solidity/Foundry contracts execute deterministically inside a single-threaded EVM with no OS timing or I/O; target an off-chain indexer, relayer, sequencer, or node service instead. |
| Swift / iOS, Android, desktop, frontend-only apps, or UI libraries (in-process Jest / vitest / jsdom; point to your org's server repo if there is one) | Client-only Swift/iOS, Android, desktop, or browser code needs a device/UI runtime rather than a Linux server; target the backend API, a small stateful/concurrent relay or sync server next to the frontend, or a Linux-buildable local storage/sync engine. |
| Windows-only (.NET / WinForms / WPF, native C++ / Win32 / WinUI desktop) or macOS-only code | f+ DST runs tests inside a `linux/amd64` VM, so Windows-only (.NET/WinForms/WPF, native C++/Win32/WinUI desktop) or macOS-only APIs cannot execute there; here's what fits instead: a backend service, protocol/sync engine, or test suite that builds and runs on Linux (e.g. cross-platform .NET or portable C++ core on Linux). |
| ML training scripts & Jupyter notebooks | Notebooks and ML training scripts depend on GPUs or pure numeric loops that a CPU deterministic VM does not target; target a Linux inference server, feature/data pipeline, or distributed job scheduler with concurrency, queues, or retries. |
| Single-process CLI tools & pure libraries | This test can't show a timing bug if it runs sequentially in a single process — even if the codebase uses threads somewhere (e.g. a parallel file walker, TUI event loop, or matcher). Here's the test that can: pick or write one where concurrent threads race on shared state, processes talk over sockets/IPC (including a test that starts a local HTTP server and talks to it), or files are written and recovered across restarts — or look next door for a stateful server/daemon repo. If none exists yet, tell your person what to write instead of spending credit on a sequential test. |
| Teams already running an in-process simulator (TigerBeetle, FoundationDB-style) | f+ tests **unchanged production binaries** under real Linux kernel scheduling, network partitions, and disk/power-cut faults without maintaining an in-process simulator; it adds little when your existing simulator already covers pure protocol/state-machine logic and you don't need real-binary, OS-kernel, or multi-replica storage/network fault coverage (worth trying only for a multi-replica real-binary run). |
| LLM-API / SaaS apps & tests needing live external services | Simulation VMs have no outbound internet, so LLM-API or SaaS/payment tests wired to live endpoints can't run as-is; it fits if you put a local stub HTTP server in `services.yaml` ([recipes/services-multinode.md](recipes/services-multinode.md#7-local-fake-for-an-outside-service-llm--saas--payment-apis)), or not a fit if mocking the real provider isn't realistic. |

- **Unsure?** Say so honestly and suggest reaching out about their setup via https://staging.extrafunctional-staging.fyi/#pricing (Contact us) or sales@exfun.app.

### Starter prompts

Paste any of these in your repository folder to start from the right entry point:

- **Set up:** `Set up f+ DST for this repository from https://staging.extrafunctional-staging.fyi/dst.md`
- **Hunt a flaky test:** `Using https://staging.extrafunctional-staging.fyi/dst.md, reproduce and hunt my flaky test TEST`
- **Triage a finding:** `Using https://staging.extrafunctional-staging.fyi/dst.md, triage finding FINDING and find its root cause`
- **Verify a fix:** `Using https://staging.extrafunctional-staging.fyi/dst.md, check whether my fix for FINDING holds`
- **Go deeper:** `Using https://staging.extrafunctional-staging.fyi/dst.md, read .fplus/notes.md and go deeper with invariant oracles, load, and a new fault family`

### What to expect (tell your person right after the fit check passes, before starting)

Before building or pushing anything, give your person a 4-line heads-up on timing, cost, and what happens next:
- **Build & push:** building the image on their machine takes **2–15 min** the first time for a typical service (fast small-layer cached rebuilds after). Large C/C++/Bazel/Gradle monorepos (runtimes, databases) take **30 min to 1 h+**: build only the target test (`make <test>`, `bazel build //path:test`, `mvn -pl <module> -am`) or start from the project's release binary or image plus its tests. An image may hold at most **500,000 files** across its layers (Node monorepos hit this: prune `node_modules`, use a multi-stage build, copy only the test package). Pushing takes **~1 min**.
- **First check:** usually **5–15 min** on a new image: a queue wait, a one-time conversion that scales with image size (**~2 min per GB**), then a ~1 min run. When many teams are on, the queue alone can add **10–30 min**; `fplus dst status JOB -watch` shows the live wait. Nothing is charged while queued or converting; the check holds **$0.58** and is typically charged **~$0.02**.
- **First hunt:** **15 min of searching** on 10 VMs by default, but expect **20–30 min of wall time**: a hunt may run on other machines than the check and convert the image again there (2–10 min, not charged), may move machines, and after a first failure spends **5–40 min** confirming, shrinking and triaging it before the finding appears. It holds **$1.25**; a hunt that finds nothing uses its whole budget and is charged about the full **$1.25** (`-budget 5m`, $0.42, for a cheap first look). All well within the **$50 welcome credit**. Keep each test run short: a test taking longer than **~1/10 of the hunt budget** gets very few schedules (for example, a 9-minute test gets only ~6 schedules in a 15-minute hunt) — pick a shorter, narrower test or raise `-minutes` / budget.
- **What they need to do:** approve GitHub login or the local image build if asked — otherwise nothing while it runs.
- **What you will report back:** check pass/fail, then any confirmed findings (with replayable schedules and root-cause triage) or an honest "nothing reproduced yet" with the core-hours searched. Set the expectation now: first findings are often the test's own timing assumptions or setup, which you will label as such; a likely real bug is a failure inside the test body under faults it should tolerate.

### Route by goal

| Goal | Start here |
| --- | --- |
| `setup` | Sections 0–4 (fit check, install, pick targets, build image, check & first hunt) |
| `hunt` | [strategy.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/strategy.md) + sections 2–4 (target, fault family, check, hunt) |
| `triage` | Section 5 + [triage.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/triage.md) (triage live, guest-time failure moment, `causality`, `debug -at <moment>`) |
| `fix` | Section 7 (causality, fix the code, `fixcheck`, regression test) |
| `go deeper` | "Go deeper" (section 5) + [hypotheses.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/hypotheses.md) + [recipes/liveness-and-caps.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/liveness-and-caps.md) |

**Free-form ask:** identify the end goal and what already exists in the repository (`.fplus/notes.md`, `.fplus/environment/`, images, open findings), plan only the steps that get from what exists to the goal, tell your person the plan and ask all foreseeable questions once, then run the plan and report the workflow you ran (including any step added, skipped, or changed, and why).

### Per-repo memory (`.fplus/notes.md`)

Memory of what came before is your responsibility — each agent session starts from zero. **Read `.fplus/notes.md` first** in every session, and **extend it (never rewrite it)** after every check, hunt, or triage with what ran (image, test or workload, faults), what was found or ruled out and why, and the next angles not yet tried. Returning sessions must push deeper from `.fplus/notes.md`, never redo covered ground.

### Ask once up front, then work unattended

Before long unattended work (setup, hunting, triage), ask your person **once** in a single message for everything you can foresee needing: a compute budget (default to 20 core-hours / $10 if they don't name one), permission to change repository code vs harness-only, scope (whole repo or a subsystem, plus any known incidents, closed bugs, or flaky tests), and where to report results. Then keep working toward the goal within budget; while useful work remains, **never end a turn on a question** — write the question to `.fplus/notes.md`, note where you wrote it, and keep going.

## 0. Decide with your person: does it help here, and what leaves the machine

**When it helps.** A test whose outcome can depend on timing: threads, async tasks or goroutines, several processes
or services talking, timeouts and retries, files written then read back after a crash or restart. f+ DST finds the
interleavings that make it fail and replays each bit for bit. **When a test can't show a timing bug:** a sequential, single-process CLI or library test won't trigger timing faults even if the codebase uses threads elsewhere — write or pick a concurrent, socket/HTTP, or crash-recovery test instead; a suite that is already deterministic (single-threaded, an in-memory mock/fake-client test, or a game loop
stepped at a fixed frame rate with no threads, sockets or wall-clock reads) will show nothing; a bug that fails every run (CI sees it already); tests that need a GPU, a
display or outside network services; code that runs only on Windows or macOS (tests run on linux/amd64). Before any first hunt, pass the **per-test gate** (section 2): state which concurrency, network, storage, or multi-process behaviour in **that test** faults can reach — if none, pick a better test or stop without spending credit. A game suite
at fixed fps is worth one hunt only if it uses threads (Godot's `Thread`, `WorkerThreadPool`, background resource
loading), multiplayer between processes, or saves and reloads files. Finding out costs little: a check holds $0.58 while it runs and is typically charged about
$0.02 (unused hold comes back); a 15-minute hunt runs on 10 VMs, holds $1.25 while it runs and is charged at most $1.25 (about all of it when it finds nothing).

**What leaves the machine** (facts from https://staging.extrafunctional-staging.fyi/privacy):
- **Sent:** only the image you push: what `.fplus/environment/Dockerfile` copies in (your code, its built tests,
  anything else it COPYs, licensed assets included), `.fplus/environment/` with `-env`, or the compiled tests and their
  `testdata/` with `-go`/`-bin`.
  Keep what tests don't need out with `.fplus/environment/Dockerfile.dockerignore`. `fplus dst scan` reads your
  GitHub default-branch file tree and Actions runs/logs through f+; `fixcheck -proof` and `share -patch` send the fix's diff. The CLI sends no
  telemetry.
- **Where:** Cloudflare (API, databases, image files), Hetzner in Falkenstein, Germany (the main simulation machine:
  images and job output), AWS us-east-2 (extra simulation machines and an S3 archive). Each job runs in its own VM with
  no internet access; jobs from different customers may share a physical machine. We don't train models on it; our operators' coding agents
  (Anthropic, OpenAI) may read job data while running f+.
- **How long:** job output has no time limit today; a private repository's clone goes 7 days after its last hunt.
- **Deleting:** `fplus dst image rm IMAGE` (from Cloudflare; machine and archive copies may remain);
  `fplus dst team close -confirm TEAM` (data deleted after 30 days; `fplus dst team reopen` undoes it before then) or
  `-delete-now` (at once, by a signed-in person); either queues the purge of machine and S3 copies. Check a team's
  credits, jobs, or membership with `fplus dst credits`, `fplus dst jobs`, and `fplus dst team list` (there is no
  `team status` command). Ask privacy@extrafunctional.com for any copy you want gone.

**Without installing the CLI.** If you prefer not to install the open-source CLI (Apache-2.0,
https://github.com/extrafunctional/fplus), use the API with curl and your own Docker: every step is an HTTPS call you
can read ("Without fplus" in https://staging.extrafunctional-staging.fyi/api.md).

## 1. Install, show your person a real finding, and sign in

**Already have `fplus` installed or `EXFUN_DST_TOKEN` (with `EXFUN_TEAM`) set?** Check `command -v fplus && fplus dst credits` first — if it succeeds, skip install and `fplus login` and go straight to Step 2 (if `EXFUN_DST_TOKEN` + `EXFUN_TEAM` are set but `fplus` is missing, run only the `curl` install line below and skip `fplus login`; `scan` reads GitHub through f+ as that team, or as `GH_TOKEN` if set). Otherwise install and sign in:

    curl -fsSL https://staging.extrafunctional-staging.fyi/dst.sh | sh      # fplus in ~/.local/bin (on a terminal it also shows the sample)
    export PATH="$HOME/.local/bin:$PATH"           # if your shell doesn't find fplus
    fplus dst sample                               # no sign-in: a real flake f+ DST found and fixed
    fplus login                                    # prints a GitHub code: give it to your person
    fplus login                                    # again, once they entered it: finds or makes the team

Show your person what `fplus dst sample` printed, in a few lines: a Consul test that flaked in CI, the five small CPU
stalls that make it fail, how often it failed, and the fix's check. It is what they'll get for their own tests.
A new account is let straight in (if login says it waits for f+'s approval, tell your person, and wait): it has $50 of credit and
up to 3 teams of its own; pay-as-you-go is **$0.50 per core-hour** (1 core-hour is one simulation VM (2 vCPUs, up to 10 GiB of RAM) for one hour; above 10 GiB the price scales with `-memory`: 32768 MiB is 3.2 times), and Teams monthly is **$1,800/mo for 7,200 core-hours ($0.25/core-hour)**; `fplus dst credits`. If you have a launch or promo code, run `fplus dst credits redeem CODE` (once per team and account). When credit runs low, run `fplus dst topup 50` (25–500 USD) and give your person the URL it prints to pay. Agents with an MPP wallet can also self-pay autonomously on an out-of-credit `402` or via `POST /credits/topup` for `$0.50–$500` in `USDC.e` (see `exfun.app/api.md#paying-with-mpp`). A team may use 200 core-hours a UTC day (past them its jobs wait, saying so), run up to 120 concurrent VMs at once (short jobs — `check`, `replay`, `debug`, `fixcheck` — run ahead of your own queued hunts; use `-vms N` or `-tier on-demand` to shape hunts), and push 30 new images a day (a re-push of one it has is not new; past them, 429); `fplus dst credits` shows these limits and what is used of them,
and a new welcome-credit-only team has default spend caps of $25 a day and $15 a job (`fplus dst caps` shows yours; default caps go away automatically once a team has more than the $50 welcome grant from paid credit or f+ grants, and teams from before the caps and f+'s own agent teams have none — explicit caps an admin sets always stay): raising or changing them requires a signed-in person (`fplus login` with `fplus dst caps -daily N -per-job N`, or https://staging.extrafunctional-staging.fyi/account) — `EXFUN_DST_TOKEN` cannot change caps — so tell your person and ask them to raise them. Every submit prints what is spent or held today against them.
A fix's evidence for a pull request is a read-only, no-login proof link (step 7; revocable with `fplus dst share
-revoke`).
Expect: `fplus: command not found` (add `~/.local/bin` to PATH); `this machine works for several tenants (…)` (a
machine signed in to more than one f+ server or team: add `-tenant NAME`, one of those it lists, before `dst`); an older fplus or installed skills shadowing this
page (`fplus update` or the install replaces fplus; `fplus dst skills install` replaces the skills). If you were given `EXFUN_DST_TOKEN` and `EXFUN_TEAM` instead, skip
login (`scan` then reads GitHub through f+ as that team, or as `GH_TOKEN` if set).

Teams and sign-ins: `-tenant NAME` picks which of this machine's sign-ins calls; `-team TEAM` picks the team within it
(default: the sign-in's own team). Both go before or after the command, whichever you write.
A second team, for a CI bot or another agent, is `fplus dst team create NAME` (you are its admin; `-own-credit-only`
keeps its credit apart from your welcome grant), then `-team NAME` on each command, or `fplus dst token -team NAME`
for a token that is that team's. `fplus dst team list` lists your teams (or, with `EXFUN_DST_TOKEN`, the team that token belongs to); inspect a team with `fplus dst credits`, `fplus dst jobs`, and `fplus dst caps`. `fplus dst team use NAME` makes a team the default for this sign-in (no -team needed after; `-none` clears it). `you aren't in team X` means -team named a team your sign-in isn't in (a tenant name is not a team). A finding's whole ID (`fnd_…`) needs no -team: fplus finds its team.

## 2. Pick what to run: existing Antithesis suites, testnet-like setup, and optional CI flakes

**Already have Antithesis files? Start there first.** Check the local repository first (instant, offline) for existing Antithesis setups (`antithesis/` directories, `*antithesis*` `docker-compose.yaml`/`compose.yml` files, `/opt/antithesis/test/v1/` test templates, or `antithesis-sdk` assertions). When present, **run the existing suite AS-IS on f+ DST** (unmodified Docker Compose + Antithesis assertions + coverage: `fplus dst init -compose PATH`, then `fplus dst image push -build`, `fplus dst check`, and `fplus dst hunt`) instead of hunting flaky CI unit tests first.

**Mark setup complete once fixtures are up:** In any test or workload that boots a multi-node cluster or database fixture before exercising the system under test, call `setup_complete()` via the f+ annotation SDK (or Antithesis `setup_complete()`, or print `FPLUS-DST-SETUP-COMPLETE` on stdout) once fixtures are ready so faults target the workload rather than startup helpers.

**Aim at the right layer — run several nodes or processes, not a tiny unit package.** For a distributed system (consensus/Raft clusters, databases, mesh/P2P routers, Kubernetes operators, brokers), do **not** spend hunt budget on tiny single-package unit tests (a small concurrency helper or single-node router unit test): a single-process test cannot show failover, mesh, or Raft races, and "nothing found" there says little. Hunt the test that runs **several nodes or processes**, or wire 3 nodes in `.fplus/environment/services.yaml` so `-faults network`, `-faults process`, and `-faults powercut` hit real leader failover and partitions (**Testcontainers, `kind`, and Docker-inside-the-test cannot run inside a simulation VM** because there is no Docker daemon — declare Postgres, Redis, Kafka, or other dependencies in `.fplus/environment/services.yaml` instead, see [recipes/services-multinode.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/services-multinode.md); for Kubernetes operators, target controller/reconciler suites with `envtest` binaries or multi-service `services.yaml`):

```yaml
# Minimal 3-node .fplus/environment/services.yaml (see recipes/services-multinode.md for full options & Rust/binary pruning)
services:
  - name: n1
    run: "exec /usr/local/bin/node --id 1 --listen {addr:n1}:7000 --peers {addr:n2}:7000,{addr:n3}:7000 --data /var/lib/node"
    data: /var/lib/node
  - name: n2
    run: "exec /usr/local/bin/node --id 2 --listen {addr:n2}:7000 --peers {addr:n1}:7000,{addr:n3}:7000 --data /var/lib/node"
    data: /var/lib/node
  - name: n3
    run: "exec /usr/local/bin/node --id 3 --listen {addr:n3}:7000 --peers {addr:n1}:7000,{addr:n2}:7000 --data /var/lib/node"
    data: /var/lib/node
workload:
  run: "/src/.fplus/environment/workload.sh {addr:n1}:7000,{addr:n2}:7000,{addr:n3}:7000"
final:
  run: "/src/.fplus/environment/check_convergence.sh {addr:n1}:7000,{addr:n2}:7000,{addr:n3}:7000"
```

**Per-test gate (mandatory before your first hunt — never spend credit on unreachable tests; the CLI does not check this for you, so write the sentence in your notes before `fplus dst hunt`).** Passing the repo fit check (or redirecting to a sibling repo) does **not** mean every test in the repo is worth hunting. Before building an image for a test or running `fplus dst hunt`, inspect **the specific test you plan to hunt** and state in one sentence which reachable behaviour inside **this test** f+ faults can hit:
- **Concurrency:** multiple threads, goroutines, or async tasks racing on shared mutable state, locks, channels, or timers;
- **Network:** real loopback/service sockets or multi-node RPC/replication traffic (not an in-memory mock or fake client) — a test that starts a local HTTP server and talks to it counts as huntable (network plus concurrency);
- **Storage / crash recovery:** real disk writes/fsyncs, WAL/database durability, or restart/recovery paths;
- **Multi-process:** several processes or services talking (`services.yaml`, real database/broker/replicas).

**If this test has none of those, it can't show a timing bug — here's the one that can:** skip sequential single-process CLI/library tests (even if the codebase uses threads elsewhere, e.g. a parallel file walker or TUI event loop), sequential unit tests after a repo redirect, in-memory fake-client controller suites, and single-process parser/monitor unit tests — faults can't reach them and "nothing found" proves nothing. Instead, point your person to (or write) a test that exercises concurrent threads on shared state, a local HTTP server talked to over loopback, real storage/crash recovery, or a multi-service workload in `services.yaml` — or say honestly what to write and stop without spending credit. **No tests in the repo yet?** Do not scaffold and push an empty runner — look for a sibling repo with backend tests, or write one small integration test / workload first.

**`fplus dst scan` is a hint, never a gate, and never run `scan -flakes` by default.** `fplus dst scan` only reads GitHub Actions (repositories using other CI systems or custom runners won't show up there), and scraping CI history with `-flakes` is slow and lossy on large repositories. Never block onboarding waiting on `fplus dst scan` or waiting for an answer.

**Ask your person once, async, and build in parallel:** send one short question without waiting on the reply:
> "Do you already know of flaky tests or failure modes you worry about? Also, want me to dig through your GitHub Actions CI history for flaky tests too (`fplus dst scan OWNER/REPO -flakes`; it is slow on big repos)? Meanwhile, I'm going ahead and setting up a testnet-like DST environment so we can start hunting right away."

- **Keep going immediately (never block on the answer):**
  - **Networks, nodes, consensus, databases, or multi-process systems:** build a **testnet-like multi-service setup** right away (`.fplus/environment/services.yaml` + the five generic checks in [recipes/liveness-and-caps.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/liveness-and-caps.md); see [recipes/services-multinode.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/services-multinode.md) and [recipes/rollup-nodes.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/rollup-nodes.md)) so a hunt can start immediately. If no answer arrives, hunt the system's own risks: network partitions, node crashes and restarts, power cuts, and timing stalls (do **not** add `-faults disk` on a first hunt unless the code is explicitly meant to survive disk errors).
  - **Single-binary or library repositories (when a specific test passes the per-test gate above):** a sequential single-process test can't show a timing bug even if the codebase uses threads elsewhere — pick or write a test that itself exercises real concurrency (or starts a local HTTP server and talks to it) (threads, goroutines, or async tasks racing on shared state), multi-process IPC, or crash-recovery/network I/O (`cluster`, `leader`, `replication`, `concurrent`, `failover`, `restart`); pick 1–3 such tests as one `-group` hunt each (step 4), and for the code's own risks beyond its tests, see [hypotheses.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/hypotheses.md) (step 9).
- **Add targets as they arrive:** whatever flaky tests or failure modes your person names become additional targets once they reply.
- **Optional CI history scan (opt-in only, background):** run `fplus dst scan` with `-flakes` (or `-workflow NAME`) **only if your person says yes**, in the background so it never blocks setup:

      fplus dst scan $(git remote get-url origin | sed -E 's#(\.git)?$##; s#.*github\.com[:/]##') -flakes

  It reads up to 14 days of GitHub Actions (saying the cost first; big repos are sampled and stop once enough flake evidence is collected) and ranks tests that failed then passed at the same commit, each with CI's failure line, a run link, and the TEST to hunt. Give `-team TEAM` when this machine's team isn't yours, and `-workflow NAME` to target a specific test workflow. Through f+ a team reads up to 2000 uncached GitHub answers a day, and a scan stops at `-max-requests` (1500; 0: no cap), printing what it found with `partial: N of M runs read`; a person's `fplus login` (or `GH_TOKEN`) reads the rest. Public repos need no GitHub sign-in; private repos need `fplus login` (or `GH_TOKEN`) and f+'s GitHub App with read access to Actions. If a scan returns nothing (no GitHub Actions, custom CI, or zero parsed test results), treat it as "CI unreadable here", not "no flakes", and keep hunting the testnet-like setup and any targets your person named. When hunting a CI flake that is already fixed upstream, hunt the fix's parent (hunts after a fix found it 0 times in 11; the parent, 2 in 2), then `fixcheck` the head (step 7).

## 3. Make the image

Check the platform your person is on before you prescribe a command:

- **Go (zero-Docker fast path — macOS or Linux, no Docker or Dockerfile needed):**

      fplus dst image push -go ./... -label <app>

  (or `-go ./pkg` for one package; `-label` is optional). Cross-compiles Go test packages for `linux/amd64`
  (`CGO_ENABLED=0`), copies `testdata/`, fetches and caches `debian:bookworm-slim` in pure Go, generates
  `.fplus/environment/verify.sh` automatically, and pushes the OCI tar, printing `img_…`. `TEST` is `TestName` or
  `DIR::TestName`. Because `-go` builds static (`CGO_ENABLED=0`) test binaries (no `-race`, no CGo; timing, `-faults network`,
  and `-faults disk` all work — see [strategy.md](strategy.md#which-faults-reach-which-bugs)), use `fplus dst init` +
  `.fplus/environment/Dockerfile` below when you need CGo, `-race`, or a multi-service setup.
- **Pre-built `linux/amd64` ELF binary without Docker (Rust `x86_64-unknown-linux-musl`, C/C++, Zig, etc.):**

      fplus dst image push -bin ./path/to/linux-amd64-elf -label <app>

  Validates the binary is a 64-bit `linux/amd64` ELF, packs it with `debian:bookworm-slim` (including
  `.fplus/environment/verify.sh` or `services.yaml` if present, or generating `verify.sh` to exec the binary with
  `"$1"`), and pushes without Docker.
- **Pinned-registry `services.yaml` or self-contained `.fplus/environment/` without Docker (`-env`):**

      fplus dst image push -env -label <app>

  Packs `.fplus/environment/` (`services.yaml` whose services all use digest-pinned `image:` references, or an
  executable `verify.sh`, up to 256 MiB) with `debian:bookworm-slim` in pure Go and pushes without Docker.
- **Multi-service, CGo, `-race`, or other languages (Docker / Podman):** run `fplus dst init` in the repository root to
  scaffold `.fplus/environment/{Dockerfile,verify.sh}` for your language (offline, no login), then adjust if needed.
  `.fplus/environment/Dockerfile` builds a linux/amd64 image with the code and its tests built in; it **sets a `WORKDIR`**
  (never leave it unset): `WORKDIR /src` then `COPY . .`. `<WORKDIR>/.fplus/environment/verify.sh TEST` runs
  one test with the runner's retries off and exits 0 only when it passed. It runs offline.
  - **x86-64 Linux with Docker:** `fplus dst image push -build -check TEST` builds, runs TEST once here offline, pushes,
    and prints `img_…`. Expect: `docker build of the recipe failed` (fix the recipe; `COPY go.mod go.sum` then
    `go mod download` breaks on a local `replace => ./dir`: copy the tree first); the check failing here (it will
    fail on our machines too).
  - **macOS (Apple Silicon) with Docker Desktop:** start Docker Desktop (or Colima / OrbStack) first so `docker info` succeeds; then `fplus dst image push -build -check TEST` already passes
    `--platform linux/amd64` and works out of the box, except for native x86 code that needs more than Rosetta
    emulates (a binary built for AVX-512, say, dies with SIGILL here): then push with `-build` alone and run
    `fplus dst check IMG TEST` on f+'s machines instead.
  - **x86-64 Linux with podman, no Docker:** `podman build --platform linux/amd64 -f .fplus/environment/Dockerfile -t
    dst-image .` (name base images in full, `FROM docker.io/library/golang:1.25`: podman resolves no short names; `-build` does that for you when `docker` is podman's shim), then `fplus dst image push -from podman:dst-image -commit "$(git rev-parse HEAD)"` (`-from docker:TAG` falls back to podman too).
  - **An image pushed before `.fplus/`** (its recipe under `.diy/`) no longer runs: rebuild it with the current fplus and
    push it again (`git mv .diy .fplus` first).
- **Any Linux language or test command (Elixir/BEAM, Haskell, PHP, Ruby, Zig, game engines, custom scripts):** `init -lang` only lists built-in templates — **any Linux program runs on f+ DST** via a generic Dockerfile (`fplus dst init -cmd '...'`) or `services.yaml`. Run `fplus dst init -cmd '<command>'` to scaffold a plain Debian Dockerfile + `verify.sh` (`"$1"` is the test name), swap `FROM` to your runtime image, pre-fetch deps/build while the network is on, and push:
  - **Elixir / Erlang / Gleam (BEAM):** `FROM hexpm/elixir:1.17-erlang-27-debian-bookworm-slim` (or `FROM erlang:27-slim`), `RUN mix deps.get && mix test --no-start` (compile only), `fplus dst init -cmd 'mix test "$1"'` (or `rebar3 ct`, `gleam test`).
  - **PHP / Laravel:** `FROM php:8.3-cli-bookworm` + `composer install --no-interaction`, `fplus dst init -cmd 'vendor/bin/phpunit --filter "$1"'` (or `php artisan test --filter "$1"`). Add Postgres/Redis in `services.yaml` instead of sqlite/sync queues so real concurrency and retry paths run.
  - **Ruby / Rails:** `FROM ruby:3.3-slim-bookworm` + `bundle install`, `fplus dst init -cmd 'bundle exec rspec -e "$1"'`.
  - **Haskell:** `FROM haskell:9.6-slim-bookworm` + `cabal update && cabal build --enable-tests all`, `fplus dst init -cmd 'cabal test --test-option=-p --test-option="$1"'`.
  - **Large C++ CMake, Bazel, multi-module JVM, or tests that spawn their own binary:** see [recipes/build-shapes.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/build-shapes.md) (build a single CMake/Bazel/Maven/Gradle target, pass portable CPU flags `-march=x86-64-v2` / `PORTABLE=1` to avoid `SIGILL`, and bundle any spawned server binary on `PATH`).
  - **Custom script / game engine:** `fplus dst init -cmd 'tools/test.sh "$1"'`, add the command's toolchain to the Dockerfile, then `fplus dst image push -build -check TEST` as above. Godot 4, headless (tested: builds, runs offline, a failing
  script exits non-zero):

      FROM debian:bookworm-slim
      RUN apt-get update && apt-get install -y --no-install-recommends bash ca-certificates curl unzip libfontconfig1 && rm -rf /var/lib/apt/lists/*
      ARG GODOT=4.3-stable
      RUN curl -fsSL -o /tmp/godot.zip "https://github.com/godotengine/godot/releases/download/$GODOT/Godot_v${GODOT}_linux.x86_64.zip" \
       && unzip -q /tmp/godot.zip -d /opt && ln -s "/opt/Godot_v${GODOT}_linux.x86_64" /usr/local/bin/godot && rm /tmp/godot.zip
      WORKDIR /src
      COPY . .
      RUN godot --headless --import --path .     # imports assets while the network is on: tests run offline

  with `tools/test.sh` running `godot --headless --path . -s "$1"` (a `SceneTree` script that ends with `quit(0)` or
  `quit(1)`), or your GUT / GdUnit4 command line. TEST is then e.g. `tests/test_save.gd`.
- **Anything else, or no Docker allowed:** build in CI: `fplus dst token` (store it as the secret `EXFUN_DST_TOKEN`),
  then `fplus dst ci-workflow -test TEST > .github/workflows/dst.yml`; the run prints `img_…`.

**Go** (one package; TEST is a `-test.run` pattern, so `fplus dst hunt IMG 'A|B' -group` works too):

    FROM golang:1.25
    WORKDIR /src
    COPY . .
    RUN go test -c -o /src/pkg.test ./PKG          # -race only where the project's own CI uses it

and verify.sh `cd /src/PKG && exec /src/pkg.test -test.run "^($1)\$" -test.count=1 -test.v` (a test reads its testdata from its package folder).

**JVM:** run one test with the JUnit console launcher, not Maven or Gradle (no surefire retries; 22 s became 8 s):
`mvn -q test-compile dependency:copy-dependencies` in the Dockerfile, then verify.sh runs
`java -jar junit-platform-console-standalone.jar execute --select-method "$1" -cp "target/test-classes:target/classes:$(ls target/dependency/*.jar | tr '\n' :)"`.

**Rust:** `fplus dst init` scaffolds a multi-stage `.fplus/environment/Dockerfile`, `.fplus/environment/Dockerfile.dockerignore`
(overrides root `*` allowlist `.dockerignore` files while ignoring `.git` and `**/target`), and `verify.sh`. Keep builder
and runtime on the same Debian release (`rust:1-bookworm` + `debian:bookworm-slim`, glibc 2.36) to avoid `GLIBC_2.38 not found`
(dynamic glibc also enables per-service `-faults clock` in `services.yaml`; `-faults disk` works on both dynamic and static binaries — see [strategy.md](strategy.md#which-faults-reach-which-bugs)):

    FROM rust:1-bookworm AS build
    SHELL ["/bin/bash", "-o", "pipefail", "-c"]
    RUN apt-get update && apt-get install -y --no-install-recommends jq && rm -rf /var/lib/apt/lists/*
    WORKDIR /src
    COPY . .
    RUN --mount=type=cache,target=/usr/local/cargo/registry \
        --mount=type=cache,target=/usr/local/cargo/git \
        --mount=type=cache,target=/src/target \
        mkdir -p /opt/fplus-tests && \
        cargo test --no-run --locked --message-format=json \
          | jq -r 'select(.profile.test == true and .executable != null) | (.package_id | if contains("#") then (split("#")[1] | if contains("@") then split("@")[0] else "" end) else split(" ")[0] end) as $pkg | (if $pkg != "" then $pkg else (.manifest_path | split("/")[-2]) end) as $p | "\($p)/\(.target.name)-\(.target.kind[0] // "test")\t\(.executable)"' \
          | while IFS=$'\t' read -r rel exe; do mkdir -p "/opt/fplus-tests/$(dirname "$rel")" && cp "$exe" "/opt/fplus-tests/$rel"; done

    FROM debian:bookworm-slim
    WORKDIR /src
    COPY --from=build /opt/fplus-tests /opt/fplus-tests
    COPY .fplus/environment/verify.sh .fplus/environment/verify.sh
    RUN chmod +x .fplus/environment/verify.sh

(`--locked` only when `Cargo.lock` is committed; add `-p <crate>` to scope a large workspace, and system build deps like
`libclang-dev cmake protobuf-compiler` to `apt-get` if needed.) Pair with `.fplus/environment/Dockerfile.dockerignore`
(`.git`, `**/target`, `!.fplus`, `!.fplus/**`). Copy test binaries into `/opt/fplus-tests/<pkg>/<target>-<kind>` (never
`/src/tests/`, which collides with Rust's `tests/` directory). `TEST` is `<pkg>/<target>-<kind>::<test>`, `<crate>::<test>`,
`<target>::<test>`, or `<test>`; `verify.sh` checks `[[ -f "$exe" && -x "$exe" ]]` (never bare `-x`, which matches
directories), verifies `"$exe" "$test" --exact --list` has a `: test$` match before `exec "$exe" "$test" --exact --nocapture`
(exiting 2 on 0 matches instead of silently passing). Pass `--test-threads=1` by default to keep memory bounded on a 2-vCPU VM (use `--test-threads=2` only when hunting concurrent cross-test races in a `-group` run). For glibc parity, `cargo zigbuild`, `io_uring` vs `syscall`, `strip`, RocksDB/MDBX teardown, and 2-round crash-reopen oracles, see [recipes/stack-rust.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/stack-rust.md).

**Node/TypeScript:** match the repo's Node version from `package.json` `engines.node` or `.nvmrc` (prefer `node:22-slim` / `node:24-slim` on Debian trixie glibc 2.41, or `ubuntu:24.04` glibc 2.39 — **avoid `bookworm-slim` (glibc 2.36)** when the repo ships prebuilt native N-API `*.node` addons like `lmdb` or crypto/prover bindings, which commonly require `GLIBC_2.38+` and fail immediately at runtime; verify native addons during build with `! find . -name '*.node' -exec ldd {} + 2>&1 | grep 'not found'`), then install and build in the Dockerfile (`npm ci`, plus the project's build step if tests run from
its output), with the network on. In a **Yarn 4 + TypeScript project-references monorepo**, build only the target package's dependency closure instead of the whole repo: use `yarn workspaces focus <pkg>` and `yarn workspaces foreach --recursive --from <pkg> --topological run build` (or `npx tsc -b packages/<pkg>`), then copy only that package's transitive `dist/` outputs and focused `node_modules` into the runtime stage. `verify.sh` runs one test with the project's own runner and no retries: vitest
`exec npx vitest run --retry=0 -t "$1" FILE`, jest `exec npx jest --ci --testNamePattern "^$1\$" FILE`, or built-in `node:test`
`exec node --test --test-name-pattern "^$1\$" FILE` (adding e.g. `--import=tsx` for TypeScript), FILE the
test's file. TEST is the test's full name as the runner prints it (`describe › it`, joined with a space for jest). For pruned multi-node rollup images, Anvil slot-aligned L1 + RPC fault proxies, and fast `crane`/trigger iteration, see [recipes/rollup-nodes.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/rollup-nodes.md).

**Python (`pytest`):** install dependencies in the Dockerfile with the network on (`FROM python:3.12-slim`, `WORKDIR /src`,
`COPY . .`, `RUN pip install --no-cache-dir -e ".[test]"` or `pip install -r requirements.txt pytest`).
verify.sh runs one node ID with retries off: `exec pytest -o addopts="" -v --tb=short "$1"` (TEST is e.g.
`tests/test_store.py::test_crash_recovery`).

**.NET / C# (`NUnit` / `xUnit` / Microsoft.Testing.Platform):** use `FROM mcr.microsoft.com/dotnet/sdk:9.0` (matching
`global.json` or `<TargetFramework>`, e.g. `8.0`, `9.0`, `10.0`), set `DOTNET_CLI_TELEMETRY_OPTOUT=1`, `DOTNET_NOLOGO=1`,
and `DOTNET_GCHeapHardLimit=0x100000000` (4 GiB hex), and build with the network on (`RUN dotnet build path/to/My.Tests.csproj -c Release`).
In `verify.sh`, run offline: for **Microsoft.Testing.Platform (MTP)** test projects (`EnableNUnitRunner` / `UseMicrosoftTestingPlatformRunner`),
`exec` the built test host directly (`exec /src/.../bin/Release/net9.0/My.Tests --filter "$1"` or `--treenode-filter` — fast startup and exits non-zero when 0 tests match);
for VSTest, run `dotnet test <proj> -c Release --no-build --no-restore --filter "$1"` and require positive proof that at least one test executed (e.g. `Passed: [1-9]` / `Failed: [1-9]`), not just exit 0.
**Turn runner retries off:** NUnit's `[Retry(n)]` attribute is compiled into test source and cannot be disabled by a CLI flag — strip it in the Dockerfile before `dotnet build`
(e.g. `find . -name '*.cs' -exec sed -i -E 's/\[Retry\([0-9]+\)\]//g; s/,\s*Retry\([0-9]+\)//g; s/Retry\([0-9]+\)\s*,\s*//g' {} +`) or guard it with `#if !FPLUS_DST`;
for xUnit, replace `[RetryFact]` / `xRetry` attributes with `[Fact]` and disable any test-host retry plugins so retries never hide flakes.

**C/C++:** build test binaries in the Dockerfile (use dynamic glibc if you also want per-service `-faults clock` in `services.yaml`; `-faults disk` works on both static and dynamic binaries — see [strategy.md](strategy.md#which-faults-reach-which-bugs))
(`FROM debian:bookworm-slim`, `RUN apt-get update && apt-get install -y build-essential cmake`, `WORKDIR /src`,
`COPY . .`, `RUN cmake -B build && cmake --build build -j`). verify.sh runs one test directly:
`exec /src/build/tests "$1"` (or `exec ctest --test-dir /src/build -R "^$1\$" --output-on-failure`).

**`verify.sh` rules:**
- The image must have `/bin/bash` (use `debian:bookworm-slim` / `python:3.12-slim`, or `apk add bash` on Alpine).
- Runs offline as `root` (the image's `USER` is ignored; drop privileges with `su` if your process refuses root).
- `exec` the test runner directly so output streams live, and **never `rm -rf /data` or touch `/cold-out`** (the runner
  keeps exit-code files under `/data/t`; put scratch files in a subdirectory like `/data/run`).

**One image for many tests, kept lean:**
- Push one image whose `verify.sh` dispatches by `"$1"` (`TEST`), then fan out parallel `check` and `hunt` jobs across all tests on that `img_…`: the simulator converts it once ($0) instead of repeating a conversion per test. List pushed image IDs, labels, commits, and sizes anytime with `fplus dst images` (alias `fplus dst image list [-label L] [-json]`).
- Keep images lean — especially prebuilt or Rust binaries: strip debug symbols (`strip`, `CARGO_PROFILE_TEST_DEBUG=0`, or `strip = "symbols"`) and leave build caches out so first-time conversion finishes much faster.

### Fast iteration without rebuilding the image (`rerun -overlay`)

When the base image is already pushed and you are editing a harness/oracle script, config, environment variables, or a rebuilt binary (up to 256 MiB total), **do not rebuild or push a new Docker image** — rerun the last job with a runtime overlay:

    fplus dst rerun JOB -overlay .fplus/environment/verify.sh -check
    fplus dst rerun JOB -overlay /usr/local/bin/app=./target/release/app -env RUST_LOG=debug
    fplus dst rerun JOB -overlay node:/etc/node.toml=./node.toml -env node:SYNC=1 -budget 30m

And to fix-check a compiled binary fix against a finding without rebuilding the Docker image:

    fplus dst fixcheck FINDING -overlay /usr/local/bin/app=./target/release/app -proof

Overlay format:
- `-overlay [SVC:][DEST=]PATH` (repeatable): defaults to service `t` and relative path under `WORKDIR`; prefix `DEST` with `/` to place under `/`, or prefix with `SVC:` (or `*:`) to target a specific service (or all services). Identical overlays deduplicate in 1 RTT and skip image conversion completely.
- `-env [SVC:]KEY=VALUE` on `check`, `hunt`, `replay`, and `rerun` (repeatable, alias of `-service-env`): overrides per-service environment variables at boot without touching the image. On `image push` and `fixcheck`, `-env` instead means packing `.fplus/environment/` without Docker (for per-service env overrides on `fixcheck`, use `-service-env [SVC:]KEY=VALUE`).
- Use `-check` on `rerun` to run a fast single fault-free check first before spending a full hunt budget.

### Small-layer layout for fast iteration

Structure your Dockerfile so slow, rarely changing layers come first and the files you edit between runs (`.fplus/environment/`, workload/oracle scripts, config, or a single test file) sit in **one small final layer** (kilobytes to a few megabytes):

    # Stage 1: heavy toolchain + deps + compiled artifacts (cached)
    FROM <toolchain> AS build
    WORKDIR /src
    COPY <lockfiles / manifests> ./
    RUN <install dependencies>                      # cached until deps change
    COPY . .
    RUN <compile binaries / tests>                  # use BuildKit cache mounts

    # Stage 2: lean runtime — heavy stable layers early, edited files last
    FROM <slim-runtime>
    RUN <install runtime OS tools only>             # layer 1: OS tools
    WORKDIR /work
    COPY --from=build /out/deps /work/deps          # layer 2: runtime deps (e.g. node_modules)
    COPY --from=build /out/bin  /work/bin           # layer 3: compiled binaries (stripped)
    COPY .fplus/environment/    /work/.fplus/environment/   # last layer: KB-scale harness/oracle/services.yaml

Why this layout matters:
- **Instant local rebuilds:** never `COPY . .` of a multi-GB workspace right before editing a harness script or test — a 1-line oracle edit then invalidates gigabytes. Keep compiled runtime artifacts in an early layer via a multi-stage Dockerfile (`COPY --from=build`). **Warning on `FROM <local-tag>`:** referencing a locally built base tag (e.g. `FROM myproj-base:1`) works with `fplus dst image push -build` on your machine because the pushed image archive is self-contained, but **cannot be reproduced on another machine or in CI from the Dockerfile alone** unless that base image is pushed to a registry or built in an earlier stage of the same Dockerfile.
- **Fast server-side conversion:** f+ caches converted container layers by digest per team, so when only the small final layer changes, conversion skips gigabytes of unchanged base layers and converts only the new top layer.
- **Keep pushes under 20 MB and 30 s:**
  - **Multi-service with pinned registry images (`-env`):** put heavy service binaries in a digest-pinned `image: registry/repo@sha256:...` in `services.yaml` and keep only `services.yaml`, workload, and oracle scripts in `.fplus/environment/`. `fplus dst image push -env` packs and pushes only `.fplus/environment/` (kilobytes to a few MB, seconds, no Docker rebuild).
  - **Single-binary targets without Docker:** use `fplus dst image push -go PKG` or `-bin PATH` to push only the compiled binary and minimal runtime.
  - **Custom Docker images (`-build` or `-from docker:TAG`):** keep the runtime stage pruned (no `.git`, compilers, build caches, source maps, or debug symbols), because `image push` uploads the saved image archive. For quick single-step test or trigger tweaks on an already-converted image, prefer `-command` over pushing a new image.

### Memory: aim under 10 GiB per VM

Each guest VM defaults to **4096 MiB (4 GiB)** of RAM (`-memory` accepts `2048` to `32768` MiB in steps of `512`). Keeping a test under 10 GiB per VM (`-memory <= 10240`) keeps a hunt at its full 10 VMs in parallel and within the base core-hour rate (larger VMs run fewer in parallel and scale in price). Measure peak RSS on one local run first (`docker stats` or `/usr/bin/time -v` — check `Maximum resident set size`), then trim before asking for bigger VMs:

- **Rust:** lower debug info and raise optimization in the test profile (`CARGO_PROFILE_TEST_DEBUG=0` or `1`, `CARGO_PROFILE_TEST_OPT_LEVEL=1`, as Antithesis/fuzz builds do); run one test thread (`RUST_TEST_THREADS=1`, `--test-threads=1`, or `cargo nextest run -j1`); use fewer in-process nodes if the harness allows.
- **JVM:** cap the heap with `-Xmx` (e.g. `JAVA_TOOL_OPTIONS="-Xmx4g"`).
- **Go:** cap the runtime heap with `GOMEMLIMIT` (e.g. `GOMEMLIMIT=4GiB`).
- **.NET:** cap the GC heap with `DOTNET_GCHeapHardLimit` (hex bytes, e.g. `0x100000000` for 4 GiB).
- **Node:** cap V8's heap with `NODE_OPTIONS="--max-old-space-size=4096"`.
- **Heavy databases & search engines (ClickHouse, Elasticsearch/OpenSearch, Kafka):** guest VMs have no swap and Linux default `vm.overcommit_memory=0`, so servers that reserve large virtual address spaces up front can abort at startup (`__vm_enough_memory` / `Aborted`) in a 4096 MiB VM even with low RSS. Start checks and hunts with `-memory 8192` (still within the 10 GiB base core-hour rate), and cap server memory where supported (e.g. ClickHouse `<mlock_executable>false</mlock_executable>`, `<mark_cache_size>536870912</mark_cache_size>`, `<max_server_memory_usage>2147483648</max_server_memory_usage>`; Elasticsearch/Kafka `ES_JAVA_OPTS`/`KAFKA_HEAP_OPTS="-Xms1g -Xmx2g"`).
- **`-memory` is the fallback, not the first move:** only raise `-memory` on `check`/`hunt` after trimming if the test still needs more RAM (`guest_touched_mib` from `check` plus about 2 GiB).

**Several processes** (a cluster, client and servers): declare them in `.fplus/environment/services.yaml`
(https://staging.extrafunctional-staging.fyi/dst-services.md) so a hunt can crash and restart each, cut the network between them, and power-cut
`data:` nodes; each listens on `{addr:<name>}` or 0.0.0.0, never 127.0.0.1 (`network_cidr:` sets a custom RFC1918 `/16` or `/24` bridge subnet, `{addr:<name>}` is substituted in `run:`, `entrypoint:`, `cmd:`, `ready:`, and per-service `env:`, shared `volumes:`/`mounts:` share directories between containers, `job:`/`init:` runs one-shot setup, `depends_on:`/`after:` orders startup, `restart:` sets `no`, `always`, `unless-stopped`, `on-failure`, or `on-failure:<max>` for fail-stop services, and `faults: false` excludes helpers from faults). Run each service with its output on stdout/stderr: no redirect to files (or tail the file to stdout). f+ keeps the last 64 KiB of each service's console for failing runs and replays; a service that writes only to its own files leaves nothing to read when it crashes. See [recipes/services-multinode.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/services-multinode.md) for the offline `services.yaml` cookbook, disk sizing formula (`32768 MiB` / `32 GiB` disk cap, `8192 MiB` / `8 GiB` combined images), `primary:` busybox rules, and `$FPLUS_DST_STOP_FAULTS` heal patterns. A docker-compose or Kubernetes repository (manifests, a Helm chart or a Kustomize folder: `-k8s PATH`): `fplus dst init` writes `services.yaml` from the compose file, each service from its own image pinned by digest or, for a compose `build:`, built from its folder into the push by `fplus dst image push -build` (or use `fplus dst image push -env` without Docker when all services use pinned `image:` digests), and a `workload.sh` stub; write the test there (the five generic checks in [recipes/liveness-and-caps.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/liveness-and-caps.md)), and read what init says it did not translate (https://staging.extrafunctional-staging.fyi/dst-services.md, From docker-compose).

### Invariants and honesty check

Before trusting a green check or a clean hunt, define testable **invariants** drawn from the code, docs, and closed bugs or past incidents (ask your person for known incidents):
- **Safety** (a bad thing never happens): replica agreement, no lost acknowledged writes, no resurrection of deleted state, clean error logs.
- **Liveness** (a good thing eventually happens): fresh writes succeed, the head advances, and restarted or rejoined nodes converge after faults heal.
- **Cheap honesty check (before trusting "nothing found"):** plant one realistic bug on a scratch copy (a 1-line mutation that breaks a key invariant), run a check or short hunt, and confirm the oracle actually fires, then revert the planted bug. A property that passes every run proves nothing until you have seen it catch a real violation.

**Properties** (what must always hold, beyond the test passing: one leader a term, no acknowledged write lost):
use the thin zero-dependency **f+ annotation SDK** (`sdk/csharp`, `sdk/go`, `sdk/python`, `sdk/rust`, `sdk/typescript`, `sdk/java` — verbs: `always`, `sometimes`, `reachable`, `unreachable`, `setup_complete`, `send_event`; reads `$FPLUS_DST_SDK_OUTPUT` first, falls back to `$ANTITHESIS_SDK_LOCAL_OUTPUT`, and is a no-op when neither is set). Existing **Antithesis SDKs work too** unchanged, or from shell/any language append one JSON line to `${FPLUS_DST_SDK_OUTPUT:-$ANTITHESIS_SDK_LOCAL_OUTPUT}`. A violated `always` (or hit `unreachable`) is a finding of its own; a `sometimes` property never true (or a `reachable` code path never reached) is a coverage gap, not a pass: change the workload or fault family until it fires, before trusting "nothing found".

    printf '{"antithesis_assert":{"hit":true,"must_hit":true,"assert_type":"always","display_type":"Always","message":"%s","condition":%s,"id":"%s","location":{"file":"","function":"","class":"","begin_line":0,"begin_column":0},"details":{}}}\n' \
      "one leader per term" "$ok" one_leader >> "${FPLUS_DST_SDK_OUTPUT:-$ANTITHESIS_SDK_LOCAL_OUTPUT}"   # ok: true or false

**The five generic checks (start here, before any custom property):** most real bugs in a storage or consensus system
break one of five things after faults heal, whatever the system: (1) **read back every acknowledged write**; (2) **every
replica agrees** after the heal (query each one on its own, not through the leader); (3) **it still serves writes**
(liveness: a fresh write succeeds and the head advances); (4) **the error log is clean** (scan the console for panics,
assertion failures, corruption and checksum errors); (5) **nothing deleted comes back** and the history is consistent
(no resurrection after a crash or a snapshot install). Wire these five first; they need no knowledge of the system's
internals. Then shrink the caps, add inclusion and stale-head checks, and prove each oracle catches a 1-line planted
bug before a full hunt: see [recipes/liveness-and-caps.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/liveness-and-caps.md), which also has the
two-lane lifecycle workload (data-plane traffic racing compaction, flush, snapshot and close) and why files must be
created during the run.

## 4. Check, then hunt

**Per-test gate before hunting:** before running `fplus dst hunt`, state in one sentence which concurrency, network, storage, or multi-process behaviour in **THIS test** faults can reach. If none (sequential unit test, in-memory fake-client test, or single-process CLI test — even if the codebase uses threads elsewhere), do **not** hunt it; pick a reachable test or tell your person and stop. If one run of the test takes more than ~1 min, a 15-min hunt gets only a handful of schedules: use `-budget 60m` or a shorter test ("nothing found in N schedules" with N under ~50 says little).

**Harness pitfalls (each becomes a finding with no bug behind it):** f+ pauses, steals CPU from and restarts every process, including your workload, driver and readiness scripts. Give readiness waits generous timeouts and client calls retries, or each fixed wait becomes a finding. Drop root with `USER` in the Dockerfile or `setpriv`, not `su`/`runuser` (a paused wrapper can stay stopped and hang the run). Build portable binaries (no `-march=native`; `PORTABLE=1` for RocksDB): the simulator's CPU is older than most build hosts, and a native binary dies with SIGILL, which the check reports only as failing without faults.

    fplus dst check IMG TEST                       # one run with no faults; holds $0.58, charged about $0.02
    fplus dst status JOB -watch                    # live deduplicated progress + FIRST FAILURE callout (alias of -wait)
    fplus dst hunt IMG TEST                              # timing faults on 10 VMs, 15 min by default (pass -budget 60m for deeper searches); first hunt ends at first failure; holds and is charged at most $1.25
    fplus dst status JOB -watch

A hunt or fix check holds the most it may be charged, its VMs × its budget at $0.50/core-hour (a check, replay or debug
its budget plus a margin), and is charged what it used, at most that: a 15-minute hunt runs on 10 VMs, holds $1.25 while it runs and is charged at most $1.25,
a 5-minute hunt runs on 10 VMs, holds $0.42 while it runs and is charged at most $0.42,
and a 60-minute hunt runs on 10 VMs, holds $5.00 while it runs and is charged at most $5.00. Add `-vms N` (1 to 10, default 10) to pace spend: `-vms 1` runs one schedule under faults at a time (useful for cheap harness iteration on multi-minute tests; e.g. `-vms 1 -budget 25m` holds and charges at most $0.21). Budget from what is
charged; holds come back. A hunt's VMs can vary while it runs: `fplus dst status JOB` says what they ran and what
was charged (`ran: 8 VM-hours (15.5 VMs on average), charged for 8 core-hours`).
Expect: the first job on an image sits in `building` while converting the image for the simulator on that machine (once per image **per machine**, ~2 min per GB; a hunt on other machines than the check converts again, 2–10 min), and jobs may queue
behind others (`queued, N ahead`): neither costs anything, but both count toward a hunt's wall time. A check that fails is a recipe problem: read
`fplus dst logs JOB` (prints the run summary's line when the engine itself ended the run, then the failing console tail — last 200 lines — straight to stdout; `-all` for the full log,
`-o logs.tar.gz` to save the archive) and fix verify.sh before hunting. A hunt's first failure shows in
`fplus dst status JOB -watch` within minutes of it (`FIRST FAILURE:` callout); it is filed as a finding when the hunt
ends, after confirming, shrinking and triage (5–40 min). **Do not stop a hunt that has shown a failure: a stopped hunt
files nothing.** A provisional "failure seen" can also be dropped if confirmation doesn't reproduce it. The finding's
error is the last error-looking console line, which may be a log line: read the console tail in `fplus dst status JOB -md`
for the failing assertion and test name. A test that hangs runs to the **1800 s** guest-time cap: give the test runner
its own timeout and make it exit (`mocha --exit`, `go test -timeout`).
An image's first hunt ends there by default (the CLI says so): the search stops at its first failing schedule,
confirms and shrinks it, and then files the finding (raft failed in its first 40 schedules; a full 60-min hunt filed
at min 86). A later hunt of the image searches its whole budget, which finds the other failures; `-full` asks for that
on a first hunt, `-stop-at-first` for a stop on a later one. A first hunt never injects disk errnos (no `-faults`): **do not add `-faults disk` on a first hunt unless the person's code is explicitly meant to survive disk errors (`EIO`/`ENOSPC`).** Start with default timing (plus network/kills/power cuts on `services.yaml`); add `-faults disk` only when testing disk-error tolerance. If an injected fault breaks the test or harness process itself, f+ sets it aside as a harness note (not `FOUND`) with a `-fault-exclusions <site>` / harness-hardening hint. When migrating an Antithesis Test Composer / docker-compose repo, pass `-fault-tolerance` (and optional `-fault-exclusions REGEX` to exempt matching service names from container-scoped faults) — all four presets guarantee zero injected libc/kernel syscall errnos:

| Antithesis `--fault-tolerance` | `fplus dst hunt` flag | Active faults | Excluded faults |
| --- | --- | --- | --- |
| `none` | `-fault-tolerance none` | timing only (no injected faults) | kills, pauses, network, clock, power cuts, syscalls |
| `legacy` (Antithesis default) | `-fault-tolerance legacy` | pauses (`process`) + `network` | kills, power cuts, syscalls |
| `resilient` | `-fault-tolerance resilient` | pauses (`process`) + one-way network (`O=`) + `clock` | kills, partitions (`N=`), power cuts, syscalls |
| `high_availability` | `-fault-tolerance high_availability` | kills + pauses (`process`) + `network` + `clock` + `powercut` | syscalls (`F=`), corrupt |

Map Antithesis `--fault-exclusions <regex>` directly to `-fault-exclusions <regex>` (e.g. `-fault-tolerance legacy -fault-exclusions "^provision$"`).  Never `stop` a hunt that has seen a failure: a stopped
hunt files nothing. To drop f+ DST CI right next to an existing Antithesis GitHub workflow (supporting digest-pinned `-env` or `-build` multi-service targets), generate a ready-to-commit workflow:

    fplus dst ci-workflow -compose path/to/docker-compose.yaml -fault-tolerance legacy -fault-exclusions "^provision$" -budget 60m > .github/workflows/fplus-dst.yml

(Run `fplus dst ci-workflow` with no `-compose` inside a repo that already has `.fplus/environment/services.yaml` or `docker-compose.yaml` to auto-detect it; the generated workflow pushes the multi-service image, runs `fplus dst check` + `fplus dst hunt`, and writes the `fplus dst status JOB -md` summary link.) Start breadth first: run several short hunts (15-30 min) across tests or workloads in parallel, then put longer budgets behind what moves. A known CI flake that is rare needs 60-120 min; after about three empty 60-minute hunts on one test, move on ([strategy.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/strategy.md)).
Each machine converts an image once, so a later job may sit in `building` again. You may end the session: hunts
run on our machines.
**Coding agents with short shell timeouts:** poll `fplus dst status JOB` (or run `fplus dst status JOB -watch` in the
background) across first-image conversions and long hunts; never resubmit a job that is still `waiting` or `running`.

## 5. Read what it found (triage live, lead with the failing moment)

    fplus dst findings                             # inspect findings as soon as they appear (no need to wait for the hunt to end)
    fplus dst finding FND                          # free: lists every job that hit it (grouped by signature), guest-time moments, automatic triage, minimal schedule
    fplus dst causality FND                        # >=1 core-hour (~6-8 for a 3-4 min test): run when >1 fault or dense steals leave the deciding moment unclear
    fplus dst debug FND -at failure-1s,failure -- sh -c 'ps -T; tail -n 100 /tmp/fplus-dst/*.log'
    fplus dst status JOB -md                       # the completed hunt's triage report: properties, moments, triage, next commands
    fplus dst replay FND                           # confirm the same failure, bit for bit
    fplus dst replay FND -image IMG -yes           # re-confirm it on another image: fixcheck-sized search of nearby schedules (omit -yes to preview cost; -budget Nm to cap)

Start triaging as soon as `status JOB -watch` or `fplus dst findings` shows a failure—do not wait for the hunt to
finish. Order events by **guest time** (never application wall-clock timestamps skewed by clock faults), read
`fplus dst finding FND` first—its `Moments`, automatic triage, and minimal schedule show which faults matter for **free**—and
follow [triage.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/triage.md): run `fplus dst causality FND` only when more than one fault or dense steals leave the
deciding moment unclear (it costs >=1 core-hour; leave `-simulation-hours` unset so f+ sizes it from `baseline_s`, less
than that and the curve comes back partial), then inspect that moment with `fplus dst debug FND -at <moment>` (or a
targeted `rerun -overlay`). Stop only when run evidence shows the cause. If you are hunting a known CI flake, compare
the finding's error with CI's failure line (from your person or an opt-in `scan -flakes` run): the same (reproduced), a
different failure (still a bug, say so), or `found` with no error text (`fplus dst logs JOB`, and [triage.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/triage.md)).
Replay soon: a finding whose image is gone can't replay. A hunt that ends with no finding is not a pass: tell your person
"nothing reproduced yet in N core-hours" and offer a longer budget or another test ([strategy.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/strategy.md)).
**Don't re-create a finding by hand:** once f+ files a finding, do not try to reproduce it locally with CPU throttling (`docker --cpus`), sleep loops, or manual timing tweaks. Use `fplus dst finding FND`, `fplus dst causality FND`, `fplus dst debug FND`, `fplus dst replay FND`, and `fplus dst logs JOB` (with `minimal_schedule` as a supporting replay artifact — see [strategy.md](strategy.md#schedule-grammar) for the token grammar), then verify the fix with `fplus dst fixcheck FND -build` (or `fplus dst fixcheck FND IMG`).
By default faults stop when the test ends (the quiet period): a power cut or kill you schedule after your workload
exits is dropped, and the hunt reads clean. Add `J=0` to such a schedule (e.g. `disk=cut | run D=12000 C=9 J=0`), or
keep the test running past it. The hunt's result counts the dropped faults (`quiet_dropped`) and `fplus dst status`
warns when more than 20 % were dropped: a clean hunt with that warning never ran those faults.
Disk faults cover writes until your test's last acknowledged step; work after it (a merge or flush your test
starts after acking its last step) isn't faulted yet, so ack the last step after that work.

### Go deeper

Once a test passes its check or a first hunt ends, push into the runs that find real bugs — "nothing found in N schedules of one fault family" means try another fault family, not stop:

- **Real load while faults hit:** drive continuous traffic (writes, reads, queries, background compaction/sync) while faults land — an idle cluster hides races and stalled recovery.
- **Crashes and restarts mid-operation:** kill and restart nodes mid-sync, mid-flush, mid-compaction, or mid-epoch/handoff rather than only at startup or shutdown.
- **Power loss on the data dir:** schedule abrupt power cuts (`data:` services in `services.yaml`, or crash-reopen loops) to expose missing fsyncs, torn metadata, and stale or resurrected state.
- **Slow peers rather than clean partitions:** inject delay, jitter, reordering, and partial loss (`-faults network`, CPU steals and pauses) — asymmetric slowdowns trigger split-brain, livelock, and timeout cascades that hard cuts miss.
- **Multi-node topologies:** move from single-node unit tests to multi-node clusters (`services.yaml`) where leaders, followers, and joining or restarting peers interact under faults.
- **Oracles on invariants, not just "the test passes":** assert agreement across replicas, no lost acknowledged writes, bounded convergence after heal, and clean error logs (see the five generic checks above and [recipes/liveness-and-caps.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/liveness-and-caps.md)).

## 6. Show your person

**Classify every finding before you show it.** Your person judges f+ by what you show first, so never present a raw
finding. For each one, from `fplus dst finding FND` (and causality when needed), say which it is, with one line of evidence:

| Verdict | How to tell | What to tell your person |
| --- | --- | --- |
| **Likely real bug** | The failure is in the code under test and a realistic trigger (normal load, a short pause, a dropped connection, a restart) breaks a property the code promises | Lead with it: the failing moment, file:line, the trigger, and that it replays bit for bit |
| **Timing assumption in the test** | One injected pause or CPU steal at least as long as the test's own timeout, sleep or deadline, and only that timeout fails | "Your test assumes the reply always arrives within N s; a stall of N s breaks it. That's a flaky test you can now reproduce: raise or remove the fixed wait, or wait on a condition." Do not call it a bug in their code |
| **Harness or setup** | The failure is in the test's own fixture, cluster helper, wrapper script or workload (including faults landing before the test body starts), not in the code under test | Say plainly it's the test setup, not their code; exclude that fault or site (`-exclude-faults`, `-fault-exclusions`) and keep hunting |

Lead with likely real bugs; group the rest briefly under "flaky tests f+ can now reproduce" and "test setup notes". If
everything was a timing assumption or setup, say so honestly and move to a test that exercises the system itself (a
multi-node or service-level test, or a small workload with invariants, see Go deeper) rather than presenting noise as findings.

Tell them, for each test: found or not, the error (compared against CI's when hunting a CI flake), and the cost (`fplus dst report`). For a live
dashboard of the team (findings, jobs, spend, coverage), run `fplus dst codemode -publish dst-dashboard` (beta;
`fplus dst codemode -share APP` for a revocable read-only link).

## 7. Fix it and prove it

For each finding worth fixing (reproduced, or a real failure of its own), in order:

1. **Cause (run evidence, not guesses).** Follow [triage.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/triage.md): read `fplus dst finding FND` (chronological
   guest-time `Moments`, active faults at the failure, and automatic triage: processes, stacks, log tails). When the
   failing moment doesn't show where the bug locked in—especially with >1 fault or dense steals—run `fplus dst causality
   FND` (about 1 core-hour for a 20 s test) to find the "moment of no return" (`P(failure)` ramp), then inspect that
   moment with `fplus dst debug FND -at <moment> -- ...` (or launch a targeted `rerun -overlay` with extra logging).
   Stop only once run evidence shows the cause.
2. **Fix** the code, not the test's timeout or assertion: a fix that only waits longer passes the fix check and is
   still wrong. Leave it uncommitted, or commit it. No checkout the finding's image was built from (a hand-built
   image, a workload rebuilt since)? `fplus dst image pull FND` writes the image it was found on as a tar: load it
   and build the fix FROM it.
3. **Prove it:** `fplus dst fixcheck FND -build -proof -cause "what the test assumed, what breaks it, what the fix
   does"` builds this folder's recipe with the fix (as the hunted image was built: same verify.sh and command),
   checks it, and prints a proof link at once; an image pushed without Docker is pushed again the same way, with
   `-go PKG`, `-bin PATH` or `-env` in place of `-build` (`exfun.app/r/…`, no login). The link shows the failure, its faults,
   where it is decided, your cause, the diff (this checkout against the finding's image commit, or HEAD if that
   commit is unknown or unavailable locally, plus untracked files except gitignored files, untracked `.fplus/`
   files, unreadable files, binaries (a NUL in the first 8 KiB) and files over 256 KiB; tracked `.fplus/`
   changes are included). Give `-patch FILE` to supply the diff yourself, including outside a git checkout.
   The fix check refuses an empty diff; a diff over 256 KiB is not sent, so the check cannot say "Fix verified".
   When the check ends, the link shows the
   verdict and a `Verification:` line to paste. No Docker here: push the fix with `-go` or `-bin` as in step 3, then
   `fplus dst fixcheck FND IMG -proof -cause "…"`. Never put the fix in `-command`: a fix check runs the finding's own command, and f+ refuses another.
4. **Read the verdict** (`fplus dst status JOB -watch`): `fixed`, `fixed-test-modified` (a test fix: "the failure is gone under N
   schedules; the change is to the test", which says nothing of whether the test still checks what it did: show your person the
   test change to review; it is never "fix verified"), `still-fails` (the fix misses
   it: back to 1) or `inconclusive`. A `weak` verdict searched too few schedules: rerun with the `-budget` it names. Give your person
   the proof link and the verdict.
   `Fixed, not verified` because the diff was not given: run the fix check again with it (`-build`, or `-patch FILE`).
   A diff sent afterwards (`fplus dst share FND -job FIXCHECK -patch fix.diff`) is read for test changes only: it can
   lower the verdict, never make it "Fix verified", since nothing ties it to the image that ran.

**Keep the fix loop cheap.** Once you have a root cause, a probe test as a `check` and a `fixcheck` are the cheap loop, not hunts — don't burn full multi-VM hunts to verify a harness tweak or a known mechanism (use `check`, `fixcheck`, or at most `-vms 1` if a probe still needs faults).

**Does the fix really hold? Write the test that would have caught it.** A fix check replays the finding's schedule
and the ones near it with the same test; a fix that only moves the timing can pass that without the bug being gone.
The strongest evidence is a test aimed at the bug's mechanism that fails on the unfixed code and passes on the fix:

1. `fplus dst brief FND`: the failure and where, its faults, the moment that decides it (from a
   causality job, or the command to run one), and these steps.
2. Write a test that forces that moment: the interleaving or the fault on the decisive step (a barrier, a hook, a
   pause where the brief says), asserting the invariant the failure broke, not the symptom. Force it
   deterministically rather than hoping a search hits it. It must compile against the finding's commit: don't use
   the fix's new API in it.
3. Show it fails before: build the finding's commit plus only the test (`fplus dst image pull FND` if you have no
   checkout of it), push it, and `fplus dst hunt IMG_BEFORE YOUR_TEST`. It must fail on that test's assertion; a build
   error or "no such test" proves nothing. A test that never fails before tells you nothing about the fix: aim it
   closer, never weaken the assertion.
4. Then hunt the same test, byte for byte, on the fix (`fplus dst hunt IMG_AFTER YOUR_TEST`) with at least the budget
   that found it failing before, and run the fix check as above. Tell your person all three: the test failing before
   (k of n runs), passing after (n runs), and the fix check's verdict. Keep the test in the repository.

To send the fix upstream, draft it from the finding's evidence: `fplus dst upstream draft FND -patch fix.diff -ci "340
flaky CI jobs in 30 days"` writes a pull request (an issue without `-patch`) with the failure line, the smallest
failing schedule and the fixcheck's nearby schedules. Fill in the cause and fix in words (`fplus dst upstream edit
FND -edit`), follow the project's own PR conventions, open it yourself, then record it: `fplus dst upstream sent FND
-url URL`. f+ follows it on GitHub until it is merged or closed.

## 8. Tell us what's missing

When f+ DST lacks something you need, or you worked around something, say so with `fplus dst feedback` (free; we
read every one and answer on `fplus dst feedback list`):

    fplus dst feedback -kind missing "hunt needs a per-test timeout; my suite's slowest test hits the budget"
    fplus dst feedback -kind docs -job JOB "api.md doesn't say what exercised.failed_blind means"
    fplus dst feedback -kind bug -finding FND "replay passes but the finding says rare; which is right?"

## 9. More, when you need it

Each is a page beside this one; read it when the task calls for it. Offer the first two once a test runs.

- [hypotheses.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/hypotheses.md): beyond known flaky tests, list where the code could go wrong under timing,
  network, disk and concurrency faults, each rooted in source lines, for a swarm of agents to test
  (`fplus dst hypo`, `fplus dst modules`). The code stays on this machine. Starting the swarm is one command,
  `fplus dst hypo start`: its first agent builds and pushes the image the rest test on.
- [report.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/report.md): a bug report for the project's maintainers, one HTML file: is it real, the root cause
  with `file:line`, and the fix with its DST verification (structure, style and a template).
- [triage.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/triage.md): what a job found and why, reruns, `fplus dst debug` (commands at chosen moments of the
  failing run) and `fplus dst causality` (which moment decides the failure).
- [strategy.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/strategy.md): what to hunt next within the credit: tests, budgets, fault kinds and plans.
- [reproduce.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/reproduce.md) and its `recipes/`: a test that hunts a named anomaly (lost update, write skew,
  stale read) or fault (crash, partition, torn write).
- [recipes/liveness-and-caps.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/liveness-and-caps.md): the five generic checks, liveness, inclusion and stale-head oracles, the two-lane lifecycle workload,
  non-resurrection and replica equivalence, small-cap stress configs (WAL, ring, queue, epoch caps), and 1-line
  planted-bug canary calibration before hunting.
- [recipes/services-multinode.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/services-multinode.md): offline `services.yaml` cookbook covering all keys (`network_cidr`, `volumes`/`mounts`, `entrypoint`/`cmd`, `job`/`init`, `depends_on`/`after`, `restart`, `faults`), zero-Docker `-env` pushing, the `32768 MiB` (`32 GiB`) disk sizing formula, `data:` vs ephemeral roots, `J=0` post-merge power cuts, busybox `primary:` queries, workload self-EIO isolation, `$FPLUS_DST_STOP_FAULTS` heal loops, local fakes for external LLM/SaaS APIs, database-backed apps (Postgres/Redis/ClickHouse), and pruned multi-node Rust/binary clusters.
- [recipes/stack-rust.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/stack-rust.md): Rust storage and consensus guide covering bookworm glibc parity, `cargo zigbuild`, dynamic glibc vs `musl`, `io_uring` vs `syscall`, `Dockerfile.dockerignore`, binary stripping, RocksDB/MDBX teardown, and 2-round crash-reopen oracles.
- [recipes/rollup-nodes.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/recipes/rollup-nodes.md): multi-node rollup recipe covering `<= 2.0 GiB` pruning, `-memory 6144` thread/memory budgets, `-command` trigger injection and `crane append` overlays, slot-aligned Anvil L1 mining, L7 JSON-RPC fault proxies, P2P ENRs, blob sidecars, and the 6 rollup properties.
- [expert.md](https://staging.extrafunctional-staging.fyi/v1/dst/skills/fplus-dst/expert.md): the concepts (consistency models, anomalies, faults) and how f+ DST tests each.
- Code mode (beta): `fplus dst codemode` drives the DST API from code and draws dashboards and job pages, as
  Inspector pages by default.
