From b30ce58f5906cc3fcc4b182a944589bd213dde55 Mon Sep 17 00:00:00 2001 From: tegwick Date: Sun, 18 Oct 2026 18:00:47 +0200 Subject: [PATCH] MAS-WP-0005-T01: SCP-6 stand-ins dashes only (--- for !), fixed by spec, + without stand-in Co-Authored-By: Claude Opus 5.5 Assistant: claude-code Assistant-Model: opus Assistant-Process: 252470@bnt-lap001 Assistant-Session: ad628c8f-4be2-4979-94c9-76c7ed6f8241 --- docs/spec-change-proposals.md | 75 ++++++++++++--------- workplans/MAS-WP-0005-spec-errata-v0-1-1.md | 16 +++-- 2 files changed, 56 insertions(+), 35 deletions(-) diff --git a/docs/spec-change-proposals.md b/docs/spec-change-proposals.md index ac18867..49c1e0f 100644 --- a/docs/spec-change-proposals.md +++ b/docs/spec-change-proposals.md @@ -143,7 +143,7 @@ event-schema addition. --- -## SCP-6: statute-declared stand-ins and destination transforms (`--` for `=`, `__` for `!`) +## SCP-6: statute-enabled stand-ins and destination transforms (`--` for `=`, `---` for `!`) **Sections:** §6 Resource semantics, §11 Statute document, §12. @@ -163,38 +163,50 @@ correctly could not attach it to the ticket. - Similar endpoint behaviours are covered in the same mechanism: a stand-in for `!`, plus case, facet, interaction, quoting, dot and length handling (founder confirmed, 2026-10-18). +- Stand-ins use **dashes only**: `--` for `=` and `---` for `!`. No other + stand-in characters are added. `+` is considered functional by default + and has no stand-in (founder, 2026-10-18). -**Proposal, receiving side (normative):** a statute MAY declare stand-ins -for MAS operators: +**Proposal, receiving side (normative):** the spec defines two fixed +stand-ins. A statute MAY enable each one: ```json -"alternate_syntax": { "resource": "--", "interaction": "__" } +"alternate_syntax": { "resource": true, "interaction": true } ``` -- **Resource stand-in (`--` for `=`).** A target `TYPE--ID`, where `TYPE` is - a resource type declared in the same statute, is equivalent to - `TYPE=ID`. The policy resolver reports `target_syntax: +The stand-ins are fixed by the spec, not configurable, so every generator +and receiver uses the same forms. + +- **Resource stand-in `--` for `=`.** In a target `TYPE--ID`, where `TYPE` + is a resource type declared in the same statute, the form is equivalent + to `TYPE=ID`. The policy resolver reports `target_syntax: "resource-alternate"` and the canonical equivalence key `TYPE=ID`. -- **Interaction stand-in (`__` for `!`).** A local-part ending in - `__MODE`, where `MODE` is an interaction mode the statute enables, is - equivalent to `!MODE`: `ticket__callback` ≡ `ticket!callback`. The split - is at the **last** `__`, and only if the suffix is an enabled mode. - Anything else (`foo__bar` with no enabled mode `bar`) stays plain data. -- **No stand-in for `+`.** Every endpoint tested accepted `+`, and facets - already degrade safely when stripped (§12). Generators use the - `drop-facet` transform instead. -- **Split rule for types:** together with SCP-2, resource-type names are - lower-case letters and digits with single `-` or `_` separators. They - never contain `--` or `__`. The first `--` after the type always ends - it: `ticket--RE--2026` is type `ticket`, ID `RE--2026`. IDs may contain - `--`. -- Each stand-in applies only if the statute declares it, and the resource - stand-in only for a declared type. Otherwise `--` and `__` have no - meaning (§6.1 still applies). -- Receivers store, correlate and reply using the canonical form only. -- Stand-ins must be dot-atom-safe, must not contain `.`, `=`, `+` or `!`, - and must differ from each other. A namespace with existing opaque names - that match a stand-in pattern must not declare it. +- **Interaction stand-in `---` for `!`.** A local-part ending in + `---MODE`, where `MODE` is an interaction mode the statute enables, is + equivalent to `!MODE`: `ticket---callback` ≡ `ticket!callback`. +- **Matching order (normative):** + 1. **Interaction first.** If the local-part ends in `---MODE` with an + enabled `MODE`, that suffix (at the last such `---`) is the + interaction. + 2. **Resource next.** In the remainder, `TYPE--ID` with a declared type + is a resource. The split is at the first `--`. + + Examples: + - `ticket---callback` ≡ `ticket!callback` + - `ticket--GS1---callback` ≡ `ticket=GS1!callback` + - `ticket--A---B` ≡ `ticket=A---B` if `B` is not an enabled mode +- **Constraints:** + - Resource-type names (lower-case after SCP-2) never contain `--`. + - Interaction mode names do not start with `-`. + - A namespace that enables the interaction stand-in MUST NOT issue + resource IDs containing `---`. + - A namespace with existing opaque names matching either pattern must + not enable that stand-in. +- **No stand-in for `+`.** `+` is functional by default: every endpoint + tested accepted it, and facets degrade safely when stripped (§12). +- Without the statute switch, or for an undeclared type or mode, `--` and + `---` have no meaning (§6.1 still applies). Receivers store, correlate + and reply using the canonical form only. **Proposal, sending side (normative mechanism, informative integrations):** generators produce addresses for a *destination*, such as a forwarding @@ -205,8 +217,8 @@ endpoint behaviours seen or expected: | Transform | Effect | Allowed only if | |---|---|---| -| `resource-alternate` | `TYPE=ID` → `TYPE--ID` | statute declares `alternate_syntax.resource` | -| `interaction-alternate` | `!MODE` → `__MODE` | statute declares `alternate_syntax.interaction` and enables `MODE` | +| `resource-alternate` | `TYPE=ID` → `TYPE--ID` | statute enables `alternate_syntax.resource` | +| `interaction-alternate` | `!MODE` → `---MODE` | statute enables `alternate_syntax.interaction` and the mode `MODE` | | `lowercase` | fold the whole local-part to lower case | statute declares case-insensitive identifiers (SCP-7); types are lower-case (SCP-2) | | `drop-facet` | remove `+FACET` (loses information) | always; only when explicitly requested | | `drop-interaction` | remove `!MODE` (loses the requested mode; the mail still reaches intake) | always; only when explicitly requested, with a warning | @@ -217,7 +229,7 @@ Endpoint behaviours that need no transform: - **Dots:** generators never insert dots. Dot handling is statute dot folding (§8). - **Length:** after all transforms, the 64-octet limit is checked again - (each stand-in adds one octet). A generator MUST refuse rather than + (`--` adds one octet and `---` adds two). A generator MUST refuse rather than truncate. - **`$` and `^`:** remain reserved; P3 is out of scope. @@ -242,7 +254,8 @@ result is `ticket--gs-85qj8wc09p+comments@`. Concrete profiles (e.g. `ionos-forward`) live in implementation configuration or a catalog, not in the spec. -**Impact:** additive: an optional schema object (`alternate_syntax`), +**Impact:** additive: an optional schema object (`alternate_syntax`, two +booleans), parser and policy support for both stand-ins, a generator `destination` parameter with the five transforms, and new fixtures. Targets v0.2. The composer (MAS-WP-0006) is the first consumer of destination profiles. diff --git a/workplans/MAS-WP-0005-spec-errata-v0-1-1.md b/workplans/MAS-WP-0005-spec-errata-v0-1-1.md index f840dd2..b9576d3 100644 --- a/workplans/MAS-WP-0005-spec-errata-v0-1-1.md +++ b/workplans/MAS-WP-0005-spec-errata-v0-1-1.md @@ -52,9 +52,16 @@ SCP-6 split rules), and record which proposals are accepted. (split at the last `__`, only when the suffix is an enabled mode). There is no stand-in for `+`. The closed transform set is resource-alternate, interaction-alternate, lowercase, drop-facet and drop-interaction. - Quoting, dots and length need no transform. Type names may not contain - `--` or `__`. Remaining T01 items: confirm SCP-1, SCP-3, SCP-5 and SCP-7 - as written. + Quoting, dots and length need no transform. +- 2026-10-18: revised by the founder. Stand-ins use dashes only: `---` + replaces `__` for `!`, and no other stand-in characters are added. `+` is + functional by default with no stand-in. The stand-ins are now fixed by + the spec; the statute only enables them + (`alternate_syntax: {resource: true, interaction: true}`). Matching + order: interaction (`---MODE` at the end, enabled mode) first, then + resource (`TYPE--ID`). IDs must not contain `---` when the interaction + stand-in is enabled. Remaining T01 items: confirm SCP-1, SCP-3, SCP-5 + and SCP-7 as written. ## v0.1.1 errata @@ -105,6 +112,7 @@ priority: medium state_hub_task_id: "4ff67908-52c4-5106-b851-e1dec8274226" ``` -Draft the statute object `alternate_syntax` (`--` for `=`, `__` for `!`), +Draft the statute object `alternate_syntax` (enables the fixed stand-ins +`--` for `=` and `---` for `!`), the destination transforms (see SCP-6), and `equivalence.resource_id_case`, with policy semantics and fixtures.