Two Hands on One Lever
Lesson one promised that Pippa operates and Dad overrides through the same rules. Here is how the code keeps that promise. Take the most ordinary write there is, changing a setting. Pippa can do it through the set_setting app action. Dad can do it on Oriel's page. Follow both down and they land on the same two lines: engine.prefs.set(key, value, actor), which validates and stores, and engine.store.note(actor, "setting", ...), which writes the activity row. The doors differ in how they decide who is pressing. They do not differ in what pressing does.
The engine's docstring states the rule in its first lines: Pippa is the operator, Dad sees and overrides, and "both go through these methods, so a rule holds whoever pressed the button". There is no admin back door into the SQLite store, no page route that writes a table directly, no tool script that edits desired.json on its own. Each of those would be a second rule set waiting to drift.
Pippa's Door: the Family App-Action Contract
Pippa does not call Oriel's routes like a web client. Every family app declares what Pippa may do through one shared contract from the family kit, and cwkPippa's single app door reaches all of them the same way. The contract is a root class with rules no app can forget, because the kit enforces them before the app's handler runs:
- R1, the caller. The door answers only a loopback caller that no proxy carried and no browser sent: no
X-Forwarded-For, noOrigin. A web page cannot reach it, even one served from the same Mac. - R2, the actor. The envelope names who acts (Pippa, which brain, which conversation, which surface), and the handler stamps that label on whatever it writes.
- R3, draft by default. An action others could see runs as a draft unless the envelope carries
publishand Dad's quoted instruction, which cwkPippa's door has already found in Dad's own recent message. An action with no draft form is refused without them. This is how the gate'sopen_eyesworks later: it is that kind of action. - R4, receipts in the app. Every call that passes the HTTP caller check and reaches the action's own rules, refused ones included, is appended to a receipts file in Oriel's own store, never in Pippa's conversation. A read polled every few seconds may declare that it records only changes: a repeat with the same outcome for the same caller writes no new line, and the next line that differs says how many repeats it stands for.
- R5, once. A create or send needs a request id; a replay answers the first result instead of writing again.
- R6, small answers. Summaries and data are bounded, because the answer lands in a model's context; a list that can grow is paged instead of cut.
Dad's Door: the Page and His Session
The page is a React build the engine serves. Any page route that changes something or opens an eye calls require_dad first, which asks the family's PIN authority whether this browser holds Dad's live session (the details are a whole lesson in track six). If it does, the write is stamped dad. If it does not, the route refuses with the reason.
One class of page press needs no session at all: the stops. Closing every eye, parking the cameras, stopping play, stopping a recording, switching to Manual. A stop can only make Oriel do less, so it is never made to wait on a sign-in that might have expired at the wrong moment. Even signed out, the page shows those buttons. That asymmetry, loosening needs proof and tightening needs none, is the same one the eyes gate is built on.
What the Activity Log Buys
Because every write goes through the engine, every write leaves the same kind of row: a time, an actor, a kind and its details. The page shows the newest of them. When a camera opened, who opened it and with which words; when a setting changed and to what; when a gate refused and why. Pippa's calls also leave the kit's receipts, so a question like "did Pippa really ask for that?" has two independent answers.
This is the practical meaning of "Dad overrides". An override is not only the power to change a value; it is knowing what was changed, by whom, and being able to change it back through the same rules. A system where the operator's writes are invisible to the overseer is not overseen.