Skip to content

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

Merged
millsmillsymills merged 1 commit into
phase1from
fix/108-confirm-flavor-identity-r2
Jun 10, 2026
Merged

fix(firmware): confirm flash on (version, flavor) identity change#117
millsmillsymills merged 1 commit into
phase1from
fix/108-confirm-flavor-identity-r2

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

Supersedes #114 (rebased onto phase1; branch protection requires up-to-date branches and force-push is blocked locally).

_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
millsmillsymills merged commit b2fa86c into phase1 Jun 10, 2026
5 checks passed
@millsmillsymills
millsmillsymills deleted the fix/108-confirm-flavor-identity-r2 branch June 10, 2026 08:28
millsmillsymills added a commit that referenced this pull request Jun 10, 2026
…avor) identity (#120)

The public flipperzero_firmware_install Returns block still described
after_confirmed as a version-only change. #117 moved the gate to a
(version, flavor) identity change against a known baseline; align the
tool docstring with the helper.

Closes #119

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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