locator-healer·execution·active

Locator Healer

When a locator fails in CI, proposes a replacement based on accessibility tree diff and test history. Cuts maintenance churn by ~35%.

EVANcursorclaude-codetrigger · ci
Locator Healer
When a locator fails in CI, the healer proposes a replacement based on accessibility tree diff and recent DOM history. Cuts maintenance churn by ~35% on suites of 1k+ tests.
When this skill fires
·A CI run fails with a "locator not found" or "strict mode violation" error
·The diff is significant enough to suggest an actual UI change rather than a flake
·An engineer triggers evan heal against a failing test locally
How healing works
Step 1: Confirm it's not a flake
The healer never repairs after a single failure. It requires the same locator to fail in the same way across at least two CI runs (or once locally + once in CI). Flakes get retried, not healed.
Step 2: Snapshot diff
The healer pulls the accessibility tree snapshot from the failed run and compares it against the last passing run. Three outcomes:
·Element disappeared — the locator is broken because the feature was removed. Healer asks the engineer to confirm the test should be deleted.
·Element renamed — the role is the same, but the accessible name changed (e.g. "Sign in" → "Log in"). Healer proposes the rename.
·Element restructured — the role hierarchy changed. Healer rerunsLocator Strategist on the new structure.
Step 3: Propose, don't apply
The healer never silently rewrites locators. It proposes a diff, which the engineer reviews and accepts. Silent healing erodes trust in the suite.
Confidence scoring
Each proposal is annotated with a confidence score:
·High — exact role match, only the accessible name changed
·Medium — role match + minor structural change
·Low — role doesn't match anymore; healer is making a best guess
Low-confidence proposals are flagged red and require explicit /accept to apply.
What it produces
A pull request (or local diff) containing:
·The replacement locator
·A comment explaining what changed in the DOM
·A confidence score
·A link to the failing CI run and the snapshot diff
Why ~35%
On suites we've measured, locator drift accounts for 35–45% of all test maintenance work. The healer doesn't eliminate it, but it converts most maintenance from "investigate and rewrite" into "review and accept" — which is roughly 1/10th the engineer time.