Approval policy
Included from Basic tier
An approval policy is one row of the change-governance matrix: which node
paths and actions it covers (plus optional metadata predicates), who approves,
how many approvals are needed, and the deadlines and extra requirements that
ride along. At create time every matched, enabled policy freezes into one
line of the subject's approval checklist. Served by the v2
ChangeGovernanceService: ListApprovalPolicies, GetApprovalPolicy,
CreateApprovalPolicy, UpdateApprovalPolicy and DeleteApprovalPolicy,
with writes delegated by scope_path.
ApprovalPolicy
ApprovalPolicy is one matrix row of the model.
| Field | Type | Meaning |
|---|---|---|
action_patterns | array of string | Action-name globs; empty covers every action. |
approval_validity_seconds | integer/string | The approval validity (default 14 days), clocked from checklist completion; a lapse voids the approvals and re-gates the subject. |
approvers | ApprovalApprovers | Who may approve covered subjects: named users (stored and matched as principal ids — a write accepts a principal id, a username one account holds, or <provider>:<username>), groups, or resolution kinds such as impacted_asset_owners. |
authorisations | EstateAuthorisations | The caller's update/delete standing on the policy's own /governance/change |
created_at | timestamp | When the record was created. |
created_by | string | Username of the creating identity. |
enabled | boolean | Whether the record is enabled. |
id | string | The record's identity. |
metadata_predicates | array of ApprovalMetadataPredicate | Metadata predicates AND-composed with the path and action match. |
name | string | Display name. |
path_pattern | string | The node paths the policy covers, e.g. /projects/x/environments/prod/**. |
quorum | integer | Distinct approving identities required (default 1). |
quorum_ttl_seconds | integer/string | The quorum TTL (default 7 days): a pending request expires into rejected when the effective TTL — the smallest across the matched lines — lapses. |
require_change_record | boolean | A run the policy's path, actions and predicates cover is refused at creation unless it joins an approved change record — named, inherited or by scope — whatever subjects the policy holds (opschain docs change-governance, "Change records"). |
require_change_reference | boolean | A typed external reference must be present at approval (on a change record's checklist, a reference on the record itself). |
require_step_up | boolean | Executing a matched create requires an elevated session before any approval gate is evaluated (customer policy only ever ADDS step-up — platform floors stay the un-relaxable minimum). |
require_window | boolean | Covered subjects start only inside an open admitting maintenance window. |
scope_path | string | The delegation scope the policy belongs to ('' = global): writes require the change-governance determination on /governance/change |
self_approval | boolean | Default false: neither the requester's nor the change owner's approval ever counts. |
strict | boolean | A strict line is never subsumed by run-level satisfaction. |
subjects | array of string | What the policy holds: change, workflow, change_record and manual_step. Empty holds runs — changes and workflow runs, the shape of every policy written before change records; change_record opts the policy into holding a change record's move to approved behind its checklist (the record's scope must reach path_pattern); manual_step lets a manual step name the policy (approval: <name>) and holds the step when the run reaches it, if path_pattern and the metadata predicates admit the run's target — action_patterns are not consulted, and a policy listing only manual_step holds no run (opschain docs change-governance, "Holding a manual step"). A policy holding change_record cannot set require_window — it is refused by name: require_window is a run condition, and a change record's window is its own. The PostgreSQL store only, like every approval policy. |
updated_at | timestamp | When the record was last updated. |
ApprovalMetadataPredicate
ApprovalMetadataPredicate is one metadata conjunct in the shared selector grammar (evaluated against effective node metadata).
| Field | Type | Meaning |
|---|---|---|
field | string | The field key, |
op | string | "eq" | "in" | "true" | "false" | "unclassified" | "before" | "after" | "elapsed" (the date ops compare ISO-8601 YYYY-MM-DD values). |
values | array of string | The comparison values: exactly one for eq, before, after (the date ops take an ISO-8601 YYYY-MM-DD date), one or more for in; true, false, unclassified and elapsed take none. |
PolicyCoverageEntry
One approval policy carrying require_change_record that covers a path, as
GovernanceService.GetPolicyCoverage answers it: whether a run on a node
path (or a workflow path, tested at the workflow's effective target) must
name an approved change record, decided by the compiled policy matcher in
memory — the policies' path and action patterns and metadata predicates,
never a node's name. The response's requires_change_record is true while
a covering policy applies (every one while packs:change-governance holds,
the strict ones after it lapses); approval_policies_available is false on
the SQLite store, which holds no policies. Read on the node, 404-on-deny.
opschain mcp serve --as-agent reads it before every run it creates
(opschain docs integrations-mcp).
| Field | Type | Meaning |
|---|---|---|
id | string | The policy's id. |
name | string | The policy's name, as a refusal quotes it. |
strict | boolean | A strict policy keeps requiring the record after the change-governance entitlement lapses. |
What settings change this
Node-settings requires_approval_from entries are the retired run-level
approvers lane (see opschain docs settings). They are convertible into
approval policies with opschain approval-policies convert-settings-approvers
(ChangeGovernanceService.ConvertSettingsApprovers); the step-level
requires_approval_from: wait gate inside composed-action YAML is a separate
mechanism and stays as authored.
Related pages
opschain docs change-governance— the matrix, matching and delegation model these rows feed.opschain docs resources/approval— the checklist a matched policy's line lands on.opschain docs metadata— the effective node metadata the predicates evaluate against.opschain docs change-governance— the component page, including thepacks:change-governanceentitlement that enforces the funnel.