Skip to content

Add secure chat document intake and recovery#1945

Draft
mimeding wants to merge 5 commits into
osaurus-ai:mainfrom
mimeding:feature/chat-attachment-recovery
Draft

Add secure chat document intake and recovery#1945
mimeding wants to merge 5 commits into
osaurus-ai:mainfrom
mimeding:feature/chat-attachment-recovery

Conversation

@mimeding

@mimeding mimeding commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • adds a guided chat document intake flow with preview, progress, attach, cancel, and explicit unsupported-format states
  • preserves structured document provenance across chat persistence and encrypted image/document spillover
  • verifies attachment integrity before model input, historical replay, and ZIP export
  • exports extracted document text with truthful filenames and supports safe document conversion without overwriting unless the user explicitly allows it
  • restores clipboard retry behavior after intake failures or cancellation

Security and reliability

  • captures selected files once with no-follow bounded descriptor reads, then hashes and parses the same private immutable copy
  • rejects symlinks, special files, oversized inputs, source races, provenance mismatches, and tampered persisted blobs
  • uses private temporary permissions, atomic publication, bounded reads, path-free diagnostics, and cancellation generation fences
  • blocks send explicitly when a provenance-bearing attachment cannot be verified
  • preserves memory and screen context when corrupt media fails to hydrate

Validation

  • 83 focused document, chat, export, spillover, and security tests passed
  • 37 final spill/reload and tamper-regression tests passed
  • unsigned Release CLI and app builds passed
  • SwiftLint, localization validation, and git diff --check passed
  • final security ship-gate review found no remaining blocker

Review state

This PR is draft while the refreshed GitHub checks run and the native UI walkthrough is completed. It will only be marked ready when checks are green and the merge state is clean.

Known limits

  • scanned PDFs use the image-page fallback when structured extraction is unavailable
  • unsupported emitters are reported explicitly rather than silently producing a different format

@mimeding mimeding marked this pull request as ready for review July 9, 2026 00:37
@RaajeevChandran

Copy link
Copy Markdown
Contributor
  • describe() has cosmetic redundancy — it computes name but the default (video) branch re-reads att.redactedFilename ?? "attachment" instead of using name
  • exportFilename forces documentRefs to .txt (since the recovered blob is extracted text, so budget.xlsx → budget.txt). Intentional and tested, just worth being aware the exported extension won't match the original document type

@mimeding mimeding force-pushed the feature/chat-attachment-recovery branch from 62d7277 to 4c7adb9 Compare July 11, 2026 19:23
@mimeding mimeding marked this pull request as draft July 11, 2026 19:35
@mimeding mimeding marked this pull request as ready for review July 11, 2026 19:45
@mimeding mimeding marked this pull request as draft July 12, 2026 05:53
@mimeding mimeding changed the title Recover chat attachments safely Add secure chat document intake and recovery Jul 12, 2026
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