Skip to content

store: persist upload-session state to SQLite (write-through) #197

Description

@rubenhensen

Sub-issue of #116 (epic: encryption4all/postguard#247, workstream E). First half: make session state durable without behavior change.

  • store.rs's in-memory session Store becomes write-through to SQLite (reuse the rusqlite setup that already backs UsageDb, separate table or db file): uuid, current + previous cryptifytoken, recovery-token hash, bytes received / expected size, recipient + mail metadata, api-key tenant, created/last-active timestamps.
  • Every state transition (init, chunk accepted, finalize) persists before the HTTP response.
  • Schema created on boot if absent; no client-visible change in this step.
  • Unit tests for the persistence layer (in-repo inline test style, build_rocket seam).

Done when: all existing tests pass and session rows are visible in SQLite after init/chunk operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions