host: SX-native wire — reads + write bodies are text/sx, JSON CRUD deleted
Greenfield SX-native pivot (NOT a strangler): the host speaks SX/SXTP end to end;
JSON only at the future ActivityPub federation edge.
- OUTPUT: host/json-status -> host/sx-status — every host/ok/host/error response is
text/sx via the serialize primitive (NOT application/json). Flips feed, relations,
blog reads. Tests assert the SX envelope ({:ok true :data ...}).
- DELETE the blog JSON CRUD /posts (POST/PUT/DELETE) + bearer-based host/blog--protect:
a pure old-contract REST mirror. Create/edit go through the HTML editor forms;
programmatic writes speak SXTP. FOLLOW-UP: no browser delete route yet (was JSON-only,
no UI) — add POST /:slug/delete + cascade edge cleanup when the metamodel UI needs it.
- INPUT: host/sx-body (sxtp.sx) parses a text/sx request body to a string-keyed dict
(parse-safe + sxtp/-normalize). feed POST + relations attach/detach read it.
- UNIFIED field reader host/fields / host/field: text/sx body OR urlencoded form by
content-type. The blog form handlers (new/edit/relate/unrelate) + login read through
it — additive, urlencoded still works (no-engine / bootstrap fallback).
Conformance 290/290 (11 suites). Retires the strangler framing in the plan; adds the
'SX all the way out' wire table. The engine half (browser posts text/sx) follows.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -68,14 +68,34 @@ Sequence: finish the schema language (Slices 6–7) → the two UI surfaces + re
|
||||
data and define a real domain through the UI. The slices below are the schema language; this is
|
||||
what it's *for*.
|
||||
|
||||
### Endgame — the whole platform as a typed domain (the strangler's finish line)
|
||||
### Endgame — the whole platform as a typed domain (greenfield, not a strangler)
|
||||
|
||||
Not just the blog: the entire rose-ash platform — **store, events, orders, cart, …** — is
|
||||
expressible as type + relation definitions in this one metamodel. `Product`, `Event`, `Order`,
|
||||
`Ticket` are types; "cart has line-items", "order for an event", "ticket of an event" are
|
||||
relations with signatures (cardinality = a cart has many line-items, a ticket belongs to one
|
||||
event). This is the completion of the host-on-sx strangler off Quart (`[[project_host_on_sx]]`):
|
||||
define the domain schema as data instead of porting each service's bespoke models.
|
||||
event). This is NOT a strangler off Quart (`[[project_host_on_sx]]`) — it's a **greenfield,
|
||||
SX-native system**: define the domain schema as data from first principles, then **port the data
|
||||
once at the end** (define-then-port), rather than reimplementing each service's bespoke models
|
||||
endpoint-by-endpoint. The strangler's compatibility machinery (JSON mirrors, route/model parity,
|
||||
incremental contracts) is dropped — it was tax, not value, for a system that doesn't *correspond*
|
||||
to the old one.
|
||||
|
||||
### SX all the way out — no JSON on the internal wire
|
||||
|
||||
The platform speaks **SX/SXTP end to end**, both directions, browser included — JSON survives only
|
||||
at the ActivityPub federation edge (JSON-LD, a published external standard).
|
||||
|
||||
| Layer | SX-native form |
|
||||
|-------|----------------|
|
||||
| Page render | HTML (the document itself) |
|
||||
| Data reads | `text/sx` via the `serialize` primitive (`host/ok`/`host/error` → `host/sx-status`) |
|
||||
| Write bodies | `text/sx` parsed via `sxtp/parse` (was JSON / form-urlencoded) |
|
||||
| Browser → server | the engine posts `text/sx` (boosted forms serialise fields to SX wire); form-urlencoded survives only as the **no-engine / pre-hydration fallback** + the **login bootstrap** handshake |
|
||||
| Federation edge | JSON-LD (ActivityPub — the *only* JSON) |
|
||||
|
||||
The blog **JSON CRUD `/posts`** (POST/PUT/DELETE) is **deleted**, not converted: it was a pure
|
||||
old-contract REST mirror; writes go through the HTML editor forms + SXTP.
|
||||
|
||||
Three honest additions store/events surface (the blog didn't need them):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user