B1.1 · The System Substrate — manuscript chapter 1.1
The law, executable.
The smallest faithful BCS system: a boundary gate that admits one namespace, a property store that owns its table outright, a supervisor that restarts stores independently. Built and transcript-proven in Elixir; designed in Go as the same shape in different ownership clothing.
The chapter is content/bcs1.1.md; the rung behind it is bcs1.1, and its committed
transcript closes PASS 6/6. Every figure on this module's pages is verbatim from that
output.
Three failures motivate it
content/bcs1.1.md · WhyThe reach-through
A risk engine that reads the position table directly works until the position system changes its representation — at which point risk breaks in a file the position team does not own. Every "optimization" that touches the table is an undesigned consistency protocol.
The traveling object
An order struct serialized across services forks the truth — the copy ages while the original moves — or, worse, a remote reference rebuilds distributed shared memory with none of its guarantees.
The silent join
A TXN id reaching the AST table compiles fine in untyped-id systems and
fails at runtime if the system is lucky — with cross-entity data if it is not.
The substrate exists to make all three impossible by construction rather than discouraged by review. The trading system this course builds makes each failure concrete.
The proof
content/bcs1.1.md · quoting bcs_rung_1_1_check.outThree modules and a proof: EchoData.Bcs is the boundary discipline,
EchoData.Bcs.PropertyStore owns one private ordered table, EchoData.Bcs.Supervisor
runs named stores one_for_one. The rung's check script attempts the architecture's canonical
crimes on stage; the committed transcript records each refusal:
G1 reach-through ok -- outside lookup -> ArgumentError, insert -> ArgumentError; info reports protection: :private (metadata visible, data refused) G2 traveling-object ok -- map/tuple/integer ids -> FunctionClauseError 3/3; inter-store message carried {:entity, id} only; :burned recorded BRL0NsHLqGoDbd G3 typed ok -- rejects 4/4 as :invalid; GRD id on BRL store -> {:error, :namespace}; raising twin -> NamespaceError G4 ordered ok -- page_desc(2000) == byte-sort desc over 2000 minted ids; store holds no clock G5 placed ok -- placement(USR0KHTOWnGLuC) -> 234878118 G6 canon ok -- self_check! -> {:ok, :native} (init gates on the same check) PASS 6/6
Each line is one attempted crime refused: the VM itself rejects outside data access on the private table while permitting metadata introspection; non-id shapes die in pattern matching before any store code runs; the wrong namespace is a typed refusal in both tuple and exception form; two thousand minted ids page newest-first from byte comparison alone; placement is the contract's arithmetic; and a store that cannot prove its codec refuses to start.
The dives
three lessons, fixed by the chapter specThe Six Gates
G1–G6, one refused crime each, read line by line from the transcript — and the gate itself, exercised over fixed candidates.
B1.1.2Ownership on the BEAM
The private table as a VM-enforced boundary; :ordered_set byte order as mint order;
self_check! at init; no second parser.
The Owner Goroutine
The Go design: a channel as the boundary, the gate at the receiving edge, a sorted key slice. Designed; lands as its own rung.
Reach for a property store when one system is the single writer of some state and chronology should come from the keys. When the question spans systems, that is a message over the bus — Part III's subject. When state must answer commands with new events, that is the decider's shape, and the manuscript plans Part VIII to rethink it on this substrate.
References
sources · relatedSources
- Erlang/OTP — the ets moduletable protection levels including private; ordered_set term order; prev/last traversal
- The Go Project — Share Memory By Communicatingthe owner-goroutine pattern; sequential access by construction
- Chassaing — Functional Event Sourcing Deciderthe decide/evolve pattern the manuscript plans Part VIII to rethink on BCS
Related
- B1 — Ideas Behindthe chapter landing; the Part I arc
- BCS — the course homethe law, the id anatomy, the chapter map
- EchoMQ — the coursemessages over the bus — Part III's subject, taught in depth
- Functional Programming in Elixirthe umbrella where echo_data lives