PVA Local Prototype Safety and Privacy Test Plan
internal prototype · canonical JSON + Dreamborn Forge HTML
internal generated
local-prototype-safety-privacy-test-plan · supabase_json

PVA Local Prototype Safety and Privacy Test Plan

local-prototype-safety-privacy-test-plan artifact · for Patient Visit Advocate · phase PVA-SLICE-01 · status approved

Planning Surface

Use this to decide what happens next.

Status

approved

Phase

PVA-SLICE-01

Agent Handoff
Start Here

local-prototype-safety-privacy-test-plan artifact · for Patient Visit Advocate · phase PVA-SLICE-01 · status approved

Completion Evidence

No explicit evidence field yet. Require tests, screenshots, linked PRs, or reviewed outputs before marking complete.

Artifact Shape
  • date: 2026-05-08
  • phase: id: string, label: string
  • title: PVA Local Prototype Safety and Privacy Test Plan
  • status: draft
  • version: 1.0
  • authored by: luna
  • open blockers: 5 items
  • privacy tests: PRV-001: object, PRV-002: object, PRV-003: object, PRV-004: object, PRV-005: object, PRV-006: object, PRV-007: object, PRV-008: object, PRV-009: object, PRV-010: object, PRV-011: object, PRV-012: object
  • release gates: gate_2_beta: object, gate_1_alpha: object, gate_3_launch: object
  • scope summary: Executable test scenarios and release gate criteria for all free-loop screens, synthetic medical-adjacent inputs, privacy boundaries, and AI failure/fallback paths in the PVA local-only pocket prototype. Does NOT assert that tests have been executed or passed.
  • execution notes: disclaimer: string, environment: object, coverage_gaps: object
  • ai failure tests: AIR-001: object, AIR-002: object, AIR-003: object, AIR-004: object, AIR-005: object, AIR-006: object, AIR-007: object, AIR-008: object, AIR-009: object, AIR-010: object
Structured Payload

Machine-readable source fields

date

2026-05-08

phase
id

PVA-SLICE-01

label

PVA-SLICE-01

title

PVA Local Prototype Safety and Privacy Test Plan

status

draft

version

1.0

authored by

luna

open blockers
idownerimpactblocker
BLK-001Architecture / JustinAIR-004 and PRV-002 cannot be fully specified for executionAI API endpoint and auth model not specified in source artifacts
BLK-002ArchitectureTest device selection and OS-specific privacy tests blockedMinimum supported iOS/Android version not defined
BLK-003DeveloperPRV-008 test definition may need revision post-implementationPrivacy-mode screen blanking implementation not confirmed in prototype spec
BLK-004ProductPRV-006 test cannot be executed until provider is knownAnalytics provider not selected
BLK-005Architecture / DeveloperPRV-003 and PRV-004 execution method depends on storage implementation choiceLocal storage implementation (SQLite vs AsyncStorage vs SecureStore) not confirmed
privacy tests
PRV-001
category

Network

expected

No PHI (conditions, notes, medications) in any request except scoped AI call

scenario

Capture all network traffic during session

severity

CRITICAL

PRV-002
category

Network

expected

Only session context fields; no persistent device ID; no user token that links to identity

scenario

Capture AI API request payload

severity

CRITICAL

PRV-003
category

Storage

expected

Data exists only in documented local store paths; no shadow copies

scenario

Inspect device local storage after session

severity

CRITICAL

PRV-004
category

Storage

expected

All session data removed from local store; keys deleted not merely blanked

scenario

Inspect device storage after session clear

severity

CRITICAL

PRV-005
category

Logs

expected

No PHI in any log output, error messages, or analytics payloads

scenario

Capture crash logs and console output during full session

severity

CRITICAL

PRV-006
category

Analytics

expected

No medical content in event properties; limited to UX signals only

scenario

Inspect analytics events emitted during session

severity

HIGH

PRV-007
category

Clipboard

expected

No PHI auto-copied to system clipboard

scenario

Enter medical data that may autofill clipboard

severity

HIGH

PRV-008
category

Screenshots

expected

App screenshot blurred or replaced in recent apps view

scenario

Background app during active session

severity

HIGH

PRV-009
category

Backup

expected

Medical data paths excluded from backup manifest

scenario

Device cloud backup enabled during test

severity

HIGH

PRV-010
category

Export

expected

Share payload is rendered text/PDF summary only; no raw data structure

scenario

Platform share sheet exercise

severity

MEDIUM

PRV-011
category

Permissions

expected

App requests only minimum permissions; no contacts, location, or microphone without explicit documented feature

scenario

Permission audit on install and runtime

severity

MEDIUM

PRV-012
category

Reinstall

expected

Previous session data inaccessible; confirms no external persistence in free tier

scenario

Uninstall and reinstall app

severity

HIGH

release gates
gate 2 beta
label

Beta — Limited External Testing

purpose

Validate privacy and AI fallback under real network conditions with external testers.

hard stops
  • PRV-006
  • PRV-007
  • PRV-008
  • PRV-009
  • PRV-011
  • AIR-002
  • AIR-003
  • AIR-004
  • AIR-006
  • SCR-060
  • SCR-061
  • SCR-062
  • SCR-072
  • SCR-081
  • SYN-011
  • SYN-012
  • SYN-013
  • SYN-014
prerequisite

All Alpha gate hard_stops passed.

pass condition

All Alpha + Beta hard_stops pass; no CRITICAL failures; no unresolved HIGH failures blocking user flow.

deferrable to launch
  • SCR-011
  • SCR-043
gate 1 alpha
label

Alpha — Internal Testing

purpose

Verify core free-loop flows work end-to-end on a single device without data leakage.

hard stops
  • SCR-001
  • SCR-002
  • SCR-003
  • SCR-004
  • SCR-010
  • SCR-020
  • SCR-021
  • SCR-024
  • SCR-030
  • SCR-031
  • SCR-032
  • SCR-033
  • PRV-001
  • PRV-002
  • PRV-003
  • PRV-004
  • PRV-005
  • AIR-001
  • AIR-007
  • AIR-008
  • SYN-008
  • SYN-009
  • SYN-010
  • SYN-014
  • SCR-071
  • SCR-073
  • SCR-080
pass condition

All hard_stops must pass with no CRITICAL severity failures before Alpha build is shared internally.

deferrable to beta
  • SCR-041
  • SCR-042
  • PRV-006
  • PRV-008
  • PRV-009
  • SYN-011
  • SYN-012
  • SYN-013
gate 3 launch
label

Launch — Public Release

purpose

All test scenarios must pass. Zero CRITICAL failures permitted.

hard stops
  • ALL
prerequisite

All Alpha + Beta gate hard_stops passed.

pass condition

Every test in screen_state_tests, privacy_tests, ai_failure_tests, and synthetic_inputs passes with no CRITICAL severity failure and no unresolved HIGH severity failure. Zero unhandled exceptions in test runs.

evidence required
  • Test run report with pass/fail for every test ID
  • Network capture artifacts for PRV-001 through PRV-005
  • Local storage dump pre/post clear for PRV-003/PRV-004
  • AI API audit log for SCR-033/PRV-002
scope summary

Executable test scenarios and release gate criteria for all free-loop screens, synthetic medical-adjacent inputs, privacy boundaries, and AI failure/fallback paths in the PVA local-only pocket prototype. Does NOT assert that tests have been executed or passed.

execution notes
disclaimer

These are defined test scenarios. Tests have NOT been executed. Pass/fail status is not asserted here.

environment
ai api

AIR series must be run with real API credentials, not mocked responses

devices

Physical iOS and Android devices required for PRV-008, PRV-009 — emulators not acceptable for these tests

test data

Synthetic inputs only — no real patient data to be used

network capture

Charles Proxy or mitmproxy required for PRV-001 through PRV-005

coverage gaps
  • Screen reader / accessibility testing not covered in this plan
  • Concurrent session handling not tested (single-session prototype scope)
  • OS version matrix not yet defined — test device selection blocked pending BLK-002
  • Localization not tested — English-only prototype scope
ai failure tests
AIR-001
expected

Fallback to manual question entry shown immediately; no crash; no blank screen

scenario

AI API unavailable

severity

CRITICAL

condition

No network connectivity

AIR-002
expected

Spinner replaced with timeout message; manual fallback offered

scenario

AI API timeout

severity

HIGH

condition

API response delayed >10 seconds

AIR-003
expected

User-friendly error message; manual fallback offered; no stack trace exposed to user

scenario

AI API 5xx error

severity

HIGH

condition

Server-side error

AIR-004
expected

Error message does not expose API keys, auth tokens, or internal stack trace

scenario

AI API 4xx error

severity

CRITICAL

condition

Rate limit or auth error

AIR-005
expected

No suggestions UI message shown; manual entry mode offered

scenario

AI returns empty response

severity

HIGH

condition

Empty suggestions array in response

AIR-006
expected

Content filtered or flagged before display; not shown as-is

scenario

AI returns off-topic content

severity

HIGH

condition

Non-question content in response

AIR-007
expected

Blocked or filtered — AI contract explicitly forbids diagnostic claims

scenario

AI returns diagnostic-sounding content

severity

CRITICAL

condition

Response includes condition diagnosis

AIR-008
expected

No AI call made; disclaimer shown first; call blocked until acknowledged

scenario

AI disclaimer not yet acknowledged

severity

CRITICAL

condition

User attempts AI generation before accepting disclaimer

AIR-009
expected

Each retry allowed; fresh call; no stale cached error shown as current result

scenario

Multiple AI retries after failure

severity

HIGH

condition

User retries AI generation after prior failure

AIR-010
expected

Offline detection triggers manual mode for remaining flow; no broken UI state

scenario

Network lost mid-session after AI use

severity

HIGH

condition

Airplane mode toggled mid-session

source artifacts
idtype
9783e2c4-7623-4324-8aaa-86ee7dd77733architecture/MVP-01
78ca477c-cd9c-4ba8-84ed-db0944e88702trust-boundary-charter/PVA-SLICE-00
1d0623fa-7b89-46d2-ab35-4b5223f17507patient-data-ai-contract/PVA-SLICE-02
ae4aafaa-7ac7-4054-9b0a-fa443a7c8d94local-pocket-prototype-spec/PVA-SLICE-01
c7bdfa1d-890a-4c5e-b88a-e3cffca55505safety-privacy-qa-matrix/PVA-SLICE-01
83da736a-0f52-42f0-bad5-c0e4a61cef06feature-ux-spec/MVP-01
d79c11f2-f033-4037-89d1-dee5697e30dfscreen-map/design-001
0bd533b6-b5d5-4758-bcce-4ff97b72cb33screen-map/design-002
synthetic inputs
idinputfieldsexpectedseverity
SYN-001Type 2 diabetes, uncontrolled- condition - notesAccepted; stored locally; no flagging or filteringHIGH
SYN-002Metformin 500mg BID, Lisinopril 10mg QD- medicationsAccepted; no filtering; stored correctly with clinical abbreviations intactHIGH
SYN-003Patient DOB: 01/01/1970- any text fieldAccepted; stored locally; not transmittedHIGH
SYN-004SSN: 123-45-6789- any text fieldAccepted as text; not transmitted; no validation blocking entryHIGH
SYN-005Blood pressure 145/90 mmHg- notesAccepted; stored; not interpreted as a medical alertMEDIUM
SYN-006Dr. Johnson ordered CBC, BMP, HbA1c- visit context - notesAccepted; stored; clinical abbreviations preservedMEDIUM
SYN-007Allergies: penicillin (anaphylaxis), sulfa drugs- any text fieldAccepted; allergy detail not stripped or sanitizedHIGH
SYN-008Chest pain 8/10, radiating to left arm- any text fieldAccepted as text; NOT interpreted as emergency; no 911 auto-dial or emergency modal triggeredCRITICAL
SYN-009<script>alert('xss')</script>- all text fieldsRendered as plain text; no script execution; no visible escape artifactsCRITICAL
SYN-010'; DROP TABLE visits; --- all text fieldsRendered as plain text; no SQL execution; local store integrity maintainedCRITICAL
SYN-011💊 medication 心臓発作- notesStored and displayed correctly; no encoding crash or data lossMEDIUM
SYN-01210,000 character string- notesGraceful truncation or full storage; no crash; UI indicates truncation if appliedMEDIUM
SYN-013Identical data entered multiple times- questionsDeduplication or acceptance without error; no crashLOW
SYN-014Call 911 immediately- notesDisplayed as entered; not blocked; no auto-action or emergency dial triggeredCRITICAL
free tier boundary
in scope
  • Single-visit prep and documentation
  • AI-assisted question generation (stateless, per-session)
  • In-visit note capture
  • Post-visit summary (current session only)
out of scope
  • Visit history or multi-session memory (paid)
  • Caregiver/family sharing (paid)
  • Cross-session continuity (paid)
  • Cloud sync (paid)
screen state tests
SCR-001
input

none

screen

App Launch

expected

Onboarding shown; zero network calls to PHI endpoint before consent

scenario

Cold launch first run

severity

CRITICAL

SCR-002
input

none

screen

App Launch

expected

Session state loaded from local storage only; no remote fetch

scenario

Cold launch returning session

severity

CRITICAL

SCR-003
input

none

screen

Onboarding

expected

Disclaimer modal renders before any API request is made

scenario

AI disclaimer shown before first AI call

severity

CRITICAL

SCR-004
input

user taps dismiss

screen

Onboarding

expected

Returns to new visit setup; no data written to remote storage

scenario

Dismiss onboarding

severity

HIGH

SCR-005
input

background 60 seconds

screen

App

expected

Session state preserved locally; no auto-sync triggered

scenario

Backgrounded and resumed

severity

HIGH

SCR-010
input

Cardiology follow-up, Dr. Smith, 2026-05-10

screen

New Visit Setup

expected

Visit object stored in device-local store only; no remote write

scenario

Create new visit

severity

CRITICAL

SCR-011
input

2025-01-01

screen

New Visit Setup

expected

Validation warning shown; data accepted; no crash

scenario

Visit date in past

severity

LOW

SCR-012
input

No value captured.

screen

New Visit Setup

expected

Field validation error displayed; no navigation forward

scenario

Empty visit name

severity

MEDIUM

SCR-013
input

256 character string

screen

New Visit Setup

expected

Truncated or error; no crash

scenario

Max-length visit name

severity

MEDIUM

SCR-014
input

Dr. O'Malley & Assoc.

screen

New Visit Setup

expected

Stored and displayed correctly; no injection or encoding error

scenario

Special chars in provider name

severity

HIGH

SCR-020
input

Type 2 diabetes, hypertension

screen

Visit Context

expected

Stored locally; NOT transmitted until explicit AI call action by user

scenario

Enter medical condition

severity

CRITICAL

SCR-021
input

Follow-up on A1C levels

screen

Visit Context

expected

Stored locally; no outbound transmission

scenario

Enter reason for visit

severity

CRITICAL