Skip to content

Reliability: Add technical failure fallback for sensor-based challenges - #58

Open
knocker-g wants to merge 1 commit into
SysAdminDoc:mainfrom
knocker-g:upstream-pr/challenge-fallback
Open

knocker-g wants to merge 1 commit into
SysAdminDoc:mainfrom
knocker-g:upstream-pr/challenge-fallback

Conversation

@knocker-g

Copy link
Copy Markdown

Summary

Introduces a fail-safe mechanism for sensor-based dismiss challenges (e.g., shake, squats) when a technical failure or sensor unavailability is detected.

Problem

In rare cases where a device sensor fails or becomes unavailable while an alarm is firing, a user might find themselves stuck in a challenge with no way to dismiss the alarm.

Changes

  • Added a fallback path in AlarmFiringActivity that triggers only upon a detected technical failure (e.g., sensor not found).
  • Ensured this fallback is separate from normal challenge solving; it cannot be used to bypass a challenge that is functioning correctly.
  • Added unit tests for the fallback trigger logic in AlarmFiringViewModelTest.kt. Automated test execution is currently blocked by existing environment issues.

Testing

  • git diff --check: PASS
  • F-Droid debug build: SUCCESS
  • Play debug build: SUCCESS
  • Tests: BLOCKED / NOT EXECUTED
  • Manual verification: Simulated sensor unavailability to confirm the fallback path activates correctly. Verified that normal challenge solving is unaffected.

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