jonnify·bcs /bcs/elixir-core/property-stores/the-only-key

B2.2 · dive 1 — the only key

The branded form is the only key.

Three stores under one tree hold the desk's rows — AST instruments, PRT balances, ORD orders — and every key in every table is the 14-byte branded form. The same snowflake rendered as a decimal string is refused at the boundary: :invalid, on read and on write.

Source: content/bcs2.2.md, quoting bcs_rung_2_2_check.out (lines boot, P1, P2); the store is property_store.ex.

The database shape. One tree, three boundaries. Select a store to read what lives behind it.
one tree three named stores ast_store admits AST instruments prt_store admits PRT balances ord_store admits ORD orders
readout · Select a store to read what lives behind its boundary. The three-store tree is the template a fourth store joins by adding one {name, namespace} pair.
§1

The transcript

bcs_rung_2_2_check.out · lines boot, P1–P2 · verbatim
content/echo_data/runtimes/elixir/bcs_rung_2_2_check.out · lines boot, P1–P2frozen
boot: three system tables under one tree -- AST instruments, PRT balances, ORD orders
P1 shape ok -- instrument and balance rows live behind their own boundaries; values are private representations
P2 key ok -- the branded form is the only key: the same snowflake's decimal rendering refused as :invalid

P1 boots the three stores and writes domain rows behind their own boundaries — an instrument with its tick size, a balance with its cash — and the gate line states the part's quiet rule: values are private representations. P2 takes the instrument's own snowflake, renders it as the 19-digit decimal, and offers it back — refused as :invalid, on both read and write.

§2

The third door closed

content/bcs2.2.md · What

The key law is now enforced at every layer the series has measured:

DOOR 1 · STORAGE

Chapter 1.3

The store charges more for the decimal — the keyspace economics measured against the branded form.

DOOR 2 · CPU

Appendix 1.1

Every compiled runtime renders the decimal slower — the encode trial's verdict across the runtimes.

DOOR 3 · INGRESS

This chapter

The boundary refuses it outright — :invalid, on read and on write, before the table is touched.

§3

The same name, two renderings

contract.md vectors · property_store.ex gate path

The contract's canonical vector binds the pair: encode("USR", 274557032793636864) = "USR0KHTOWnGLuC" — one snowflake, two renderings. The model below presents both, on both verbs, to a store admitting USR, through the same gate path the real store runs — the get and put callbacks both pass the id through Bcs.gate(id, s.ns) before the table is touched.

Two renderings at the boundary. Select a call; the readout names the verdict.
readout · Select a call. Static verdicts: the branded form is admitted on both verbs; the decimal rendering — 18 characters, not 14 — is {:error, :invalid} on both, and the table is never touched. The verb does not matter: the gate runs before lookup and before insert.
§4

The label on the interim

content/bcs2.2.md · Decisions

The interim representation is declared. The balance's embedded positions map ships labeled as pre-relational, with its supersession chapter named — drift is a representation that outlived its label, and this one cannot. Keep entity-embedded maps only while the pairs they encode have no traversal needs of their own; the moment who holds this asset becomes a question, the pair is a relation, and Chapter 2.5 owns it.

Saying the supersession in advance is what keeps it an amendment rather than a surprise — the same discipline the review dive reads on the export surface.

§5

References

sources · related

Sources

Related