> ## Documentation Index
> Fetch the complete documentation index at: https://noesis-32c1d602-cursor-technical-documentation-improvements.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Governed Side Effects: Action Candidates + Veto

> Use ns.governed_act to enforce governance at the side-effect boundary.

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

```bash theme={null}
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`.
