Summary
During testmd run replay, Kane CLI auto-heals locator/extraction failures silently and without any configuration to disable it. Two concrete problems result:
- Observed: after a semantically-neutral DOM change, the analyzer's extraction precision silently degraded from a single element to a large page blob — and the assertion still passed.
- Scenario: when multiple elements share a label (e.g. a "Sign In" link in the header nav and a "Sign In" button in the page body), healing can retarget an action to the wrong element — a silent false positive.
Auto-heal in replay should be configurable (opt-out), and healing events should be visible in run output so CI can gate on them.
Environment
- kane-cli: 0.6.4 (npm
@testmuai/kane-cli)
- macOS (arm64), Chrome target, headless
Finding 1 — observed: extraction precision degrades under healing, run still reports "passed"
Repro
- Author a test asserting a page heading, e.g. dashboard shows
Welcome back! inside an <h1>. The authored TEXTUAL_ANALYZER step freezes a role-based locator (role=heading[name="Welcome back!"i]) plus the NL query.
- Change the markup from
<h1>Welcome back!</h1> to a <div> styled identically (visually pixel-same page).
kane-cli testmd run <test>.md --headless --agent
Actual
Run reports overall_status: passed (replay_decisions: 1, no author decisions). However the extracted memory variable changed character completely — at authoring it captured just the heading text; after the tag change it captured a large blob of the page's main content:
dashboard_welcome_message = "Welcome back!\n\nYou are logged in as demo@acme.shop.\n\n3\n\nOrders\n\n$1,040\n\nTotal Spent\n\n120\n\nReward Points\n\nRecent Orders\n..."
The assertion passed only because "shows 'Welcome back!'" is satisfied as a contains-style match against the blob.
Evidence: session 80937943-b78b-4d0d-851c-35df5f36569b (run_end, variables_out).
Why this is a problem
- The healed extraction is materially fuzzier than the authored one, with no signal in the output that precision changed.
- False-pass risk: if the target text moves to a different component, or the same string exists elsewhere on the page (footer, nav), the assertion can still pass while the actual component under test is broken.
Finding 2 — scenario: wrong-target healing with duplicate labels
Pages commonly have duplicate action labels: e.g. "Sign In" in the header nav and another "Sign In" button in the hero/body. If the body button is removed in a new build, replay healing can retarget the click to the header nav link — the test passes while the component it was written against is gone. This is a silent false positive on exactly the class of regression tests exist to catch.
Expected behavior
- Configurable healing in replay — e.g. a frontmatter flag (
heal: false), a CLI flag (--no-heal), and/or per-step strict mode. Default could stay heal-on, but CI pipelines need a strict mode.
- Healing visibility — when healing triggers, the run should say so: a distinct step/run status (e.g.
passed_healed), an event in --agent NDJSON output, and a count in test_md_summary (alongside replay_decisions). CI must be able to fail or alert on "passed but healed".
- Extraction drift detection — when an analyzer's healed extraction differs substantially in scope from the authored one (single element → container blob), flag it as a warning at minimum.
Actual behavior
Healing is silent, always on, and indistinguishable from a clean pass in both the console summary and the NDJSON stream.
Summary
During
testmd runreplay, Kane CLI auto-heals locator/extraction failures silently and without any configuration to disable it. Two concrete problems result:Auto-heal in replay should be configurable (opt-out), and healing events should be visible in run output so CI can gate on them.
Environment
@testmuai/kane-cli)Finding 1 — observed: extraction precision degrades under healing, run still reports "passed"
Repro
Welcome back!inside an<h1>. The authoredTEXTUAL_ANALYZERstep freezes a role-based locator (role=heading[name="Welcome back!"i]) plus the NL query.<h1>Welcome back!</h1>to a<div>styled identically (visually pixel-same page).kane-cli testmd run <test>.md --headless --agentActual
Run reports
overall_status: passed(replay_decisions: 1, no author decisions). However the extracted memory variable changed character completely — at authoring it captured just the heading text; after the tag change it captured a large blob of the page's main content:The assertion passed only because "shows 'Welcome back!'" is satisfied as a contains-style match against the blob.
Evidence: session
80937943-b78b-4d0d-851c-35df5f36569b(run_end, variables_out).Why this is a problem
Finding 2 — scenario: wrong-target healing with duplicate labels
Pages commonly have duplicate action labels: e.g. "Sign In" in the header nav and another "Sign In" button in the hero/body. If the body button is removed in a new build, replay healing can retarget the click to the header nav link — the test passes while the component it was written against is gone. This is a silent false positive on exactly the class of regression tests exist to catch.
Expected behavior
heal: false), a CLI flag (--no-heal), and/or per-step strict mode. Default could stay heal-on, but CI pipelines need a strict mode.passed_healed), an event in--agentNDJSON output, and a count intest_md_summary(alongsidereplay_decisions). CI must be able to fail or alert on "passed but healed".Actual behavior
Healing is silent, always on, and indistinguishable from a clean pass in both the console summary and the NDJSON stream.