Skip to content

safety: make SOS dispatch status honest#113

Draft
NITISH-R-G wants to merge 1 commit into
mainfrom
cursor/emergency-honesty-fixes-5373
Draft

safety: make SOS dispatch status honest#113
NITISH-R-G wants to merge 1 commit into
mainfrom
cursor/emergency-honesty-fixes-5373

Conversation

@NITISH-R-G
Copy link
Copy Markdown
Owner

Description

Tightens RoadSOS emergency-path honesty and removes several false-confidence behaviors found during the critical feature audit.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

What changed

  • Stops treating an Android SMS composer launch as an automated SMS send.
  • Removes the fake “nearby services broadcast succeeded” path and marks it as info-only until a real integration exists.
  • Adds a bounded emergency dialer fallback row when automated SMS is not accepted.
  • Lengthens SOS location timeout so LocationService can reach OS last-known fallback before giving up.
  • Makes Demo Mode short-circuit before real GPS, AI, dispatch, dialer, incident storage, or family channels.
  • Replaces optimistic TTS/notification copy with dispatch-status wording.
  • Adds a localized triage medical disclaimer to the triage card.
  • Rebuilds compressed triage payloads after safety overrides and clamps/drops invalid triage schema values.
  • Hardens the SMS Edge Function with bearer validation and server-side emergency-number routing for India service classes.

How Has This Been Tested?

  • Unit Tests
  • Integration Tests
  • Manual Smoke Test (on physical device)
  • Static/local checks available in this cloud environment

Commands/checks run:

  • python3 JSON parse of all lib/l10n/app_*.arb files
  • git diff --check
  • Source search confirming removed false-success strings/stubs are gone
  • RoadSOS critical-rule reviewer pass (remaining note: orchestrator changes still require human reviewers; full Flutter/Dart test execution unavailable because this cloud image has no flutter, dart, or deno binaries on PATH)

Checklist:

  • My code follows the style guidelines of this project where verifiable in this environment
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings in available static checks
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

RoadSOS critical-rule notes

  • Phase 1: Demo Mode now stays simulated and does not contact real emergency channels.
  • Phase 4: Dispatch rows now avoid optimistic success and report SMS/dialer limitations explicitly.
  • Phase 4 AI: Triage UI includes guidance-only emergency disclaimer; validation clamps invalid severity and drops unsupported services.
  • Phase 5: SMS relay no longer accepts unauthenticated requests, but production should replace shared client bearer with proper Supabase user/JWT auth plus persistent rate limiting before launch.
Open in Web Open in Cursor 

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.

2 participants