Show #1 (U.System): effectful API boundary (algebraic effects intuition)
Preface node
heading:show-1-u-system-effectful-api-boundary-algebraic-effects-intuition:8127
What this page is
This is generated FPF reference text from the specification preface or supporting sections. It helps interpret FPF; it is not FPF Reference product documentation.
Methodology
Use it to understand how the specification wants to be read, then return to a route, pattern, or work packet for active work. Cite generated IDs only when the wording changes the task decision.
Content
System: A “Payment Authorize” service.
-
Signature layer (A.6.0).
- Vocabulary:
PaymentRequest,AuthDecision,MerchantId,Money, etc. - Laws: e.g., “If decision is APPROVED then reservedAmount = requestedAmount” (truth‑conditional).
- Applicability: bounded context “Payments Authorization”.
- Vocabulary:
-
Mechanism layer (A.6.1).
- Admissibility gate: request is admissible iff
tokenValid ∧ merchantActive ∧ amountWithinLimit. - Transport: HTTP headers, idempotency key transport, canonical currency conversions.
- Audit and observability: specifies required evidence carriers (e.g.,
AuthorizationRecordevent, log entry) and their semantics (fields, correlation IDs, retention class).
- Admissibility gate: request is admissible iff
-
Realization and work layer.
- Actual side effects: reservation entry in ledger, emission of event, timers, retries.
- Evidence: traces, logs, metrics.
-
Publication faces (MVPK).
- PlainView: narrative for stakeholders (what the service promise is, in plain terms).
- TechCard: signature or mechanism details (types, error codes, version policy, admissibility predicate refs).
- InteropCard: machine‑exchange oriented boundary details (canonical field names, schema refs, transport bindings).
- AssuranceLane: evidence bindings (which carriers exist, how to adjudicate
E-*claims, retention and access duties by reference).
SoTA tie‑in: This boundary is naturally understood using algebraic effects and handlers: the signature is the “operation interface” (effect signature), while the mechanism or realization provides handlers (semantics). The stack keeps the abstract operation signature stable while allowing multiple handlers and realizations to evolve.
Classification example:
- “Defined iff tokenValid” belongs in Quadrant A (admissibility gate).
- “Clients MUST include Idempotency‑Key” belongs in Quadrant D (role-assignment or acting-system obligation) but should reference the same gate semantics to avoid divergence.
- “System emits AuthorizationRecord” belongs in Quadrant E (evidence via carriers).
Last Updated: 2026-06-17 — upstream FPF commit 646b0b9b (github.com/ailev/FPF)