14 · Only a log, views and caches
Babb2026-11-23. Six questions in sequence, which together produced the architecture.
1. Can registers and price tables be logs too? Can we avoid having other files?
Yes. Almost everything can be an entry, and that strengthens the system, because each declaration, price and permission then has a time, an author and a history.
babb-table/1 [["Today a separate file", "As entries", "What you gain"], ["Register", "CREATE, BIND, AMEND", "What a thing was called, and what it belonged to, at the time of any act"], ["Price tables and tariffs", "Price declarations with an effective-from time", "\"What price applied at T?\"; repricing without overwriting"], ["Grants", "GRANT, REVOKE, DELEGATE", "Authority becomes replayable"], ["Clocks and sessions", "Session-open entries", "Clock provenance inside the record it qualifies"], ["Budgets and commitments", "Allotment postings; schedule and agreement entries", "Plan against actual from one history"], ["Codebook extensions", "Declarations, versioned", "Every entry is read by the rules of its time"], ["View rules", "A declaration naming the method version and code hash", "Exact reproducibility"]] Today a separate file | As entries | What you gain Register | CREATE, BIND, AMEND | What a thing was called, and what it belonged to, at the time of any act Price tables and tariffs | Price declarations with an effective-from time | "What price applied at T?"; repricing without overwriting Grants | GRANT, REVOKE, DELEGATE | Authority becomes replayable Clocks and sessions | Session-open entries | Clock provenance inside the record it qualifies Budgets and commitments | Allotment postings; schedule and agreement entries | Plan against actual from one history Codebook extensions | Declarations, versioned | Every entry is read by the rules of its time View rules | A declaration naming the method version and code hash | Exact reproducibility
What can't move into the log:
- a tiny fixed kernel, because something must say how to read the first entry;
- large evidence, stored by hash and referenced from entries;
- caches and indexes;
- software itself, though its version and hash are logged.
Everything is an entry, except the kernel, content stored by hash, and disposable caches. Nothing outside the log is both changeable and authoritative.
2. So we are down to log, views and caches
babb-table/1 [["Part", "Role", "If it's lost"], ["Log", "What is true", "Everything is lost. Protect and replicate it."], ["Views", "How to read it", "Rewrite them; the log records which version produced each result"], ["Caches", "How to read it fast", "Rebuild them"]] Part | Role | If it's lost Log | What is true | Everything is lost. Protect and replicate it. Views | How to read it | Rewrite them; the log records which version produced each result Caches | How to read it fast | Rebuild them
The kernel sits under the log as its alphabet. Content stored by hash is part of the log by reference.
3. Kernel design
The smallest fixed set of rules that lets anyone read a log from its first entry:
- the entry grammar and primitive types;
- the canonical byte form, so hashes are stable;
- the hash and seal rule;
- two core rules: append-only, and validity traced to genesis authority;
- the interpretation rule: an entry is read under the declarations in force at its position;
- eight bootstrap verbs:
babb-table/1 [["Verb", "Code", "Meaning"], ["CREATE", "0x0C", "declare a thing"], ["BIND", "0x0D", "attach one thing to another (a pack to the log)"], ["GRANT", "0x08", "give authority"], ["REVOKE", "0x09", "withdraw it"], ["AMEND", "0x16", "supersede an entry, which stays"], ["OPEN", "0x10", "begin a segment or session"], ["COMMIT", "0x15", "seal a segment, or close a period"], ["ACK", "0x1A", "receipt; a rejection is an ACK carrying a refusal"]] Verb | Code | Meaning CREATE | 0x0C | declare a thing BIND | 0x0D | attach one thing to another (a pack to the log) GRANT | 0x08 | give authority REVOKE | 0x09 | withdraw it AMEND | 0x16 | supersede an entry, which stays OPEN | 0x10 | begin a segment or session COMMIT | 0x15 | seal a segment, or close a period ACK | 0x1A | receipt; a rejection is an ACK carrying a refusal
The other 56 verbs are themselves declared by CREATE entries.
The size test: it should fit on one page, and a competent programmer should be able to write a validating reader from it in an afternoon.
4. How is the kernel turned into something? A first log entry?
It isn't an entry: you need it to read entries. It becomes three things:
- A descriptor. A few-kilobyte file whose hash is the kernel's identity. It travels with the log.
- A preamble. The log's first line,
STREAM/1 kernel=sha256:…, the only thing in the system that never changes form. - Genesis. The first true entry, written under that kernel. It fixes the log's identity, its root authority and its first clock.
Also around it: reference readers (software), and conformance logs that every implementation must judge the same way.
Kernel changes happen by AMEND from root authority, taking effect at the next segment. Old segments stay under their own kernel.
The kernel is named by the first line and put to use in the first entry.
5. How is the system set up with a large opening set of definitions?
Packs. A pack is a bundle of declarations (units, accounts, pools, profiles, prices, views), stored by hash and adopted with one entry:
BIND pack:<hash> to log name=farm-basics@1 author=<actor> sig=<signature>
What one entry gives:
- atomic: the whole setup is adopted, or none of it;
- compact: one line for hundreds of declarations;
- shareable: the same hash means the same thing in every log;
- traceable: who adopted what, and when.
How packs relate:
- They stack: standard verbs → domain packs → the organisation's own.
- Overrides are explicit AMENDs.
- Conflicting definitions are refused at adoption.
- Upgrades adopt @2; history stays readable under @1.
Software composed from the log. When packs declare views, the application is declared data:
- entry forms come from verb payload layouts;
- menus come from the Register;
- screens come from views;
- what each person sees comes from grants.
A view declares its inputs. If they aren't declared in the log, it shows as unavailable and never shows a wrong number.
6. How would recording a view to the log work?
babb-table/1 [["What", "How", "When"], ["A view's definition", "CREATE (new version: AMEND) with inputs, parameters, method and runtime hashes, output shape, presentation", "when introduced, often in a pack"], ["A view's result", "Not recorded; computed or cached", "every read"], ["A published result", "ESTIMATE (or COMMIT for a period figure), naming view, θ and upto address, with a result hash", "when someone relies on it"], ["A decision that used it", "An ordinary entry with basis pointing at the published result", "when the decision is made"]] What | How | When A view's definition | CREATE (new version: AMEND) with inputs, parameters, method and runtime hashes, output shape, presentation | when introduced, often in a pack A view's result | Not recorded; computed or cached | every read A published result | ESTIMATE (or COMMIT for a period figure), naming view, θ and upto address, with a result hash | when someone relies on it A decision that used it | An ordinary entry with basis pointing at the published result | when the decision is made
Purity is the condition: no clock, no randomness, no network. A result then has an exact identity, view(hash) with θ over the log up to address A, which is also its cache key. A small declarative view language was recommended for the common cases, with code as the exception.
Recording decisions with their basis closes the loop the system exists for. The log holds what happened, what was known when it was decided, how that was computed, and who acted.