Repository navigation
Settle how cead is built: spec, skeleton, fill - #10
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
|
5 tasks
1zeroone0
marked this pull request as ready for review
September 28, 2026 02:12
5 tasks done
1zeroone0
added a commit
that referenced
this pull request
Sep 29, 2026
Specify cead as a system in TLA+, confidential-first. The first practice of the method settled in #10. ## What this PR does - `spec/cead.tla`: the whole system, coarse, in three layers. One protocol, two modes that differ only in who guarantees its assumptions: **attested**, where the processor proves them, and **trusted-host**, where they are asserted. The modes are also a measured comparison of what attestation costs, not a claim that it is safer. - **Layer 1: a boot, its records and the log.** A boot's first record is its report, binding its key to the manifest's measurement; nothing runs until the log holds it. Each call is an intent, acknowledged by the log before policy decides, then a decision and, if allowed, a witness. The boot ends with a signed exit record. The log keeps a record only if the processor or a vouched key signed it, first-wins per place in the boot's hash chain. The host is a Dolev–Yao network: it can lose, delay, replay and forge, and sign only as itself. - **Layer 2: snapshot, fork and recovery.** A snapshot is taken between calls, once the log holds every record. A boot from one makes a new key; its report names the snapshot. A fork starts a new job; a recovery continues one whose boot is unknown, at most once, and **fences** it: the log keeps none of that boot's records after. - **Layer 3: sub-agents, processors and meters,** inside one boot. `agent` spawns a child process with rights ⊆ its parent's, depth − 1 and a capped meter; every call charges each meter up to the root (KeyKOS). A process ends when the model replies without a command; its live descendants are killed. Revocation is `kill`, reaching only descendants (a PID namespace per spawn). The model's processors are virtual: `Dispatch` gives a ready process one. - Assumptions in the header, each with its guarantor per mode: `KeySecret`, `KeyBound`, `SnapshotSealed`, `Descendants`; availability is the host's and the scheduler's. - README rewritten as a whiteboard of what cead is and how it works: scannable, no status or placeholders to drift; uses, evaluations and unproven ideas live in Horizon. - Vocabulary re-levelled around the spec: **boot**, **report**, **record** (Linux audit's unit: report, intent, decision, witness, exit), fork and recovery and fencing inside **snapshot**; one call, **`agent`**, since agent delegation's in-distribution form is a semantics shell job control already carries. - Order of work after this PR: the harness in a confidential Cloud Hypervisor machine (the loop, unattested first); then, concurrently, the confidential research questions and trusted-host mode on Firecracker and Virtualization.framework (Horizon #7). - Horizon #7 re-cut: every comment names its slice of the spec. ## What this PR does not do - Rust or Lean. - Inference as evidence, which is phase two (Horizon: one memory hierarchy): the engine's chain, and a record of inference outside the machine joined to the log by call id. The spec includes the model's processor, not its evidence. - Prove what the engine produced: the log proves what the machine received. Hosted APIs cannot honor job-scoped tokens, so a gateway on the host holds the real key and ends TLS; the model's words there are as trustworthy as that gateway. - Answer the research questions. The spec states what attested snapshot and fork must guarantee; hardware says whether they can. - Liveness beyond "every boot ends": no fairness on `Dispatch`, so starvation is the scheduler's (trusted for availability only). - Policy that depends on state; `Policy` is a constant (Horizon: policy). ## Merge requirements - [x] TLC green; each commit line records the tools version and bounds. - [x] Every property has a mutation that TLC catches. - [x] Assumptions named in the spec's header, each with its guarantor per mode. - [x] Names come from CODE.md's vocabulary. - [x] Horizon re-cut against the spec. ## Record - TLC 2.19. Committed: `cead.cfg` (2 commands, 1 denied, 1 call, 2 boots) 437,752 distinct states, 30 s; `tree.cfg` (2 processes, depth 1, 2 calls) 783,076, 44 s. 26 mutations, all caught, two needing 3 boots or 3 processes. - Receipt runs: the full spec at 2 calls, 2 boots (meter not binding), 19,188,532 states, 40m48s, green; layer 2 at 1 call, 3 boots, one command, 19,482,379 states, 46m43s, green; the tree at 3 processes, depth 2, stopped past 11M states, no violation. - Findings the model produced: fencing (a late exit record would give a job two outcomes); records stay in transit once sent (loss as removal made TLC enumerate every subset; deleting `Lose` and `Resend` cut the smallest bound from 10+ min to 5 s); Linux cannot revoke a running child's rights (revocation is `kill`, no membrane). - Unmeasured commitments: a round trip to the log before the first call and per call, a signature and hash per record, re-keying per fork, boots lost to fencing. Each is a measurement in the loop or stats (Horizon). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Settles how cead is built before the first code, from scoping the first PR (the old loop PR, whose intent is now a Horizon comment on #7).
spec/cead.tla) comes first and is revisable: when code disagrees, the spec changes in that PR. A moved signature is learning, stated in the commit comment; a new capability is drift.todo!,unimplemented!,unwrap,expect,#[ignore]) are the frontier, zero at merge.unreachable!()and#[expect(lint, reason)]are claims review reads.#[allow]is denied. Frontier lints warn, so a draft compiles andcargo clippy --all-targets -- -D warningsfails until filled. Tests unwrap throughclippy.toml, not attributes. The toolchain pins clippy.gh landnow keeps each PR's comment thread as a git note inrefs/notes/pr(backfilled for Refresh cead's assets: Irish accents, feathered Ogham mark, SVG lockups #3, Name cead's userspace and its three ways to fan out #4, Make PR comments state their next step and feed the description #6). The one-measurement-per-milestone line is removed: "a system that can disagree with us" already says it.done→finish.doneis a POSIX shell keyword (bash -c 'done x'is a syntax error), so the call could never run.finishis process-shaped: like gdb's, it returns a frame's value to its caller.What this PR does not do
initial-specis next (Horizon).initial-spec.gh landitself in the repo; it lives outside it.Merge requirements
cargo clippy --all-targets -- -D warningsgreen on the empty crate with the new lints.🤖 Generated with Claude Code