MAS-WP-0005-T09: generator destination transforms with round-trip refusal; example profiles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 252470@bnt-lap001 Assistant-Session: ad628c8f-4be2-4979-94c9-76c7ed6f8241
This commit is contained in:
parent
eb10f54fd2
commit
c3e2f05ee5
5 changed files with 200 additions and 5 deletions
|
|
@ -293,7 +293,7 @@ the stand-in constraints. Statute-aware fixtures.
|
|||
|
||||
```task
|
||||
id: MAS-WP-0005-T09
|
||||
status: todo
|
||||
status: done
|
||||
priority: medium
|
||||
state_hub_task_id: "853d1b76-8b7f-5234-aacc-dc1fb5d155c2"
|
||||
```
|
||||
|
|
@ -303,6 +303,25 @@ canonical form when allowed; refuse when the namespace would not accept the
|
|||
result; re-check the length after transforms. Include an example destination
|
||||
profile `ionos-forward`. This is the base for the composer (MAS-WP-0006).
|
||||
|
||||
- 2026-10-18 done: `mas_core.generator.for_destination(local_part, statute,
|
||||
needs, allow_lossy=False)` returns `DestinationAddress(local_part, applied,
|
||||
warnings)`.
|
||||
- It applies only the transforms that change something.
|
||||
- Lossy transforms need `allow_lossy`; `drop-interaction` adds a warning.
|
||||
- Refusals raise `CannotExpress`: `transform-not-permitted` (statute
|
||||
switch off, or a v0.1 statute), `cannot-express` (id contains `=`),
|
||||
`too-long` (after transforms) and `would-be-misread`.
|
||||
- Safety is a round trip: the result is resolved with the receiving
|
||||
policy and must give the same equivalence key, facet and interaction.
|
||||
This catches lower-casing under `resource_id_case: exact` and case
|
||||
changes in facets.
|
||||
- Example profiles: `canonical`, `ionos-forward` (resource-alternate +
|
||||
lowercase), `google-groups` (lowercase).
|
||||
- 11 new tests; 179 pass.
|
||||
- Correction: there is no `mas generate` CLI command. The review's gate
|
||||
table and MAS-WP-0006 now point to `for_destination`; the CLI/UI is
|
||||
MAS-WP-0006.
|
||||
|
||||
## v0.2 live check: IONOS forward with stand-ins
|
||||
|
||||
```task
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ Define what the composer does: from a statute and an intent (resource,
|
|||
facet, interaction), emit the canonical address and, when the statute
|
||||
declares one, the forwarder-safe form (lower case, `--` separator). Warn
|
||||
about the 64-octet budget and facet/interaction exclusivity. Decide
|
||||
whether it is an extension of `mas generate`, a web page, or both.
|
||||
whether it is a new CLI command (the CLI has no generate command yet), a web page,
|
||||
or both. The library side exists: `mas_core.generator.for_destination` (MAS-WP-0005 T09).
|
||||
|
||||
## Implement and test
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue