Repository navigation
test: catch reconnects in the jade locked journey - #2158
Conversation
Each leg now checks the app log for "Marked Jade … locked", since a dropped connection also ends in the PIN pad. The funding step waits for the deposit's received row in the activity list, because the Received sheet does not open when the deposit lands in the watcher's first snapshot. Verified: xmllint --noout on the journey; jade-device-locked.xml run end to end on an Android emulator against the interactive Jade emulator
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
[Low impact] The journey changes appear safe to merge. SummaryStrengthens the Jade locked-device journey.
Reviews (1) · Last reviewed commit: "test: assert the jade lock retry in the ..." · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Tightens jade-device-locked.xml: each leg now asserts the Marked Jade '…' locked after it logged out on the device log line, so a reconnect that also lands on the PIN pad no longer passes, and the funding step waits for the deposit's received row instead of a sheet that may not open. Reviewed 968ad8d, light tier.
What I checked, and 3 candidates I ruled out
Read in full: journeys/hardware-wallet/jade-device-locked.xml; JadeRepo.kt around markLockedIfLoggedOut, verifyAddress, signPsbt, getMasterFingerprint; JadeExceptionExt.kt.
Build: not built or run here. Auto reviews of bitkit-android never build the branch, and the diff is journey prose only, which no CI job reads.
CI: build-and-test green; lint and compose-ui pending at review time.
Ruled out
- The marker could come from a non-lock path: the string is logged only in
JadeRepo.markLockedIfLoggedOut(JadeRepo.kt:735), which returns early unlessisJadeDeviceLocked()finds aJadeException.DeviceLockedin the cause chain and a session is connected. The reconnect paths logReconnected known Jade/Warming up known Jadeinstead, so the assertion does separate the two. - Both legs reach the marker:
signPsbt,getMasterFingerprintandverifyAddressall callmarkLockedIfLoggedOutinonFailure, matching the Sign With Jade and Verify on Device legs. - A stale marker from the first leg satisfying the second: the second action asks for the line "again for this tap", so a runner has to tie it to the Verify on Device timestamp, as the PR's log excerpt shows (15:52:40 then 15:54:23).
Merge confidence: 5/5, a journey spec change with no app code, validated by the author's end-to-end run on the Jade emulator.
Reviewer model: Claude Opus 5.5
Reasoning effort: Not exposed (the runtime does not report a reasoning setting for this session)
jvsena42
left a comment
There was a problem hiding this comment.
Code scan at 968ad8d: one LOW inline. No other findings.
Checked and clean:
- "Marked Jade '…' locked after it logged out on the device" is written only at
JadeRepo.kt:735inmarkLockedIfLoggedOut. It returns early unless the error isDeviceLockedwith a connected session, and it is called only from theverifyAddress,signPsbtandgetMasterFingerprintfailure handlers. The reconnect paths (Reconnected known Jade,Warming up known Jade, auto-reconnect) never write it, so the log check does tellHW_LOCKEDapart from a reconnect. - On the sign leg the line comes from
getMasterFingerprintviacomposeFundingTransactionat the Sign With Jade tap, as the body's log excerpt shows. - The funding step's reason holds. The watcher's first event is the baseline (
HwWalletRepo.kt:1231) andbuildReceivedTxsskips anything in it (:1288). Before that first eventgetReceiveAddressfalls back to an account scan, so a deposit funded early can land in the baseline with no sheet. - The blue hardware row (
HardwareActivityIcon), "Show All" (ActivityShowAll, home shows at most 4 rows) and the 1 000 000 format are correct. The minute stamp matches across time zones. - The XML parses and follows
journeys/README.md. The hardware-wallet suite README needs no change. - The iOS copy of this journey lives only on synonymdev/bitkit-ios#1441, which still waits unconditionally for the Received sheet. The port belongs there (100 000 sats, and no log check, since iOS has no such line). A
Twin:line pointing at it would help.
perf: not relevant.
Device gate (partial): 968ad8d — not run yet; the reordered journey needs the interactive Jade emulator. Result to follow.
Reviewer model: Opus 5.5 (claude-opus-5-5) coordinating, primary review and verification
Reasoning effort: Not exposed
pwltr
left a comment
There was a problem hiding this comment.
Reviewed 968ad8d. The per-tap log checks distinguish Jade lock recovery from a reconnect that also reaches the PIN pad.
Low: The funding step in journeys/hardware-wallet/jade-device-locked.xml:32 identifies the deposit by its displayed amount and minute. On shared regtest history, another run's 0.01 BTC Jade receipt in the same minute can satisfy the check before this run's receipt appears. With Hide Balance enabled, both Home and All Activity mask the amount, so the check can time out even when the correct receipt is present. Capture the transaction ID returned by sendtoaddress and compare it with the ID in the activity's Explore view.
Review details
Quick review: Claude Opus 5.5, high reasoning effort
General review: GPT-6.2 Sol, high reasoning effort
Validation: GPT-6.2 Sol, high reasoning effort
Verification: GPT-6.2 Sol, high reasoning effort
Agreed; matching the |
As on Android (synonymdev/bitkit-android#2158), the funding step waits for the deposit's received row, with the Received Bitcoin sheet optional, and each leg checks the app log for the line only the HW_LOCKED path writes, so a dropped connection that also ends in the PIN pad cannot pass for it. Verified: xmllint on the journey; both log lines appear in the J8 run at 2ac5ea0
jvsena42
left a comment
There was a problem hiding this comment.
Approving at 968ad8d with the one LOW open (UTC wording on the log checks). Fix it here or in a follow-up issue, your choice; please reply on the thread with which.
Device gate: 968ad8d (app built from this head with the Jade emulator enabled) — journeys: 1 passed (jade-device-locked.xml, all 13 actions); perf: not relevant; l10n: no UI text changed
- Interactive Jade emulator, local regtest, Gate_Throwaway. Paired at 15:52:32 UTC. Funded 0.01 BTC at 12:53 local, and the blue hardware Received row of 1 000 000 sats is stamped 12:53 PM. The Received sheet did appear this run; I tapped its button as the new step says.
- Sign leg (tap 15:54:41):
Marked Jade 'jade:serial:000000000000' locked after it logged out on the deviceand the expectedgetMasterFingerprint failedat 15:54:41.565, then the PIN pad, then Output 0.0005 BTC. Bitcoin Sent within 4 s, with oneCreated sent onchain activity; the txid is in the mempool. - Verify leg (tap 15:56:11): a second, new
Marked Jade … lockedline andverifyAddress failedat 15:56:11.427, then the PIN pad. The Jade showed the address matchingReceiveHardwareAddress, and the button returned to Verify on Device with no toast. - From pairing to the end of the verify leg the log has exactly two lock lines, and no
Reconnected known Jade,Warming up known JadeorClosed Jade emulatorline.
Skipped — CI does not read journeys/.
Reviewer model: Opus 5.5 (claude-opus-5-5) coordinating, primary review and verification; Sonnet 5.5 (claude-sonnet-5-5) device driver
Reasoning effort: Not exposed
On a fresh chain a 50 000 sat send from a 100 000 sat Jade shows the over 50% of balance warning before Sign With Jade; funding 0.01 BTC avoids it, as on Android (synonymdev/bitkit-android#2158). Verified: xmllint on the journey
Refs:
Description
jade-device-locked.xmlpassing without the locked retry, because a dropped connection also ends in the Jade PIN pad: after the app reconnects it unlocks the device just as the HW_LOCKED path does. Each leg now checks the app log forMarked Jade '…' locked after it logged out on the device, which only the HW_LOCKED path writesDesign
N/A — no UI changes.
Preview
The journey at this PR's head against the interactive Jade emulator, from pairing to the verified address (2x):
run2x.mp4
App log from the run: each leg logs the lock line, then unlocks with the PIN and retries, with no
Reconnected known JadeorWarming up known Jadeanywhere in the run:QA Notes
Journeys
jade-device-locked.xml— each leg logs the lock line before the Jade PIN pad, and the funding step finds the deposit's rowManual Tests
N/A
Automated Checks
xmllint --noouton the journeyModels used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium)Gemini 4 Neon(reasoning:high)