R1 · Lan vs Ran
Lan
Ran
definition
categorical
Lan answers: given the certificate, build the most generous semantics. Ran answers: what meaning is forced.
Why Ran matters in dynamics
In ergodic settings, the invariant semantics carries the almost-sure structure.
R2 · Join is finite semantics
example
Lan
algebraic
A finite state is a finite join; merge is a bounded colimit over updates.
Fold encoding
Each update corresponds to a join; the sequence folds into a single state.
R3 · Log completion
definition
Ran
operational
The working space is a log with causal order. Completion means all ops are applied once.
R4 · Control plane
plate
schema
structural
Plate DSL
{:dosa/id "crdt/pulpit" :syntax "lambda-merge" :state "join-semilattice" :lan "expand" :ran "filter"}
R5 · Adjunction as control
adjunction
guide
categorical
Lan is the free expansion; Ran is the conservative projection. Use this as a UI switch: expand vs filter.
R6 · Merge law echo
crdt
consistency
operational
Idempotent, commutative merges ensure that repeated observations converge to the same certificate.
R7 · Type-checked merge
type
invariant
type
Require merge to be monotone and inflationary at the type level. Reject any delta lacking proof.
R8 · Causal delivery gate
structure
guard
structural
Do not apply op_b until all causal predecessors are present. The log is a dependency graph, not a queue.
R9 · Counterexample: missing deps
counterexample
counterexample
If op_b applies before op_a and depends on it, replicas diverge even if ops commute locally.
P1 · Build graph (surface)
architecturesurface
A page is a build graph: nodes are assets, edges are dependencies, output is a fixed artifact.
P1 · Build graph (structural)
structurestructural
DAG schema with content-addressed nodes; topological order defines legal builds.
P1 · Build graph (algebraic)
algebraalgebraic
Partial order + join of caches; invalidation is a monotone map on build states.
P1 · Build graph (operational)
opsoperational
Topo build, cache hits, partial rebuilds, artifact pinning.
P1 · Build graph (categorical)
categorycategorical
Functor from dependency category to artifacts; colimits model bundling.
P1 · Build graph (type)
typetype
Typed manifests and schema validation prevent illegal edges.
P1 · Build graph (counterexample)
counterexamplecounterexample
Cyclic dependency breaks topo order; build stalls or corrupts outputs.
P2 · Dataflow (surface)
systemssurface
The page is a stream: inputs flow to renders with latency and backpressure.
P2 · Dataflow (structural)
structurestructural
Operators, windows, and sinks form a pipeline; each edge has capacity and policy.
P2 · Dataflow (algebraic)
algebraalgebraic
Streams compose via monoids/semirings; windows are folds over time.
P2 · Dataflow (operational)
opsoperational
Backpressure, buffering, debounce, batch flushes.
P2 · Dataflow (categorical)
categorycategorical
Coalgebra for streams; morphisms preserve temporal structure.
P2 · Dataflow (type)
typetype
Types encode time and rate; prevent mismatched window joins.
P2 · Dataflow (counterexample)
counterexamplecounterexample
Unbounded buffers lead to memory blowups and stale renders.
P3 · Consistency (surface)
crdtsurface
Replicas converge without central control when merges respect lattice laws.
P3 · Consistency (structural)
structurestructural
State + causal metadata form the merge schema; deltas are partial joins.
P3 · Consistency (algebraic)
algebraalgebraic
Join-semilattice + idempotence guarantee convergence.
P3 · Consistency (operational)
opsoperational
Delta sync, gossip, and causal gates.
P3 · Consistency (categorical)
categorycategorical
Replica states form a diagram; merge is a colimit.
P3 · Consistency (type)
typetype
Refinement types enforce inflation and monotonicity.
P3 · Consistency (counterexample)
counterexamplecounterexample
Non-idempotent merge diverges under retries.
P4 · Security (surface)
policysurface
Only authorized artifacts may affect the page.
P4 · Security (structural)
structurestructural
Capability graph defines who can mutate which assets.
P4 · Security (algebraic)
algebraalgebraic
Privileges form a lattice; least privilege is a meet.
P4 · Security (operational)
opsoperational
Verify signatures, validate manifests, enforce allowlists.
P4 · Security (categorical)
categorycategorical
Galois connection between actions and permissions.
P4 · Security (type)
typetype
Proof-carrying artifacts encode authority in types.
P4 · Security (counterexample)
counterexamplecounterexample
Ambient authority lets unsigned changes ship.
P5 · UX control (surface)
designsurface
The page reveals complexity in stages, not all at once.
P5 · UX control (structural)
structurestructural
Layout state machine controls which panels are active.
P5 · UX control (algebraic)
algebraalgebraic
Attention budget is a constraint system on visible entropy.
P5 · UX control (operational)
opsoperational
Progressive disclosure, focus+context, reduced motion.
P5 · UX control (categorical)
categorycategorical
Lenses focus UI state; traversals animate consistent updates.
P5 · UX control (type)
typetype
Accessibility constraints are type-level obligations.
P5 · UX control (counterexample)
counterexamplecounterexample
Two high-entropy panels compete; attention collapses and errors rise.
P6 · Observability (surface)
tracesurface
Traces tell you what the page actually did, not what you intended.
P6 · Observability (structural)
structurestructural
Event schema with spans, ids, and invariant fields.
P6 · Observability (algebraic)
algebraalgebraic
Event monoid enables foldable summaries and queries.
P6 · Observability (operational)
opsoperational
Sampling, buffering, export, replay.
P6 · Observability (categorical)
categorycategorical
Natural transformation from UI state to logs.
P6 · Observability (type)
typetype
Typed traces prevent missing fields and broken queries.
P6 · Observability (counterexample)
counterexamplecounterexample
Uncorrelated logs cannot reconstruct causality.
P7 · Deployment (surface)
opssurface
A page becomes real only when the artifact is published and probed.
P7 · Deployment (structural)
structurestructural
Pipeline stages: build, package, publish, verify, roll back.
P7 · Deployment (algebraic)
algebraalgebraic
Content hashes define identity; equality is hash equality.
P7 · Deployment (operational)
opsoperational
Health probes, rollbacks, and fast revert policies.
P7 · Deployment (categorical)
categorycategorical
Functor from source category to runtime artifacts preserves provenance.
P7 · Deployment (type)
typetype
Signed manifests are typed obligations for what is live.
P7 · Deployment (counterexample)
counterexamplecounterexample
Mutable artifacts without provenance break rollback guarantees.