fix: DEBUG-230 Crisis availability: fail-closed breaker, dial guards, SMS deeplink#141
Merged
Merged
Conversation
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>
β¦crisis-availability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes DEBUG-230
Three crisis-availability defects from the 2026-06-06 development audit (tranche T3):
CRISIS_DETECTIONcircuit 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.openCrisisUrl()helper (canOpenURL guard + manual-dial Alert fallback +logError(CRISIS)+ onTap-injected analytics for class components) and routed every dial inCrisisErrorBoundaryandCrisisAccessibilitythrough it (previously bareLinking.openURL), plus theCrisisResourcesScreenphone path.sms:741741?body=HOME(correct?delimiter +encodeURIComponent; was malformed&body=).CrisisErrorBoundary's bodylesssms:741741now carries the HOME keyword.Test-first. New/extended specs: non-breakable breaker contract,
openCrisisUrlguard/fallback/onTap, ErrorBoundary dial routing, SMS?body=HOMEregression guard. Full safety/clinical/offline/a11y/unit suites green; typecheck + lint baseline clean. Maestroe2e:safety:crisis-buttonreachability flow green on sim.π€ Generated with Claude Code