Skip to content

#31 Refactor/wipe trigger layering - #33

Merged
cwbooth5 merged 3 commits into
mainfrom
refactor/wipe-trigger-layering
Dec 4, 2026
Merged

cwbooth5 merged 3 commits into
mainfrom
refactor/wipe-trigger-layering

Conversation

@cwbooth5

@cwbooth5 cwbooth5 commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

This fixes #31 so we clear up a layering issue in the view model. It was here from a while back and android does it too.

cwbooth5 and others added 3 commits December 3, 2026 20:52
The app is single-window, so exactly one PIN-verification flow exists at a
time. check.sh now fixes the flow set instead of exposing it as a setting, and
the docs state the assumption and how to see the two-flow failures.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
VerifyPinUseCase now starts the wipe itself when the failed-attempt budget is
spent, whether a wrong PIN spends it or an attempt is refused at the limit, and
returns a new .lockedOut result. The view model only maps results to state and
no longer references SecurityResetUseCase or the limit for control flow.

SecurityResetUseCase gains startReset(), which joins a wipe already in flight so
the stages never run concurrently. The TLA model drops the UI step; the wipe
starts in Start and Auth, and every property still holds.

Fixes #31

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 15 complexity · -2 duplication

Metric Results
Complexity 15
Duplication -2

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown

iOS Test Results

278 tests  +5   271 ✅ +5   1m 43s ⏱️ +56s
 38 suites ±0     7 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit bd4b076. ± Comparison against base commit 9d6f05a.

@cwbooth5
cwbooth5 merged commit 47ab957 into main Dec 4, 2026
6 checks passed
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.

Move the security-wipe trigger out of PINVerificationViewModel

1 participant