Skip to content

Add compatible encrypted service Usage sync - #16

Draft
appergb wants to merge 2 commits into
mainfrom
task/usage-sync-compat
Draft

appergb wants to merge 2 commits into
mainfrom
task/usage-sync-compat

Conversation

@appergb

@appergb appergb commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Adds a separately probed, authenticated opaque service Usage snapshot with account/epoch binding, independent CAS and exact idempotency. Existing V1 success envelopes and transport bounds are unchanged.
  • Preserves Usage on ordinary legacy writes; protects it from V1-only password change; atomically rotates both snapshots and receipts with an upgraded client; purges both on authorized vault delete. Shares nonce and operation-ID guards across routes.
  • Adds atomic schema-v2 migration, a default write-paused rescue path that preserves accepted data in the current DB, an exact OpenAPI/AAD contract, independent crypto vectors and a staging/rescue runbook.
  • Separate security-baseline commit updates patched bundled SQLite, Quinn and rustix and replaces unmaintained chrono with a UTC RFC3339 adapter. The supported minimum is Rust 1.89; no advisory exemptions or protocol changes in the baseline commit.

Verification and release gates

  • Native cargo fmt --check, cargo clippy --all-targets --locked -- -D warnings, cargo test --locked (26 tests), and cargo audit --deny warnings pass on the final lock. Exact Rust 1.89.0 also passed cargo check --locked --lib --bin openless-cloud-sync.
  • Tests cover the synthetic encrypted two-peer 17/23 join, exact replay, dual rotation rollback, maximum-size envelopes, v1 database/receipt migration, timestamp compatibility, and same-DB rescue after accepted writes. The locked Python checks validate 24 actual HTTP responses, three independent crypto vectors and the backup test.
  • Independent logic review requested: focus on atomicity, idempotency across routes/epochs, the legacy password rotation guard, delete/recreate, rescue, and the small security-baseline commit.
  • No isolated staging target has been authorized; nothing deployed or cut over. Shipped-client privacy/consent, durable device restore, representative capacity and an operator staging/rescue rehearsal remain gates. Client Usage remains off by default.

@appergb
appergb requested a review from H-Chris233 November 19, 2026 04:16
Update bundled SQLite and the affected Quinn and rustix lock entries without broad updates. Replace unmaintained chrono with a UTC RFC3339 adapter that preserves persisted and on-the-wire timestamps.
@appergb
appergb requested review from H-Chris233 and removed request for H-Chris233 November 19, 2026 04:27
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