Skip to content

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.

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:

Terminal window
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.json

Reflow 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.

FieldMeaning
timeoutMsShared deadline across all probes (1–60000 ms, default 10000).
probes1–8 probes checked concurrently in config order; all must pass.
probes[].urlTarget-relative path (e.g. /healthz) or absolute HTTP(S) URL.
probes[].statusAccepted status codes (default [200]), or "any" to accept any HTTP response (useful for redirect health routes).
probes[].headers.absentResponse headers that must not be present (case-insensitive).
probes[].headers.presentResponse headers that must be present.
probes[].headers.equalsMap 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.

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.

  • reflow plan never sends readiness probes.
  • An apply where all steps reuse retained evidence sends none.
  • Reconciling an existing request ID sends none.
  • An apply with steps to execute runs all probes concurrently before admitting work.

Readiness checks never create run or step records.

OutcomeExit codeapply --json fields
Target ready (or all steps reused)0Normal admission and execution result
Target not ready75admission: "none", error.code: "target_not_ready", per-probe origin, status, and reason
Test failure or command error1Standard failure report

All probes share the timeoutMs deadline so one broken service never masks another. Probe failure reasons:

ReasonMeaning
status_mismatchHTTP 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.
unavailableNo usable HTTP response (connection refused, DNS, or TLS error).
timed_outShared timeoutMs budget expired.
cancelledRequest 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.

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.