Home / Learn / 13 Limits on authority
13.8 Recap and reference
Page 9 of 9
13.8.1 For agents
una --json check . reports a broken condition as U5001, an effect_condition obligation with a counterexample and the condition as a related span. A weakened locked condition is U3023, a contract_lock obligation with a counterexample; an operation or binding the lock omits is U3023 with no obligation. una fix . restores a locked condition (U3023) and writes a caller's condition into a private callee of the same module (U5001 at a call); it never edits una.toml. U3020 carries an exact edit when the caller holds the binding and the grant narrowed to the operations the callee declares, with @x = @x[ops], lies within the ceiling; otherwise it carries a description, such as a handler whose own uses lie within the ceiling. U3021 carries a description and no edit: the narrowed grant to write when one lies within the ceiling, or that the consumer must choose between the module and its ceiling. U7002 carries no edit. The compact rule: in edition 0.3, an operation with where runs only where its condition holds; a header never grants more than its lock; a call into a boundary grants everything with with, within the ceiling.
13.8.2 Recap
- Conditions, boundaries and locks need
edition = "0.3", a preview; in edition0.2they are U0101 or U7002. PriceList[set_price where not dry_run]allowsset_priceonly wheredry_runis false; guard it withif not dry_run(U5001).- A call is checked as an operation is: the callee's header condition must imply the caller's.
[boundaries]gives a module and those below it a ceiling; calls into it grant withwith(U3020), within it (U3021).with @x = @y[ops]grants only the named operations, which the caller must hold (U3002); names only, and the caller's conditions still apply.[contracts]locks a public function'suses; its header may grant less, never more (U3023).una fix .restores a locked condition and writes thewitha call into a boundary lacks (U3020), and never editsuna.toml.- Test a dry run's result with a stand-in handler; the condition, which the verifier proves, keeps it from setting a price.
13.8.3 Reference
- Construct pages:
uses,capabilityandop,handler,with,where,test - Configuration:
[package] edition,[boundaries],una.toml - Commands:
una check,una fix,una test - Diagnostics: U0101, U3002, U3006, U3020, U3021, U3023, U5001, U7002
- Specification: capabilities and effects, verification, diagnostics, the command line and project files, grammar
Next:14 Testing