Target readiness
Preview environments, sleeping stacks, and local services can answer with a placeholder or paused page (sometimes even returning HTTP 200). Without preflight checks, Browser flows fail on missing content that looks like a product regression.
Configure opt-in HTTP health probes for your target. Before admitting new work, Reflow sends one concurrent GET to each probe and exits with code 75 (target_not_ready) if any probe fails—before any test run or browser launches.
Configure probes
Section titled “Configure probes”Write a regular JSON file (not a symlink) listing up to 8 probes:
{ "timeoutMs": 10000, "probes": [ { "url": "/login", "status": [200], "headers": { "absent": ["x-app-paused"] } }, { "url": "https://localhost:8080/healthz", "status": [200] }, { "url": "http://localhost:35291/health", "status": "any" } ]}Pass it with --readiness when selecting your target:
reflow target https://localhost:5173/ --group my-app --collection <collection-id> \ --allow-origin https://localhost:8080 --allow-origin http://localhost:35291 \ --readiness /absolute/path/to/readiness.jsonReflow copies the probe configuration when target runs—re-run target --readiness after editing the file. Omitting --readiness for the same connection, checkout, collection, URL, group, and scope preserves existing probes; --clear-readiness removes them.
In local MCP, pass "readiness" inline to manage_execution (action: "target"):
{ "action": "target", "url": "https://localhost:5173/", "group": "my-app", "readiness": { "timeoutMs": 10000, "probes": [{ "url": "/healthz", "status": [200] }] }}Omit "readiness" to keep current probes, or pass "readiness": null to clear them. Because target starts a new evidence epoch whenever called (even if only readiness changed), configure readiness on initial target selection before repeating plan and apply.
Probe rules
Section titled “Probe rules”| Field | Meaning |
|---|---|
timeoutMs | Shared deadline across all probes (1–60000 ms, default 10000). |
probes | 1–8 probes checked concurrently in config order; all must pass. |
probes[].url | Target-relative path (e.g. /healthz) or absolute HTTP(S) URL. |
probes[].status | Accepted status codes (default [200]), or "any" to accept any HTTP response (useful for redirect health routes). |
probes[].headers.absent | Response headers that must not be present (case-insensitive). |
probes[].headers.present | Response headers that must be present. |
probes[].headers.equals | Map of name: value headers that must each appear exactly once with that exact value. |
A header cannot be both required and forbidden. Absolute probe URLs must match the target origin or an origin already granted via --allow-origin (readiness never adds an origin grant). Credentials in URLs, wildcards, and non-HTTP schemes are refused.
What a probe does
Section titled “What a probe does”Each probe is a single plain HTTP GET:
- Does not follow redirects (judges the redirect’s own status and headers).
- Sends no cookies, binding/team headers, or credentials.
- Does not retry or poll, and never tries to wake a paused service.
- Uses normal system TLS verification (no skip-TLS option).
- Records only origin, status, readiness, and short reason—never response bodies, paths, or query strings.
Point probes at safe, side-effect-free health routes (/healthz, /health, lightweight login page) rather than endpoints that create sessions, send email, or mutate data.
When probes run
Section titled “When probes run”reflow plannever sends readiness probes.- An
applywhere all steps reuse retained evidence sends none. - Reconciling an existing request ID sends none.
- An
applywith steps to execute runs all probes concurrently before admitting work.
Readiness checks never create run or step records.
Exit codes and JSON contract
Section titled “Exit codes and JSON contract”| Outcome | Exit code | apply --json fields |
|---|---|---|
| Target ready (or all steps reused) | 0 | Normal admission and execution result |
| Target not ready | 75 | admission: "none", error.code: "target_not_ready", per-probe origin, status, and reason |
| Test failure or command error | 1 | Standard failure report |
All probes share the timeoutMs deadline so one broken service never masks another. Probe failure reasons:
| Reason | Meaning |
|---|---|
status_mismatch | HTTP status is outside probes[].status. |
header_must_be_absent:<name> | Forbidden header was present (e.g. a paused marker). |
header_missing:<name> | Required header was absent. |
header_mismatch:<name> | Header value did not match headers.equals. |
unavailable | No usable HTTP response (connection refused, DNS, or TLS error). |
timed_out | Shared timeoutMs budget expired. |
cancelled | Request was cancelled. |
Because no work was admitted, nothing needs tainting and prior outcomes (including unknown completions) remain intact. Start or resume your service, then re-run plan and apply. Readiness is a point-in-time preflight check; a service that pauses mid-run produces ordinary step failures.
Design boundaries
Section titled “Design boundaries”Readiness probes are intentionally HTTP-only (status codes and headers, zero browser startup cost) so preflight stays fast and deterministic. If a paused environment returns HTTP 200 identically to a live app, expose a lightweight health route or paused response header; for DOM-level gates once a page is live, use RFL if: / unless: or within=.
Readiness applies to CLI and MCP plan/apply targets. See Browser plugin for allowed origins and Getting started for target setup.