MAS-WP-0006: mas compose (canonical + forwarder-safe address)

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
This commit is contained in:
tegwick 2026-10-19 09:27:31 +02:00
parent d766d61e7f
commit 499ddce015
4 changed files with 187 additions and 6 deletions

View file

@ -4,11 +4,11 @@ type: workplan
title: "MAS address composer"
domain: communication
repo: mail-address-semantics
status: proposed
status: finished
owner: claude
topic_slug: coulomb-social
created: "2026-10-18"
updated: "2026-10-18"
updated: "2026-10-19"
origin: residual
origin_ref: MAS-WP-0003
state_hub_workstream_id: "0934280a-f85a-55f1-a17c-61c5255b5e3b"
@ -26,7 +26,7 @@ outcome in MAS-WP-0005.
```task
id: MAS-WP-0006-T01
status: todo
status: done
priority: medium
state_hub_task_id: "13071dfc-fbaa-503e-bd0d-ddd6c2377758"
```
@ -42,10 +42,26 @@ or both. The library side exists: `mas_core.generator.for_destination` (MAS-WP-0
```task
id: MAS-WP-0006-T02
status: todo
status: done
priority: medium
state_hub_task_id: "69cb22fe-9995-55c3-91de-63eab5c09282"
```
Build it on `mas_core.generator`, with fixtures for the forms seen in
MAS-WP-0003.
## Outcome
- Interface (T01): a CLI command only, `mas compose DOMAIN TARGET [--facet F]
[--interaction MODE] [--for DESTINATION] [--statute FILE | --no-discover]`.
There is no web page: it would need a second parser in JS, and nothing
asks for one yet. TARGET is `TYPE=ID` or a registry name.
- Output: the canonical address with its octet count. If the statute
declares stand-ins, also the forwarder-safe form (stand-ins, then lower
case). `--for` adds the named destination profiles. The composer warns
when fewer than 16 of the 64 octets are left, and when the statute would
not handle the address. It refuses facet + interaction (exit 1). A form
the namespace would misread is reported as "cannot express".
- Tests (T02): `tests/test_compose.py`, using the MAS-WP-0003 forms
(IONOS `ticket--gs-85qj8wc09p+comments`, Google Groups lower case,
`ticket---callback`, `ticket=RE=2026-4711` not expressible).