Add schema v2 with the actions outbox and a read-only reader #26
No reviewers
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp!26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/schema-v2-actions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #11. The first phase 2 step (epic #7, ADR 0004 §2 and §7).
What changed
actionstable: the outbox and audit log. Its columns are kind (draft,flag,move,undo), JSON params, token role, state, result code, inverse,undo_ofand two timestamps. Three triggers enforce the ADR in the database:undo_ofand request time are fixed once queued.queuedexactly once.metaupsert writes the version only when the stored value is lower. 0.1.x still writes it unconditionally. After a rollback to 0.1.x, the next 0.2.0 start raises the version back to 2. The table is additive, so 0.1.x can still read a v2 file.Store(path, reader=True)formailmind api:config_error.mode=roconnection.enqueue_action, on its own connection.syncandcheck.enqueue_action,next_actions,finish_action(returns False once settled),get_action,list_actions, andcount_actions_today(UTC day, counts requests in any state).mailmind apiopens it.Checks
make check: lint, mypy --strict and pip-audit clean; 39 unit tests pass (7 new).make test-integration: the GreenMail suite passes.mode=roopen works on a WAL file with no-wal/-shmfiles present, and in a read-only directory.Deploy note
On the first 0.2.0 start,
apiwaits untilsynchas migrated the file. Both containers start together, and the migration is oneCREATE TABLE, so the wait is short.🤖 Generated with Claude Code