Autoheal
When a scripted RFL step fails and a provider key is available, Reflow can make
one bounded autoheal attempt during the run. Set self_heal: false in the flow
frontmatter to opt out.
A selector rename can turn this failing line:
click role=button name="Continue"into a validated replacement such as:
click role=button name="Next"Only the element target may change. Autoheal cannot change what the action does.
Eligibility comes first
Section titled “Eligibility comes first”Reflow checks eligibility before calling a model. The failure must occur while
resolving a target or before the action, and the verb must be one of:
click, dblclick, tap, fill, type, press, check, uncheck,
select, hover, focus, blur, or scroll.
Assertions and waits, snapshot checkpoints, navigation, exec or bash,
email steps, and Playwright TypeScript bodies are never autohealed. Visual
mismatches are also excluded. An ineligible failure spends no model tokens.
Repair constraints
Section titled “Repair constraints”The diagnosis is one of selector_drift, target_renamed, target_moved,
page_changed, or not_recoverable. Only a replace decision proceeds, and
the replacement must satisfy every guard:
- Exactly one replacement line.
- The same verb, value, conditions, and modifiers as the original.
- No added fallback action.
- Confidence of at least
0.8. - At most two model attempts inside a 25-second total deadline.
- A successful preflight against the live page before execution.
Secrets and input values are redacted from the model context. The proposed line is executed only after it resolves safely on the current page.
What happens to a validated repair
Section titled “What happens to a validated repair”The repaired markdown is content-addressed with SHA-256 as a child version on
the autoheal branch, parented to the version used by the run.
- Repository-backed flow: source tags such as
mainandpr-*do not move. The child version and run artifact remain reviewable; the fix reaches the repository through your PR. - Dashboard-owned flow: the
latesttag moves with compare-and-swap. If a concurrent edit moved it first, Reflow reports a conflict and does not overwrite that edit. - Ad-hoc content run: the repair is stored as a draft run artifact.
Every agent-assisted or autohealed run also emits proposed_content.md, the
complete flow with the generated or repaired lines. The run timeline labels
the step <name> (auto-healed) and records the original line, replacement,
reason, attempt count, and persistence result.