Skip to content

fix: DEBUG-230 Crisis availability: fail-closed breaker, dial guards, SMS deeplink#141

Merged
MP2EZ merged 2 commits into
developmentfrom
fix/DEBUG-230-crisis-availability
Jun 6, 2026
Merged

fix: DEBUG-230 Crisis availability: fail-closed breaker, dial guards, SMS deeplink#141
MP2EZ merged 2 commits into
developmentfrom
fix/DEBUG-230-crisis-availability

Conversation

@MP2EZ
Copy link
Copy Markdown
Owner

@MP2EZ MP2EZ commented Jun 6, 2026

Closes DEBUG-230

Three crisis-availability defects from the 2026-06-06 development audit (tranche T3):

  • SEC-07 β€” CRISIS_DETECTION circuit breaker is now non-breakable: enabled:false (a failed op rethrows the original error) + a new 'escalate' strategy (an already-OPEN breaker audit-logs at critical severity and throws). Removed the {isCrisis:false} fail-open default. Latent today (no live callers; the real detection path is synchronous) β€” defense-in-depth + AC compliance.
  • SEC-W5 β€” Extracted a shared openCrisisUrl() helper (canOpenURL guard + manual-dial Alert fallback + logError(CRISIS) + onTap-injected analytics for class components) and routed every dial in CrisisErrorBoundary and CrisisAccessibility through it (previously bare Linking.openURL), plus the CrisisResourcesScreen phone path.
  • SEC-08 β€” Crisis Text Line SMS deeplink fixed to sms:741741?body=HOME (correct ? delimiter + encodeURIComponent; was malformed &body=). CrisisErrorBoundary's bodyless sms:741741 now carries the HOME keyword.

Test-first. New/extended specs: non-breakable breaker contract, openCrisisUrl guard/fallback/onTap, ErrorBoundary dial routing, SMS ?body=HOME regression guard. Full safety/clinical/offline/a11y/unit suites green; typecheck + lint baseline clean. Maestro e2e:safety:crisis-button reachability flow green on sim.

πŸ€– Generated with Claude Code

MP2EZ and others added 2 commits June 6, 2026 13:41
Three crisis-availability defects from the 2026-06-06 development audit
(tranche T3):

- SEC-07: CRISIS_DETECTION circuit breaker no longer fails open to a
  {isCrisis:false} false negative. It is now non-breakable (enabled:false
  rethrows the original error; an already-OPEN breaker uses a new
  'escalate' strategy that audit-logs at critical severity and throws).
  Latent today (no live callers) β€” defense-in-depth + AC compliance.
- SEC-W5: extracted a shared openCrisisUrl() helper (canOpenURL guard +
  manual-dial Alert fallback + logError(CRISIS), onTap-injected analytics
  for class components) and routed every dial in CrisisErrorBoundary and
  CrisisAccessibility through it (previously bare Linking.openURL).
- SEC-08: Crisis Text Line SMS deeplink fixed to sms:741741?body=HOME
  (correct ? delimiter + encodeURIComponent; was malformed &body=).
  CrisisErrorBoundary's bodyless sms:741741 now carries the HOME keyword.

Tests: non-breakable breaker contract (rejects, never false-negative),
openCrisisUrl guard/fallback/onTap, ErrorBoundary dial routing, and the
SMS ?body=HOME regression guard. Full safety/clinical/offline/a11y suites
green; typecheck + lint baseline clean.

πŸ€– Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@MP2EZ MP2EZ merged commit af951f8 into development Jun 6, 2026
31 of 33 checks passed
@MP2EZ MP2EZ deleted the fix/DEBUG-230-crisis-availability branch June 6, 2026 21:03
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