Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

I5 · Forbidden actions are unrepresentable as transitions

planarian @ a924e09 · Spec v4.6 · snapshot main · all versions

Forbidden actions are unrepresentable as transitions; Decision::Reject is never converted to any tier by any setting.

— SPEC §7

StatusProof phased:aGym
ProvedA (proof)4 : 3 (baseline 4 : 3, not degraded)1 entry, 1 must-pass

How it is proved

4 obligations, in crates/policy/src/lib.rs, crates/policy/src/proofs.rs; every one is checked on every CI run.

ObligationKindWhat it guaranteesSource
decideverified fn(no doc comment)lib.rs:869
i5_autonomy_never_touches_rejectproof fnI5: the autonomy setting never turns a Reject into a tier or a tier into a Reject, never changes a Reject’s reason, never yields a tier above itself other than AskFirst, and raising it never makes a decision stricter.proofs.rs:73
unauthorized_is_refused_firstproof fnUnauthorized callers are refused before anything else is considered.proofs.rs:246
core_is_never_a_targetproof fnThe core is never a target.proofs.rs:255

What it rests on

If any of these is false, the proof no longer describes the real machine.

IdAssumptionKindAlso relied on by
V1vstd’s specifications of Vec, String::as_str, str::unicode_len, str::get_charProof-validityI10, I11, I16, I19, I21, I22
V2Value is an opaque external type (external_type_specification); nothing about it is assumedProof-validityI11, I16, I21
V3Serde impls are unverified (external_derive)Proof-validityI6, I14

Every proof also rests on V7 (The specifications the proofs prove against (decide_spec, step_spec, inv, chained, the lemma statements) say what the SPEC’s English means), V8 (Verus is sound: what it reports verified holds of the code), V9 (Z3, the solver Verus calls, is sound), V10 (rustc compiles the verified code to a program with the semantics Verus checked).

How it is tested

EntryHarnessWhat it doesExpectsLatest verdict
en-i5-reject-survives-every-settingfakeWith autonomy at its maximum, a change touching Planarian’s own unit is refused, not raised to a tier; with the setting changed and the change asked again, it is refused again. No setting turns the refusal into an approval to ask for.txn: ApplyChangefake: PASS

Known limits

BypassRouteSeverityStatusCloses in
X-1Root edits the store, /boot, the binaries, the journal or the posture stateAcceptedAcceptedE
X-2A nixos-rebuild outside PlanarianAcceptedAcceptedC
X-4Physical accessAcceptedAcceptedE
X-6The supply chain: nixpkgs content, cache signatures, input-addressed store pathsAcceptedAccepted—
X-7Backends report success falsely; systemd or the kernel misbehave (P1, P6, P8)AcceptedAcceptedD, E

History

SpecChange
v4Restored principles (now 12) and invariants (I1–I14) that v3 referenced but omitted

See also

planarian_policy in rustdoc · planarian_policy::proofs in rustdoc