Skip to content

Recover accepted signatures and workflow email after interruption - #1

Merged
mariomeyer merged 13 commits into
mainfrom
feat/durable-recovery
Nov 18, 2026
Merged

mariomeyer merged 13 commits into
mainfrom
feat/durable-recovery

Conversation

@mariomeyer

@mariomeyer mariomeyer commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

A worker lost after the last signature or a provider request can leave document preparation unfinished or discard a notification. This adds opt-in PostgreSQL recovery: validated signature acceptance commits with an encrypted finalization snapshot, and workflow changes commit with encrypted email intent. Replacement workers reclaim expiring leases, reuse frozen email payloads and provider keys, and publish documents under a database fence with immutable attempt paths.

The authenticated recovery endpoint and Helm 0.2.0 scheduler drain persisted work. Existing synchronous behavior stays the default; the IAD-1 example enables recovery. Activation requires the additive migrations, stable shared secrets and an active scheduler. No cluster resources have been applied.

Retained envelopes keep their sealing and recipient notifications through record-keeper changes. Retention warnings are bound to the current policy and recipient, with fresh policy identities across legacy logical restores. Logical backup batches are bounded for encrypted attachments. Multiline document titles remain valid, and queued reminders are distinguished from provider-confirmed sending.

Validation: PR CI passed typechecking, lint, production build, 386 unit tests (two live-S3 cases skipped), all 289 PostgreSQL tests, and 7/7 browser cases in each of legacy and durable modes. The chart checks passed. Separate local PostgreSQL/MinIO validation includes real process kills around provider acknowledgement, signature acceptance, uploads and publication. The hardened S3-container browser suite passed 7/7 at 2c422de; the final focused corrections at 4294442 passed 79 affected database tests, 15 unit tests and the host-fixture container smoke. The non-root migration image confirmed all 24 migrations are current. Changed-file formatting passed; 12 inherited whole-repository formatting failures and seven inherited lint warnings remain.

Automatic ambiguous email retry stops at 23 hours; older outcomes require operator reconciliation. Better Auth retains its separate transaction boundary, and a one-time signing-provider exchange interrupted before local acceptance still needs reconciliation. Hosted CI exercises real process kills with local storage; the S3 production-container suite uses a separate disposable endpoint. The runbook documents migration-first rollout, draining, restore reconciliation and separate US/Canadian data planes.

Published the paired app and migration images under 41b07ed6fabe759c06cf6c226ba4345546303ee1 and chart 0.2.0-sha-41b07ed6fabe759c06cf6c226ba4345546303ee1. The GHCR publishing run verified image source revisions and pulled-chart contents. Deployment still requires explicit approval.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T22:38:19.590333Z 4294442 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mariomeyer
mariomeyer merged commit 41b07ed into main Nov 18, 2026
6 checks passed
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