Plan and apply output
reflow plan shows what an apply would do without running a step: which flows run
and which are reused. reflow apply runs that plan and shows each flow as it
goes.
Watch an apply
Section titled “Watch an apply”On a terminal, reflow apply draws the plan’s dependency tree on stderr and redraws
only that block; the started, done and failed lines scroll above it.
apply 45 flows · 4 running · 19 waiting · 21 done · 1 failed · 10:26 · about 11:30 leftgram-seed-state ✔ 0:10├─ ✔ 18 passed slowest stage9-org-settings 3:55├─ ✔ 2 reused login-smoke, sign-up-page├─ ✖ e2e-role failed at step 5/5 Delete the role 1:52│ expected the row "qa-role-7f3a" to be gone; it was still listed after 5 s├─ ● mcp-server-detail 1:21 of ~2:31│ ▮▮▮▯▯ 3/5 Open the tools tab 0:12└─ ◌ 19 waiting: parallelism 4 next stage9-server-tabs, stage9-environments, …- Finished flows fold into one line, and reused flows into another that names them
(
and 3 morewhen they do not all fit). A flow other flows need stays on its own line while any of them is unfinished. - A running flow shows its current step, the step’s elapsed time, the flow’s elapsed
time and, when the flow has passed before, its last passing duration (
of ~2:31). - A waiting flow says what it waits for: a flow it needs, the
--parallelismceiling or device capacity. Each flow is drawn under the first flow it needs. - A failed flow shows the failed step and the first line of its message.
- A skipped flow says why: its own
if:orunless:condition, or a flow it needs that was skipped or failed (skipped: needs seed, which failed). A flow skipped by a condition does not fail the apply. about 11:30 leftpacks each waiting flow’s last passing duration onto the free workers. When a flow that still has to run has never passed, the estimate uses the pace so far and saysat this pace; it is absent until one flow has finished.
The tree needs an interactive terminal at least 24 columns wide. With CI set,
TERM=dumb or a pipe there is no redraw and no cursor control: stderr carries one
line per flow change (done names the flow’s slowest step) and one apply line a
minute. --log-level error keeps only failures in either mode.
plan: 43 to run, 2 to reuse; parallelism 4admitted apply 7c1e42d0-1111-4222-8333-444444444444 parallelism 4Watch live: https://app.reflow.io/acme/executions/apply/7c1e42d0-1111-4222-8333-444444444444started gram-seed-statedone gram-seed-state 0:10 slowest step Create the organization 0:04started catalog-add-crudapply 3/45 done · 0 failed · 4 running · 38 waiting · 1:00 · about 21:30 leftWatch live
Section titled “Watch live”Both modes print admitted apply <request-key> and a Watch live: line at
admission. The line is the apply’s page in the app, or
reflow watch --request <request-key> when the Reflow service has no page for the
apply.
An apply that reuses every flow starts no run. It prints
nothing to run: all N flows were reused from earlier runs (apply <request-key>)
and no Watch live: line. Its page in the app and reflow watch --request <request-key>
list the reused flows. Such an apply has no clock: the tree’s header says nothing ran
in its place.
reflow watch
Section titled “reflow watch”reflow watch attaches to an apply from another terminal and draws the same tree. It
is read-only: it never cancels, never writes a result file and never starts or stops
the device service. Ctrl-C detaches and the apply keeps running. Flows are named by
slug, as apply names them; --titles shows their titles in the Reflow service.
reflow watch # the one apply in flight on this devicereflow watch --request <request-key> # a named applyreflow watch --result-file /tmp/apply.json # the file given to apply --result-filereflow watch --suite <output-dir> # a reflow coverage suite runWhen it attaches, watch says how long ago the apply started, or, while no flow has
started, how long ago it was requested. In a pipe it prints a reused line for each
reused flow, and its closing report names them (Reused: login-smoke, sign-up-page),
as apply’s report does.
With --result-file, watch exits with the apply’s own exit status and prints its
report. Otherwise it exits 0 only when every flow passed, was reused, or was skipped
by its own if:/unless: or that of a flow it needs. --suite shows the suite
label, repeat, shard and apply number above the tree of the current apply.
Why a flow runs again
Section titled “Why a flow runs again”A flow is reused when its target state, inputs, dependencies and retained evidence all match an earlier run. The plan gives the reason when they do not:
- The flow, covered source, bindings, supplied inputs or configuration changed.
reflow init --upgradechanged the pins of a plugin the flow uses. The plan names the changed pins when the earlier run kept its plugin lock.- The flow has a Browser step and one of its steps must run. Every step then runs
again from the first, with the reason
Reconstruct stateful session, unless its failed run is held (reflow apply --hold). - A step failed (
Previous execution failed). That includes a step that reached a time limit: its statement’s, step’s or flow’stimeout, the 31 minutes of a flow withouttimeout:, or the 30 minutes one provider call may take. Its failure names the limit, and it runs again withoutreflow taint.
A step’s completion is unknown when an answer was lost: a provider or its
connection dropped, the worker stopped without reporting, or the run was
cancelled during a call. It is also unknown when a command that can change
something answered with an error, as a PostgreSQL db.execute does when the
server refuses a statement. The plan blocks that step until you taint it, and a
changed input is not permission to retry it. Inspect that outcome before you
taint it.
When a run is slow
Section titled “When a run is slow”The apply report ends with a “Where the time went” block: the phases outside the flows, then the slowest flows and steps this apply ran itself.
Where the time went (wall clock 23:24) startup 3.8s tag selection 3.4s plan 3.9s device service 3.8s prepare passes 3.7s source fetch ×11 0.9s admission 11.4s prepare passes ×2 6.1s admission request 4.2s reused-run reads ×11 0.9s flows 23:00 cleanup 2.6s comparing snapshots 6.0sSlowest flows stage9-observe 6:08 slowest step Open the traces tab 2:10Lines under a phase overlap, so use them to rank where the time went; do not add
them up. An other line is wall clock that no phase measured.
For a slow plan, run it with --log-level debug. Stderr then carries a
plan_timings line with the time each part of planning took; stdout is unchanged.
For local MCP, set REFLOW_LOG_LEVEL=debug in the Reflow process environment.
reflow plan smoke checkout --log-level debugThe first command after an upgrade or a device service start is slower than later ones. Compare warm runs with the same flows, target and plugin lock. Never repeat an apply only to collect timings.
Traces
Section titled “Traces”Tracing is off by default. Turn it on for one command with an environment variable:
| Variable | Effect |
|---|---|
REFLOW_TRACE_FILE=/path/trace.jsonl | Append one span per line (OTLP/JSON span shape) |
OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT | Post spans to an OTLP/HTTP collector when the command ends |
OTEL_EXPORTER_OTLP_HEADERS | Collector headers, for example authorization |
REFLOW_DEBUG=perf | Print a span tree and the largest self-time contributors to stderr |
One trace covers the CLI, the device service and the workers it starts. Spans name phases, flows, steps, plugin calls and Reflow API requests. They never record tokens, request or response bodies, query values or error text. Review a trace file like any other log before you share it.