Home / Learn / 13 Limits on authority

Release v0.4.0Edition 0.2, 0.3

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 edition 0.2 they are U0101 or U7002.
  • PriceList[set_price where not dry_run] allows set_price only where dry_run is false; guard it with if 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 with with (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's uses; its header may grant less, never more (U3023).
  • una fix . restores a locked condition and writes the with a call into a boundary lacks (U3020), and never edits una.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

Next:14 Testing