Building Milhouse in public: from privacy contracts to durable storage #37
that1guy15
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Build Journal #2 — July 24, 2026
The short version
Since the last build journal, we completed and accepted G02, the gate that proves Milhouse's privacy-safe local logging contract is complete, deterministic, bounded, and fail-closed.
That sounds abstract, so here is the practical meaning: before Milhouse starts writing durable state, we now have a machine-checked answer to four important questions:
This was production code plus the evidence needed to trust it. It was not the durable storage layer itself. With G02 accepted, W03 is now unblocked, and Slice 1 begins the SQLite control-state foundation.
What we actually built
A fail-closed local logging boundary
Milhouse now treats local structured logging as an explicit egress surface. Data does not become safe merely because it stays on the same machine. The common privacy matrix must authorize it, and restricted data is rejected.
The stored event schema permits bounded operational metadata. It does not include prompts, transcripts, tool output, arbitrary exception messages, credentials, raw paths, or other uncontrolled content.
A complete, deterministic wire format
The local log format is now a versioned JSON Lines contract with:
That contract matters because W03 can now persist and recover logs without inventing a file format while implementing crash recovery.
Failure behavior that does not leak
The stream sink requires authorization before writing and handles complete writes. Hostile dependency failures—including iterator, timezone, and sink exceptions—are normalized to stable Milhouse error codes rather than passing arbitrary exception detail into logs or terminal output.
Evidence across processes and platforms
The test corpus locks golden bytes and checks determinism across processes, hash seeds, locales, time zones, supported Python versions, Ubuntu, and macOS. Adversarial tests exercise leak-prone values and failure paths. The G02 packet also enforces the project's 95% critical-branch coverage floor across its scoped files.
Why this took several pull requests
We intentionally split the work into small, independently reviewable slices:
The review loops found real architectural defects:
We fixed those issues instead of accepting ambiguous contracts. The resulting amendments did not weaken the privacy invariant. They assigned each concrete surface to the gate that actually owns it:
That distinction is a large part of what I was doing during the extended review: checking that the implementation, architecture plan, gate dependencies, tests, and public claims all described the same system.
Where the architecture stands
flowchart LR G01["G01 passed<br/>domain, identity, privacy"] --> G02["G02 passed<br/>safe deterministic local-log contract"] G02 --> S1["W03 Slice 1<br/>SQLite control-state foundation"] S1 --> W03["Later W03 slices<br/>durable spool, replay, recovery, retention"] W03 --> W04["W04+<br/>ClickHouse, runtime, CLI, feedback"]G02 is a safety and serialization layer. It gives the durable system a stable boundary to build on; it is not itself the durable system.
What Slice 1 means
Claude is now beginning the first W03 slice from the accepted G02 baseline. According to the public implementation plan, this slice establishes the SQLite control plane with:
SQLite is control state—not a dumping ground for raw provider bodies, prompts, transcripts, or arbitrary error text. Later W03 slices will add the segmented spool, ledger, replay, corruption recovery, leases, retention workflows, and crash/concurrency evidence.
Slice 1 is in progress and is not claimed as merged or complete in this update.
What is not built yet
G02 passing does not mean Milhouse is ready to install or operate. The project still needs, among other work:
Verifiable state
main:f6044f8The next update will show what the SQLite foundation actually delivers and which parts of G03 it makes testable.
All reactions