Skip to content

fix: readiness-review follow-ups (two high-severity regressions from today) - #399

Merged
BitHighlander merged 2 commits into
developfrom
fix/readiness-review-followups
Aug 5, 2026
Merged

fix: readiness-review follow-ups (two high-severity regressions from today)#399
BitHighlander merged 2 commits into
developfrom
fix/readiness-review-followups

Conversation

@BitHighlander

Copy link
Copy Markdown
Collaborator

An adversarial review of the 1.5.1 candidate found two high-severity regressions in changes landed earlier today, plus four smaller ones. All fixed here.

1. #394 auto-advance could skip the seed backup (HIGH)

The create-wizard advance fired on device state alone — ready while the create spinner is showing — with no evidence that a disconnect ever happened and no check that it is the same device.

Repro: start Create on the OOB device, unplug it, plug in a second already-initialized KeepKey. Detach clears setupInProgress, the new device pairs, PIN unlock → ready → the wizard announces 'Wallet Created!', applies the label to the wrong device, offers verify-seed against the old seed, and finishes with confetti. No wallet was created, and the user never saw the backup screen — the 'WRITE DOWN EVERY WORD' panel exists only on init-progress, and verify-seed is skippable twice.

Fix: the advance now requires (a) a disconnected/connected_unpaired state observed since this create started, and (b) deviceId equal to the one the create began on. The write-down warning is additionally repeated on init-label, so no path through creation ends without it having been said.

2. #396 'Enable on device' understated its blast radius (HIGH)

Enabling the persistent AdvancedMode policy also disables this app's own pre-signature outflow simulation and per-transaction consent for every future opaque swap (swap.ts gates that path on isAdvancedModeEnabled). Offered at the moment of maximum pressure — a swap that just failed — in a flow previously designed as one-shot. The copy now states it plainly.

Its RPC also moves 60s → no timeout: the call blocks on an on-device confirm plus a full scrambled-matrix PIN re-entry, and a timeout could reject while the device still completes the write — leaving the policy ON while the UI says it failed.

3. patch-electrobun.sh failed soft (MEDIUM)

On a pattern miss it printed a warning and exited 0, so an electrobun bump would silently revert the device-failure fix with a green build — symptom: every device error hangs the renderer for the full RPC timeout. Now exit 1 with an explanation.

4-6. Smaller

  • Previous hidden on init-label (its target bounces forward again — a no-op)
  • Dev load-device path resets the same guards as the real create
  • Empty packet.error renders 'RPC request failed' again instead of the literal ""

Verification

tsc differential vs develop: zero new errors. make test-unit: 343 pass.

An adversarial review of the 1.5.1 candidate found two high-severity
regressions in changes landed earlier today.

#394 create-wizard auto-advance could skip the seed backup entirely.
It fired on device state alone: 'ready' while the create spinner shows.
Hot-swapping a second, already-initialized KeepKey mid-create therefore
read as success — the wizard announced 'Wallet Created!', labelled the
WRONG device, and dropped the user past the only screen that says WRITE
DOWN EVERY WORD (init-label had no such reminder, and verify-seed is
skippable twice). Now the advance requires evidence: a disconnect must
have been observed since this create started, AND the ready device must
be the same deviceId the create began on. The write-down warning is also
repeated on init-label, so no path through creation ends without it.

#396's 'Enable on device' understated what it does. Enabling the
persistent AdvancedMode policy also switches off this app's own
pre-signature outflow simulation and per-transaction consent for every
future opaque swap (swap.ts gates that path on isAdvancedModeEnabled).
The copy now says so. Its RPC also moves from a 60s timeout to none:
the operation blocks on an on-device confirm plus a full scrambled-matrix
PIN re-entry, and a timeout could reject while the device still enables
the policy.

Also: patch-electrobun.sh now EXITS 1 when the rpc.ts dispatcher pattern
is missing instead of warning — a silent revert means every device
failure hangs the renderer for the full RPC timeout, with a green build.
Previous is hidden on init-label (its target bounces forward again). The
dev load-device path resets the same guards as the real create. An empty
packet.error renders 'RPC request failed' again instead of the literal
'""'.
The docs site now carries a page per wizard screen, each quoting the
screen's copy verbatim so it is recognisable on arrival. Wire them up:

- shared/docs-links.ts — one table of canonical slugs, the contract with
  the docs repo. No inline URL literals anywhere else.
- DocsLink — one component so every screen links identically (wording,
  styling, new-tab safety attrs, click-through suppression).
- All six tutorial cards carry a helpUrl, rendered beside the step counter.
- Wizard footer shows the article for the current step (init-choose,
  create-briefing, init-progress, init-label, verify-seed). Screens with no
  dedicated page show nothing rather than dumping the user on a hub.
- initChoose 'Learn more' repointed from the unverified
  keepkey.com/blog/why_does_keepkey_only_generate_12_words_ URL to the
  seed-length-and-entropy anchor, which is the same argument on a page we
  control.
@BitHighlander
BitHighlander merged commit bde5e4f into develop Aug 5, 2026
4 checks passed
@BitHighlander
BitHighlander deleted the fix/readiness-review-followups branch August 5, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant