Skip to content

Add encrypted storage, golden tests, and Whisper STT seam - #1

Closed
Ayushd70 wants to merge 8 commits into
mainfrom
cursor/encrypted-storage-goldens-whisper-db7a
Closed

Ayushd70 wants to merge 8 commits into
mainfrom
cursor/encrypted-storage-goldens-whisper-db7a

Conversation

@Ayushd70

Copy link
Copy Markdown
Owner

Summary

Finishes the remaining backlog items from the previous session (those commits never reached remote):

  • Encrypted-at-rest: AES-256-GCM FieldCipher with DEK in FlutterSecureStorage; encrypts chat/document/prompt string fields with dual-read of legacy plaintext and a one-shot migration.
  • HF token: moved out of SharedPreferences into secure storage (with legacy migration).
  • Golden tests: deterministic MessageBubble user/assistant goldens under test/goldens/.
  • Whisper STT seam: SttBackend setting + WhisperSpeechRecognizer stub (reports unavailable until a model is wired).

Test plan

  • flutter test (88 tests) including cipher, settings, goldens, and Whisper stub
  • flutter analyze clean (aside from resolved imports)
  • Smoke: fresh install migrates/encrypts existing chats without data loss
  • Smoke: Settings → Speech-to-text → Whisper shows unavailable mic path gracefully
Open in Web Open in Cursor 

Introduce FieldCipher with FlutterSecureStorage-backed key material for at-rest encryption.
Encrypt legacy ObjectBox string fields on first launch and record the at-rest schema version.
Wire FieldCipher through ObjectBox repositories and open the DEK during app startup.
Migrate legacy SharedPreferences tokens and keep Settings tests on an in-memory key store.
Pin viewport size and a seed Material theme so pixel diffs stay stable in CI.
Expose SttBackend in Settings and route speechRecognizerProvider to a Whisper placeholder that reports unavailable until a model lands.
Note at-rest encryption in Settings About and keep Whisper listed as a partial seam.
@Ayushd70 Ayushd70 closed this Aug 10, 2026
@Ayushd70
Ayushd70 deleted the cursor/encrypted-storage-goldens-whisper-db7a branch August 10, 2026 10:54
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