Skip to main content
This tutorial demonstrates the OS-boundary contract of ns.governed_act(...): action_candidate → governance → act (or veto handling: terminate by default, or run.interrupt → run.checkpoint when pause-on-veto is enabled). Why this matters: you get a hard safety gate with a verifiable audit trail.

What you’ll build

  • Governed actions that emit action-candidate traces
  • A vetoed run with no act events
  • Artifacts that can be evaluated by trace-based scoring

Prerequisites

  • Python with noesis installed

Run the tutorial

uv run python -m tutorials.governed_side_effects

Notes

ns.governed_act(...) creates its own episode bundle through the same canonical runtime boundary as ns.solve(...). The tutorial locates the episode id by diffing runs_dir before and after each call.

Runtime outcomes and constraints

  • Default enforce veto (governance_pause_on_veto=false): action_candidate → governance → terminate (no act), and the run is sealed (final.json + manifest.json).
  • Pause-on-veto (governance_pause_on_veto=true): action_candidate → governance → run.interrupt → run.checkpoint (no act, no terminate), and the run remains unsealed until continuation.
  • Allow/audit paths emit action_candidate → governance → act and seal normally.

Source

The source file is located at examples/noesis-quickstart/tutorials/governed_side_effects.py.