jonnify·bcs /bcs/elixir-core/relations/both-ends-gated

B2.5.2 · dive 2 of 3 · module B2.5

Both ends are gated.

link gates the subject against the subject namespace and the object against the object namespace before any write; reads gate the same way. The key is the pair the gate validates.

The subject and object each gated against their namespace; the tuple key formed only after both pass. Select a part.
subjectBcs.gate(s, subject_ns) objectBcs.gate(o, object_ns) key {subject, object}insert fwd + rev wrong namespace at either end: refused
readout · Select a part. link gates the subject (subject_ns) and the object (object_ns) before writing; props, from, to, and degree gate the same way; the key is formed after both pass.
§1

The idea

echo_data · bcs/edge_store.ex

Every door into an edge checks both ends. A store is created for a relation between two namespaces — a subject namespace and an object namespace — and link gates the subject against the first and the object against the second before it writes anything. An endpoint of the wrong namespace is refused at the door, so a malformed edge is never stored and found wrong later.

The gate is the single point of admission. Only once both ends pass does the store form the {subject, object} key and write the row in both directions; reads gate the same way, so props, from, to, and degree all refuse a wrong-namespace argument before they touch a table. The boundary B2.6 will name in full is already standing at every entry here.

Codemojex relies on this to keep its graphs sound. A player-in-room edge gates a PLR id as the subject and a ROM id as the object; a stray id from another namespace cannot slip into the membership graph, because the store rejects it before the write. The type of each end is enforced at the relation’s edge, not hoped for.

§4

The doors

the sibling courses
§2

References

sources · related

Sources

Related