docs(email): record send ledger evidence
CI and Deploy / test (pull_request) Failing after 1m34s
CI and Deploy / deploy (pull_request) Has been skipped

This commit is contained in:
cesnimda
2026-08-09 23:41:09 +02:00
parent 653f011be2
commit 429f427f49
7 changed files with 41 additions and 19 deletions
+14 -4
View File
@@ -37,12 +37,21 @@ Status: `IN PROGRESS`. Canonical hub routing and provider-neutral read capabilit
- Rapid selection changes invalidate older requests so late provider responses cannot appear under the wrong message.
- Inbox label and attachment counts now reflect parsed metadata arrays rather than treating every non-null JSON field as one item.
## Implemented inert send-ledger increment
- Added tenant-owned `EmailSendAttempts` with pending/sending/sent/failed/uncertain states and a unique owner/client-request key.
- A request ID can be reused only for the same SHA-256 payload hash. Different content under an old request ID is rejected.
- Only pending attempts may enter sending, and only sending attempts may become terminal. Failed or uncertain attempts cannot be restarted blindly.
- The ledger stores provider/idempotency/status/timing metadata only; recipient, subject and message body are intentionally absent.
- Deleting the owning job cascades the ledger row. The global owner filter protects direct attempt IDs.
- The additive migration has provider-specific SQLite/MariaDB types and reversible up/down SQL. No send route, OAuth scope or provider call was enabled.
## Verification
- Focused provider/correspondence controllers: 5/5 tests; focused hub detail: 5/5 tests.
- Full backend: 605/605; full frontend: 49/49 suites, 188/188 tests.
- Focused send ledger: 3/3; provider/correspondence controllers: 5/5; hub detail: 5/5.
- Full backend: 608/608; full frontend: 49/49 suites, 188/188 tests.
- Production build/TypeScript and `git diff --check`: pass.
- Implementation commits: `6008b4a`, `536d403`, `a20775c`.
- Implementation commits: `6008b4a`, `536d403`, `a20775c`, `653f011`.
## Remaining MAIL-001 work
@@ -50,6 +59,7 @@ Status: `IN PROGRESS`. Canonical hub routing and provider-neutral read capabilit
- Surface provider identity, reauthorization, read/unread, pin/read-later/archive/spam/trash only where the provider supports it.
- Share thread detail and link/unlink actions between hub and job workspace.
- Design editable provider drafts with recipient/subject/thread/provider review and explicit confirmed, idempotent send; uncertain failures must not be retried blindly.
- Include non-sensitive send-attempt metadata in user export and verify account/job deletion coverage before enabling the send API.
- Preserve minimal audit metadata without sensitive body logging; verify Free non-AI access and Pro-only AI assistance.
- Complete link/unlink/dismiss/draft/send/failure/two-user/application-embed tests plus browser/production provider gates. No real email may be sent during repository verification.
@@ -59,4 +69,4 @@ The first focused Jest invocation exhibited the repository's open-handle delay.
## Rollback
Revert `a20775c` for message detail, `536d403` for the neutral API/status, then `6008b4a` for canonical routing. Persisted email/correspondence data and provider scopes remain unchanged.
Revert `653f011` (after downgrading the additive migration) for the send ledger, `a20775c` for message detail, `536d403` for neutral reads, then `6008b4a` for routing. Provider scopes remain unchanged.