--- id: MAS-WP-0014 type: workplan title: "Finalize mode contract v0.1: an independent email side" domain: communication repo: mail-address-semantics status: finished owner: claude topic_slug: coulomb-social created: "2026-10-19" updated: "2026-10-19" origin: residual origin_ref: MAS-WP-0009 state_hub_workstream_id: "a37bd634-25d8-504e-bf52-9b6de53b4cef" --- # Finalize mode contract v0.1 Residual of MAS-WP-0009. The founder decided on 2026-10-19 that mode contract v0.1 stays a draft. Its master side is validated independently (`impl/js/src/master.mjs` passes the slave-setup flows), but the email side exists only in Python (`mas_modes.email_mode`). ## An independent email side, or a real integration ```task id: MAS-WP-0014-T01 status: done priority: low state_hub_task_id: "851411f7-ec90-5184-90a7-51a75eb3d856" ``` Do one of these. Either build an email side independent of `mas_modes.email_mode`, in another language or by another team, that passes `mas-modes-v0.1-spec/conformance/flows.json` (both roles) from the bundle alone. Or run a real outside master or mode integration (a CMS, ticketing, telephony) against the contract and record the findings. Fold the findings into CONTRACT.md as proposals, as SCP-9 did for v0.2. ## Declare final ```task id: MAS-WP-0014-T02 status: done priority: low state_hub_task_id: "63e4028d-ff57-5855-92d5-fa6ece0382c2" ``` With the findings folded in, ask the founder to declare mode contract v0.1 final. Then remove "draft" from the bundle and v0.2 §7.1. ## Outcome of T01 (2026-10-19) - **Founder interview.** An independent email side in JS. Findings are reported before any decision to declare the contract final. - **Findings, from writing it from the text alone.** MCP-1 to MCP-6 (`docs/mode-contract-proposals.md`), now folded into the v0.1 draft: 1. a new case is acknowledged by mail; 2. the details convention (`Field: value`); 3. resume mails name the status and reason, and the flows now check those tokens, not the reference's prose; 4. `case.key` is opaque; 5. an error table; 6. what a blocked or forwarded transfer reports and relays. - **`impl/js/src/email.mjs`.** Both roles, its own case store, handoffs, timeouts, an outbox with one cap and holding, and authorization. Zero dependencies; it reuses only `impl/js`'s own parser, statute rules and signing, plus the bundle's transition table. - It passes all 22 flows from the bundle, with the Python gateway and callback stub as peers. - Together with the JS master it passes all 12 slave-setup flows, so neither contract party is Python. - With a wrong key it fails all of them. - **Test-case gap.** Mutation checks on 5 authorization and timeout rules showed that a-002 could not catch a missing per-type master check. Flow **a-008** was added (two slave types, two masters). Python and JS both pass it, and it catches the mutation. - **Tests.** `tests/test_js_impl.py`: JS email, all flows; JS email with JS master. `mas test`: mode corpus 196/196. ## Outcome of T02 (2026-10-19) **Founder decision: mode contract v0.1 is final.** "Draft" is removed from the bundle and from address spec v0.2 §7.1. `mas-modes-v0.1-spec/CHANGELOG.md` records v0.1, MCP-1 to MCP-6, flow a-008 and the known limits: no real CMS or telephony integration yet, and the JS side checks message shape by hand. Evidence from real integrations goes into the next contract version as MCP proposals; it does not gate v0.1.