Skip to content

fix(firmware): confirm flash on (version, flavor) identity change - #114

Closed
millsmillsymills wants to merge 1 commit into
phase1from
fix/108-confirm-flavor-identity
Closed

fix(firmware): confirm flash on (version, flavor) identity change#114
millsmillsymills wants to merge 1 commit into
phase1from
fix/108-confirm-flavor-identity

Conversation

@millsmillsymills

Copy link
Copy Markdown
Contributor

Follow-up from review of #104.

_reconnect_and_classify gated after_confirmed on last.version != before.version, so two genuine firmware changes reported as unconfirmed best-effort:

  • a same-version fork swap (e.g. Official → Momentum at a matching version)
  • a same-version recovery/repair reflash

Gate on the (version, flavor) identity instead, and require before.version is not None so the gate strictly means "observed a changed identity against a known baseline". A same-version, same-flavor reflash leaves no observable identity change in device_info, so it honestly stays best-effort.

Tests

  • test_reconnect_confirms_on_same_version_fork_swap — fork swap at one version confirms.
  • test_reconnect_best_effort_on_same_version_same_flavor — no signal → best-effort.
  • test_firmware_install_propagates_after_confirmed (parametrized) — tool-level wire contract: flipperzero_firmware_install propagates after_confirmed into the result dict.

13 passed; ty + ruff clean.

Closes #108

🤖 Generated with Claude Code

_reconnect_and_classify gated after_confirmed on version alone, so a
same-version fork swap (Official <-> Momentum at a matching version) and
a same-version recovery reflash reported as unconfirmed best-effort.
Gate on the (version, flavor) identity and require a known baseline
version, so a fork swap confirms; a same-version same-flavor reflash has
no observable signal and stays best-effort.

Closes #108

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@millsmillsymills

Copy link
Copy Markdown
Contributor Author

Superseded by the rebased copy (same commit, rebased onto current phase1); see newer PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

firmware_install: confirm cross-flavor / same-version flashes

1 participant