Skip to content

Reference

cdp_repair_action

Repair a learned action using a fresh snapshot from the exact authority-bound device and capability-bound native runner.

NameTypeRequiredDefaultConstraintsDescription
actionIdstringYesOwned action id; resolves one .yaml or .yml file.
failedSelectorstringYesThe testID that the prior maestro_run reported as missing. Parse it from stderr like “Element with id ‘X’ not found” → X.
projectRootstringNoOverride project root (default: process.cwd()).
thresholdnumberNomin: 0, max: 1Fuzzy-match similarity threshold (0..1). Default 0.6. Lower if the screen has many similar testIDs and Levenshtein on the original is too strict.
dryRunbooleanNoDon’t write changes — return the diff that WOULD be applied. Useful for previewing repairs before committing.
agentReasoningstringNoFree-form one-liner the agent records in the RepairRecord. Helps audit “why did this repair happen”. Max ~200 chars recommended.
platformenum: ios | androidNoAuthority-bound platform; conflicting values are refused
deviceIdstringNoAuthority-bound exact device identifier; normally injected by the session
appIdstringNoAuthority-bound app identifier; normally injected by the session
cdp_repair_action(actionId: <string>, failedSelector: <string>)