mail-address-semantics/workplans/MAS-WP-0014-finalize-mode-contract.md
tegwick 001cab57d1 Mode contract v0.1 final (MAS-WP-0014 finished)
Founder decision after the independent JS email side. Draft markers
removed (bundle, address spec v0.2 section 7.1, reuse surface), CHANGELOG
v0.1 with MCP-1..6 and known limits. SCOPE: all workplans but MAS-WP-0007
finished.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 5787@bnt-lap001
Assistant-Session: 5db26b82-138b-40cc-9856-4d5eb0f752fd
2026-10-19 13:59:27 +02:00

3.4 KiB

id type title domain repo status owner topic_slug created updated origin origin_ref state_hub_workstream_id
MAS-WP-0014 workplan Finalize mode contract v0.1: an independent email side communication mail-address-semantics finished claude coulomb-social 2026-10-19 2026-10-19 residual MAS-WP-0009 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

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

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.