Phase 2: reversible write path (0.2.0) #7

Closed
opened 2026-10-31 03:45:38 +00:00 by svc-agent-writer · 1 comment

Phase 2 of the roadmap: drafts, flags and moves through an outbox, all reversible, with undo, caps and an audit log. Decision: ADR 0004 (docs/adr/0004-reversible-write-path.md, PR #6). The hardening work folds into this phase: the credential split, the health route and Litestream.

Grok's connector sends one header and cannot join the tailnet, so a write token for Grok must sit on the public hostname. Starbase ADR 0023 forbids that until it is amended. The amendment is tracked on the starbase forge (https://git.gen3.dev/starbase/iac/issues/271) and follows the Matrix grok-bot precedent.

Target: 0.2.0.

Sub-issues

  • #11 Add schema v2 with the actions table and a read-only reader
  • #12 Add IMAP write primitives and drain the outbox in the sync worker
  • #13 Add the write tools with scope, caps and a bounded wait
  • #14 Give the api container the token files only
  • #15 Add a /healthz route that reports sync lag
  • #17 Release 0.2.0 (shipped as 0.2.1)
  • #32 Backfill stalls on a FETCH response the client cannot parse
  • https://git.gen3.dev/starbase/iac/issues/271 (deploying estate) ADR 0023 amendment

Estate deploy tasks for this phase, such as backups on the live instances, live on the deploying estate's private tracker.

Exit criteria

  • make check and make test-integration green, with GreenMail covering append, flag, move and undo.
  • On a test instance: the write tools are absent for the read token and a call to one fails (FastMCP hides a tool outside the token's scope rather than answering insufficient_scope); a draft appears in Drafts and is not sent; a move and its undo round-trip; a cap fires at its limit.
Phase 2 of the roadmap: drafts, flags and moves through an outbox, all reversible, with undo, caps and an audit log. Decision: ADR 0004 (`docs/adr/0004-reversible-write-path.md`, PR #6). The hardening work folds into this phase: the credential split, the health route and Litestream. Grok's connector sends one header and cannot join the tailnet, so a write token for Grok must sit on the public hostname. Starbase ADR 0023 forbids that until it is amended. The amendment is tracked on the starbase forge (https://git.gen3.dev/starbase/iac/issues/271) and follows the Matrix grok-bot precedent. Target: 0.2.0. ## Sub-issues - [x] #11 Add schema v2 with the actions table and a read-only reader - [x] #12 Add IMAP write primitives and drain the outbox in the sync worker - [x] #13 Add the write tools with scope, caps and a bounded wait - [x] #14 Give the api container the token files only - [x] #15 Add a /healthz route that reports sync lag - [x] #17 Release 0.2.0 (shipped as 0.2.1) - [x] #32 Backfill stalls on a FETCH response the client cannot parse - [ ] https://git.gen3.dev/starbase/iac/issues/271 (deploying estate) ADR 0023 amendment Estate deploy tasks for this phase, such as backups on the live instances, live on the deploying estate's private tracker. ## Exit criteria - `make check` and `make test-integration` green, with GreenMail covering append, flag, move and undo. - On a test instance: the write tools are absent for the read token and a call to one fails (FastMCP hides a tool outside the token's scope rather than answering `insufficient_scope`); a draft appears in Drafts and is not sent; a move and its undo round-trip; a cap fires at its limit.
Author
Member

This was generated by AI during triage.

Every sub-issue listed in the body is closed. Closing the epic.

> *This was generated by AI during triage.* Every sub-issue listed in the body is closed. Closing the epic.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/mail-mind-mcp#7
No description provided.