Add schema v2 with the actions table and a read-only reader #11
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#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Epic: #7
Schema v2 for the outbox (ADR 0004 §2, §7).
What to build
actionstable tostore.py. Columns:id,kind(draft,flag,move,undo),params(JSON, messages by account/mailbox/uidvalidity/uid only),role(token role),state(queued,applied,failed,refused),result_code,inverse(JSON),undo_of,requested_at,applied_at. Rows are append-only apart from the state transition.SCHEMA_VERSIONto 2. Writeschema_versiononly when the stored value is lower. 0.1.x writes the version unconditionally (store.pyStore.__init__); after this change no process lowers it.Storeopening into two modes: the writer (sync worker) runs the DDL; the reader (api) opens withfile:...?mode=rofor every mirror read and runs no DDL. Theapiprocess needs one write path,enqueue_action, which touchesactionsonly. Pick the smallest shape that keeps that boundary visible in code, for example a second connection used only byenqueue_action.apistart before the schema exists, wait and retry with a bounded timeout. Then fail withconfig_error.enqueue_action,next_actions(limit),finish_action,list_actions(since, limit),count_actions_today(kind).Acceptance
enqueue_actionfrom the reader process succeeds.make checkgreen.Blocked by