From b6c2995b19e18840862eded91a3b9a4100e50bfb Mon Sep 17 00:00:00 2001 From: giles Date: Sun, 7 Jun 2026 00:56:45 +0000 Subject: [PATCH] =?UTF-8?q?radar:=20pass=2010=20=E2=80=94=20W6=20guarded?= =?UTF-8?q?=20lifecycle=20FSM=20(mod+identity):=20shared=20principle,=20di?= =?UTF-8?q?vergent=20structure=20(SX=20table=20vs=20Erlang=20gen=5Fserver)?= =?UTF-8?q?,=20not=20a=20lib?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- plans/abstractions.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/plans/abstractions.md b/plans/abstractions.md index cd1530c2..50881373 100644 --- a/plans/abstractions.md +++ b/plans/abstractions.md @@ -12,6 +12,11 @@ Anything short → _Watching_ (what's missing) or _Rejected_ (why). ## Last scan +- **Date:** 2026-06-07 (radar loop, pass 10) +- **Pass 10:** commerce/content/events/identity advancing (content 238/238). Probed a + shape outside the routing table — **guarded lifecycle state machines** (mod/lifecycle + + identity/membership) → new W6: shared *design principle*, divergent *structure* + (SX transition-table vs Erlang gen_server), NOT an extraction target. No gate-clearer. - **Date:** 2026-06-07 (radar loop, pass 9) - **Pass 9:** `commerce` + `content` reached Phase 2 (`content` 162/162). **Key find: `content` built its op log directly on `persist/log`** (backend-injected, append+replay- @@ -227,6 +232,24 @@ Anything short → _Watching_ (what's missing) or _Rejected_ (why). --- +### W6 · Guarded lifecycle state machine (illegal transition = explicit error) +- Recurs as a **design principle**, NOT a shared structure (found pass 10): + - `mod/lib/mod/lifecycle.sx` — pure SX: immutable case `{:state :error :history …}`, + explicit transition table `mod/lc-transitions` (:31), illegal transition returns the + case unchanged with `:error` set. States open→triaged→decided→appealed→final. + - `identity/lib/identity/membership.sx` — an **Erlang `gen_server`** fragment (identity + runs on erlang-on-sx): a `receive` loop with `case find(...) of … {error, St}` guards. + States none→pending→active→lapsed→revoked. +- **Both share the guideline** ("invalid transitions are explicit errors, never silent + no-ops") but **implement it substrate-idiomatically** — SX transition-table over + immutable values vs an Erlang process loop with per-message case guards. Same W1/`api.sx` + trap: shared *idea*, divergent *structure*. +- **Disposition:** not an extraction target — the FSM mechanism is ~10 substrate-specific + lines; the value is in each domain's state graph, not the plumbing. At most a **design + guideline** ("model lifecycle as a guarded FSM with explicit-error transitions"). Watch + whether commerce-checkout / events-booking add their own — if so it confirms the + *guideline*, still not a lib. Do not propose extracting a shared state-machine lib. + ## Rejected (considered, declined — do not re-propose) - **"Continuous auto-implementing abstractor loop."** Rejected at design time: an