Expand description
Planarian policy (SPEC §11): one pure function from a transition and the
facts the executor derived to a Decision.
decide has no Proposal parameter, so nothing a proposer writes can
reach it except the transition itself (I14). Its order:
- authorization (§11 caller identity and capabilities),
- hard rejections (core target, catalog, locked option, allowlists),
- the per-transition table, then the global floors (including the security floor, which asks an administrator: I16),
- cumulative-session classification (I11),
- the autonomy setting, which can only raise a tier to AskFirst and never
touches a
Reject(I5).
Verified with Verus (SPEC §17a): decide is proved equal to decide_spec,
and the properties are proved about decide_spec in proofs. Sets of
names are vectors searched linearly, because vstd specifies BTreeSet only
for key types with an ordering spec, which String lacks
(docs/deviations.md). Run: cargo verus verify -p planarian-policy.
Modules§
- proofs
- The properties SPEC §7 and §17a ask of
decide, proved aboutdecide_spec;decideis proved equal to it (itsensures).
Structs§
- Input
- Everything
decidereads. - Settings
- Owner settings (not manifest options, not proposal fields).
- Tables
- Shipped tables. Hashed into
PolicyVersion.
Constants§
- POLICY_
REVISION - Bumped by hand whenever the decision logic changes; part of
PolicyVersion.
Functions§
- admin_
if_ 🔒exec - allow_
exec 🔒 - any_
locked - any_
non_ routine - ask_
if_ 🔒exec - authorization_
of - The authorization of a non-user actor: no capabilities (§11).
- authorized
- base_
tier 🔒 - contains_
change - contains_
model - contains_
str - decide
- floors 🔒
- gen_eq 🔒
- is_
admin_ 🔒exec - is_
administrator - is_
local_ 🔒exec - is_
under - is_
user_ 🔒exec - may_
approve - may_
grant - override_
exec 🔒 - own_
session_ 🔒exec - policy_
version - sec_
or_ 🔒ext_ exec - str_eq 🔒
- unit_
ok_ 🔒exec - user_
authorization - Phase A’s capability grants (§11): every user acts on their own scope and
the user-controllable units; root and
planarian-adminmembers are administrators and approvers. I17 holds because root always is (is_administrator; the proof isproofs::i17_administrators_never_empty). - vetted_
exec 🔒