test: disambiguate Ledger warning automation
What changed, and why it matters
This commit fixes a flaky automated test for Ledger hardware wallets. The test script was sometimes clicking the wrong on-screen button because a warning message appears twice on different screens. The fix narrows the click target so it only hits the first warning screen, not a later details screen. It does not change any wallet code that end users rely on for security.
No security action required. Treat as a normal test-maintenance commit. Reviewers may verify that the y coordinate correctly targets the intended warning title in the Speculos emulator layout.
Security signals we found
No production code changed
Only test automation JSON modified
Fixes test flakiness, not a product vulnerability
No cryptographic, parsing, or network changes
Evidence from the diff
The change is in test/data/speculos-automation.json, which drives the Speculos Ledger emulator during automated tests. A single automation rule matches warnings whose text starts with ‘Security risk’ or ‘High fees warning’. Previously that regexp also matched a repeated header on a subsequent details screen, causing an extra queued button press that could select ‘Back to safety’ before ‘Continue anyway’ was confirmed. Adding a fixed y coordinate of 34 restricts the match to the centered title on the first warning screen, disambiguating it from the header on the later screen. This is purely a test-harness timing/selector fix.
Changed components
test/data/speculos-automation.jsonInspect captured patch +1 / −0
### test/data/speculos-automation.json
@@ -3,6 +3,7 @@
"rules": [
{
"regexp": "^(Security risk|High fees warning).*",
+ "y": 34,
"actions": [
[ "button", 2, true ],
[ "button", 2, false ]Why this scored 12/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.