Change governance — the approval-policy funnel
packs:change-governance
The packs:change-governance pack's model: CAB-style approvals as policy, not authoring. A change
manager imposes approval on a path; no workflow author can code around it.
The API surface is ChangeGovernanceService (see opschain docs api-v2);
every event the funnel emits is catalogued on opschain docs events; the
per-RPC determination × pack × step-up table is opschain docs governance-matrix. Hands-on guides: opschain learn governance-approvals and opschain learn governance-asset-owners.
Approval policies (the matrix)
An ApprovalPolicy is one matrix row: path_pattern (node paths it
covers — a trailing /** covers the named node and its subtree on segment
boundaries), optional action_patterns (name globs; empty covers every
action), optional metadata_predicates (the shared selector
grammar, evaluated against effective node metadata — a predicate-carrying
policy matches nothing without a classification, the fail-closed posture),
approvers (named users and groups, and/or the kinds resolution
families — impacted_asset_owners, resolved per
change; a policy must carry at least one source — named users are
stored and matched as principal ids: a write accepts a principal id,
a username exactly one account holds, or <provider>:<username>
(local:sam, ldap:corp:sam) and refuses a username several accounts
hold until qualified, so a same-named account of another provider is
never an approver by name), integer quorum
counting distinct identities,
self_approval (default false: neither the requester's nor the change
owner's approval ever counts), strict (never subsumed; refuses covered
creates on entitlement lapse), require_window (covered subjects start
only inside an open admitting maintenance window), require_step_up (a
matched create demands an elevated session before any
approval gate is evaluated — customer policy only ever ADDS step-up over
the platform floors), require_change_reference, the two clocks
(quorum TTL default 7d, approval validity default 14d), subjects — what
the policy holds: change, workflow, change_record and manual_step,
where a policy naming none holds changes and workflow runs (every policy
written before change records) and change_record and manual_step are
opt-in (see Holding a manual step) — and
require_change_record, the condition that refuses a covered run joining
no approved change record (see Change records).
Policy reads are open to any authenticated caller behind the pack
(the funnel explains itself: the rules that
hold a change are never a secret — maintenance-window listing follows the
same principle). ListApprovalPolicies/GetApprovalPolicy carry an
authorisations block reporting the caller's authoring standing (the
list's on the root scope, each row's on its own scope), so read-only
surfaces can drop their edit affordances honestly.
Policy writes require the delegable change-governance determination —
updatable on /governance/change<scope>, an ordinary path-RBAC grant on
the reserved rule-path family (a role grant with project
delegation) — plus a stepped-up session (the policy-write
floor). The compiled policy matcher is precompiled and
write-invalidated (the authz-snapshot shape), so the create funnel never
parses patterns per create.
Approver lines and owner declarations written before user entries moved
to principal ids keep admitting by username through a dual-read window;
each approve or reject admitted that way records
warn:identity:username_match naming the line, and
opschain admin identity convert-username-subjects rewrites every
stored username (policies, owner declarations, open checklists' frozen
lines, transport grants) to the principal id — refusing a username
several accounts hold until it is qualified — after which the window is
inert. The requester, the approval rows and the finaliser compare by
principal id too; the change owner is the username-valued governance
field and compares as such.
Impacted asset owners
Ownership is an authz-shaped fact declared per subtree on the policy
fabric: an asset owner declaration names a subtree root and its owner
identities (users and groups). A declaration covers its node and whole
subtree on segment boundaries, the deepest covering declaration wins
(inheritance), and the subtree is immutable once declared — move
ownership by delete + create so the audit trail shows the handover.
Declaring is delegable exactly like the metadata-writer role: writes are
decided updatable on the reserved /governance/owners<node path>
rule-path family (plus the step-up floor) and audited; reads ride
readable on the same family, 404-on-deny.
A policy carrying the impacted_asset_owners approver kind resolves
these declarations at the create funnel, over the units the policy itself
matched in the frozen target set: each impacted target resolves to its
covering declaration, and the checklist gains one all-of line per
resolved owner — quorum 1 per line, every owner line must satisfy
(distinct from the per-line n-of-m quorum), with the resolved subtree
root frozen onto the line (owner_path). Self-approval exclusion and
distinct-identity counting apply per owner line, so an owner who
requested the change cannot wave their own asset through. An impacted
target no declaration covers refuses the create loudly, naming the
policy and the uncovered paths — a covered change is never created
approver-less. The canonical policy shape: production
scope × destroy* → require_step_up + approval of each impacted asset
owner.
The funnel — pending_approval
Every create door — direct changes, workflow runs, retries, trigger and
schedule firings, a maintenance window's declared workflow, and every run
a workflow or action step creates — matches the run's targets against the
enabled policy set, after the maintenance stamp. A matched run is created
normally (its tree freezes, the content fingerprint is taken) and HELD:
pending_approval in every list, a layered checklist opened, nothing
driven, no runner, no queue slot, no workspace.
The hold is written with the run. A matched run is written held in the same write that creates it, so no server ever starts it before its checklist exists: not the request that created it, not another server picking up unfinished runs, not a restart. Only approval (or break-glass) starts a held run; rejection or expiry finishes it.
What the match reads. A policy on a target holds every run that will act on it, however the workflow is written:
- The run itself — its target and action (a workflow run: its project and workflow code).
- Change steps — the step's target and action. A relative target is read under the run's project.
- Nested workflow steps — the nested workflow's project and code.
for_eachsteps — every change step in the fan-out's template. A fixed target is matched as written.- Targets and actions written as
${{ … }}expressions — in afor_eachor a single step — are not known until the step runs, so the match takes the part that is fixed: the path up to the last/before the first expression, and the action with each computed part read as "anything". A fully computed target (${{ app.path }}) is therefore held by every policy whose actions admit the step's action, in every project: with actiondb_publish, everydb_publishpolicy on the estate. Each of those policies adds its own checklist line, so all their approvers are asked, and a policy requiring a change record (require_change_record) applies too, so the run needs one./projects/limebank/environments/${{ env }}/assets/dbis held only by policies that can reach/projects/limebank/environments/. A policy with metadata predicates holds such a step too, because no node is known yet to test them against. A nested workflow reference that does not read as/projects/<project>/workflows/<workflow>once its expressions are set aside is held by every policy. Write the fixed part of the path literally to narrow the match to the policies that really cover it. One exception: a policy whose approvers are the impacted asset owners never holds a computed target when the run is created, since no owner can be named for it; the run is created, and the change the step creates is matched on its resolved target and held there, signed by the deepest declared owner.
Runs a step creates. A nested workflow, the change a workflow change
step creates, and the change a change: step in an action file creates
are matched when their step is reached, before they start, and are
written held like any other run. A target is not held again only when it
was actually approved: a policy is satisfied for a nested run's target
when that policy is on the released checklist (by approval or
break-glass) of its parent — or of an earlier run in the same chain — and
that run declared the target. A step whose target is computed when it
runs is declared by the fixed part of its path, so approving a run with
such a step covers every nested target under that part of the path,
whichever step creates it and however deep; keep the fixed part narrow
where each piece of nested work should raise its own checklist. A run that was never held covers nothing,
so a policy that holds changes and not workflow runs
(subjects: [change]) holds the change a workflow step creates, a policy
added after the parent was created, or one the parent's released
checklist did not carry, holds the nested run, and a retry covers only
with its own checklist, never the first attempt's (nor a step it carried
over as completed). A change made to a policy the checklist already
carried — a new action, a changed path or predicate — does not reach runs
already approved under it; it applies to every run created afterwards. A parent admitted ungated
under a non-strict lapse of the entitlement covers nothing either: each
nested run meets the lapse posture itself — a non-strict policy degrades
loudly again (warn:approval_policies:degraded) and lets it run, a
strict one refuses it and fails the parent's step. A held nested run has its own checklist, with the
parent's creator as requester, and the parent's step waits on it —
re-reading it at an interval that starts at one second and doubles to
thirty, waking at once when an approval on the same server starts it. A
failed read keeps the step waiting; after five failed reads in a row the
waiting run records warn:runs:nested_unreadable naming the nested run,
and only a nested run whose stored state cannot be decoded fails the
step. Approving the
nested run starts it and the parent carries on. If the nested run is
rejected, expires, or is cancelled before its approval starts it, the
parent's step fails by name. A policy with require_step_up that matches
only a nested run cannot ask for an elevated session, because nobody is
signed in mid-run: the nested run is held for approval as for any match,
and its audit:approvals:pending event names the policy under
step_up_unavailable (the checklist has no field for this).
What a held run refuses, and how it ends without approval.
- Pausing or resuming a held run is refused ("… is held for approval: approve or reject its checklist"). Pausing or resuming the parent of a held nested run is allowed and never releases the nested run.
- A held run, or a parent waiting on one, cannot be retried; neither is finished.
- Cancelling a held run — directly, or by cancelling the parent waiting on it — rejects its checklist with the reason and the canceller's identity and clears its hold in the same cancel, so an approval arriving afterwards cannot start it. An approval is released only from an approved checklist (break-glass also from a pending one), and a run finished while its release was in flight is never started.
- When the hold cannot be recorded (its checklist cannot be written), the run is cancelled before it starts, a checklist already opened for it is rejected with the reason, and the create or retry answers with the error; for a nested run, the parent's step fails with it. A run whose preparation fails after it was written (its pack pins cannot be frozen or copied, or a nested run cannot be linked to its step) is cancelled the same way, held or not.
- A run left held with no checklist — because the server stopped while creating it — is never started: at least 10 minutes after its creation the server cancels it, and a parent waiting on it fails its step. A held run with an open checklist is never touched, however long it waits. A held run whose checklist was released but which was never started (the server stopped, or starting it failed, after the approval) is started by the server within a few seconds, exactly once. A held run whose checklist was rejected, expired or withdrawn but which was not finished at the time is cancelled at least 10 minutes after that decision, with a reason that says so.
In each case the run finishes without any step running and its chain
records audit:approvals:cancelled with the reason; create or retry it
again.
When the node metadata a policy's predicates read cannot be loaded, the create is refused by name — "The approval policies could not be evaluated: the node metadata their predicates read could not be loaded …", the cause going to the server log — and nothing is created or started (a nested run's parent step fails with it; a manual step waiting on a policy stays held and is tried again). An unreadable metadata view never reads as "no predicate matches".
Retries. Every retry is decided again as a new run; nothing grandfathers, and the first attempt's approval stays on the first attempt. The approval policies are matched on the steps the retry has not already completed: the run's own target and action, and every step that neither succeeded nor was skipped in the first attempt. A step the first attempt completed is kept, never runs again and is left out. The match errs on the side of holding: a step the retry's own skip list will skip, or an unfinished step beneath a kept step, is still matched. A retry whose only unfinished steps no policy covers runs without a new approval; one with a covered step still to run is held as the first attempt was. A policy requiring a change record is still evaluated over the whole run, kept steps included. A retry is written held whenever any enabled policy could hold it and is released only once the policies, checked again on the new run, admit it; if they refuse it, the new run is cancelled and the retry answers with the refusal. A retried nested workflow step creates its nested run fresh, matched when the step is reached as on the first attempt; a kept nested step creates nothing and holds nothing.
A maintenance window's declared workflow is matched like any other run. When a policy covers it, it is created held when the window opens and is never started by the window itself. While it waits it counts as the window's unfinished declared work: an auto-end window stays open, and at its hard end an auto-extending window extends up to its cap (then ends with the cap warning). Approval releases it through the usual release check (a window covering the target at that moment must admit it, or it waits for one that does); a rejection or quorum expiry finishes it without any step running, after which an auto-end window with nothing else unfinished ends. A declared workflow no policy covers starts as before, and a governed step inside it is held when it is reached, like any nested run.
A held run says so on its own read: while its checklist is open, the
change and workflow-run reads carry approval_hold — the checklist's id
and status (pending, or approved while held for its window, with
held_reason), when it was raised, the display names its open lines still
wait on (with their principal ids), the groups and policies they name
(opschain docs resources/approval, RunApprovalHold). opschain runs show prints it on the tree's root line —
◦ — held for approval (checklist <id>; waiting on priya, group cab) —
with Status: awaiting approval and the opschain approvals show <run-id>
review line; opschain runs list shows awaiting approval in STATUS; the
GUI's run page shows the same hold in the run's header card, linked to
the checklist. A held run is waiting for a person, never for a runner. A
list page resolves its holds in one read of the open checklists by run id;
list rows do not read each run's change owner, so a change owner assigned
apart from the requester can still appear in a list row's waiting names,
while the single-run read leaves them out. A disabled account is never
waited on, and a named group with no member left in the list prints beside
the names (group cab). The hold is served only where the approval
endpoints answer (the packs:change-governance entitlement).
Postures. The funnel is PostgreSQL-only: in the local lane and on a server on the SQLite store there are no approval policies, so nothing on this page holds a run there.
The checklist carries one frozen line per matched policy (approvals bind to what the approver saw, never to later policy edits), per-line quorum over distinct identities, and the MIN-across-lines clocks. The fingerprint covers the frozen composition — target, action, version pins, masked inputs, skip mask, match units — and stamps every approval row and export; the governance block is deliberately outside it (never fingerprinted).
Reviewer verbs are user-plane: the inbox (ListPendingApprovals) and
checklist reads ride node read authz; approve/reject require approver-list
membership on a line, with the self-approval exclusion applied per line.
What an approver may read — the approver-scoped subject read. An
approval without sight of the subject is a rubber stamp, so being a
named approver on an OPEN checklist (any line, group membership
resolved exactly as the inbox resolves it) — or its requester — admits
the read of THAT checklist's subject without the reviewer or admin
role that otherwise gates it: for a trust raise, the agent whose trust
is being raised (AgentService.GetAgent and GetAgentTrustReview — its
identity, disclosures, release and the trust review listing the pending
grant with its tier, scope, actions and caps); for a release promotion,
that release (AgentReleaseService.GetAgentRelease); for a transport
grant, that grant (TransportGrantService.GetTransportGrant). The scope
is the subject only — never the fleet list, another agent, the release
catalog, the grant inventory or the agent's history — and the admission
lapses the moment the checklist closes (the decided row keeps its
decision-history view). The same rule admits the checklist itself
when its target is no node a project approver could hold a read on: a
release promotion targets the platform root / and a lane rollover the
agent's own path, so the inbox lists them, approvals show reads them
and approvals approve/reject decide them for the approvers they name
(and their requester) without a read grant on / — the notification
engine tells those approvers by the same rule. The funnel's own determinations decide first
from the compiled rule trie; only a denial consults the caller's open
checklists, read set-based and cached for a few seconds so the inbox's
click-through costs one lookup. The /governance/agents reviewer role
itself is unchanged.
The decision history (ListApprovalChecklists; CLI opschain approvals history; the GUI's Decided tab beside the inbox) answers "what did I
approve in the past?" and "who decided what?": the decided checklists —
approved (quorum complete), rejected, timed_out (quorum TTL lapsed),
break_glass — newest decision first, each row carrying the full checklist
with its approval rows (who, when, comment) and the finaliser's reason. A
checklist is listed to a caller who may read its target, who decided it
(an approver always sees what they decided, even after their read on the
target is withdrawn), or who holds the oversight determination —
readable on /governance/change, or updatable on /admin — which
admits every checklist in the estate: the governance administrator's
"approvals have been performed by other users" view.
The decisions also read in-chain: the audit:approvals:approve and
audit:approvals:reject events a decision verb records carry the held
change's or workflow run's correlation_id by default (the server reads
it from the subject's stored provenance on the write path; a
request_metadata.correlation_id the client sends still wins), the same
chain the funnel's own pending, release, lapsed and break_glass
events already sit on. An auditor following a change's chain (the events
feed filtered on its correlation_id, the chain views, the submission
export's audit slice) therefore sees "the request → the created change →
who decided it, and why" as one lineage — the decision is never a hop
that rooted its own chain because the GUI or CLI sent no correlation.
A checklist read explains itself: each line carries waiting_on (the
named users plus the named groups' known members, by display name, minus
identities already recorded and — on a self_approval: false line — the
requester and change owner, each matched by principal id or username)
with the parallel waiting_on_ids, and its policy's delegation scope
(policy_scope_path); the checklist carries the caller's own standing
(caller_eligibility: eligible, self_approval_excluded,
already_approved or not_approver, plus caller_may_reject) and, while
pending, the sentence that explains it (caller_eligibility_reason: "you
raised this request; self-approval is off on subject_kind/subject_id — a grant-shaped checklist
names the grant's subject so review surfaces can deep-link it), and, when
a line requires a window, the maintenance-window coverage of the target
path (window.state: active/scheduled/none with the covering
window). The standing fields are affordance honesty for the GUI's
approve/reject verbs — the server-side refusals stay the enforcement, and
the release gate's admission decision stays authoritative over the
coverage summary.
The reads name their principals. Approvers, the requester, approval rows,
the finaliser, the identities a line waits on and a history row's deciders
are stored as principal ids (or, for rows recorded before the id switch,
usernames); every read carries a display name beside each —
users_display, requested_by_display, approved_by_display,
finalised_by_display, waiting_on, decided_by_display — while the ids
stay on the read. A display name is the account's current username; a
disabled account (a directory leaver, or one an administrator disabled)
reads <username> (removed); an id no account answers reads as the id.
The CLI prints the names (-o json keeps both), and the GUI shows the
name with the id on hover. A response resolves its names in one set-based
read of the distinct ids it carries — never a lookup per row — and the
names appear only in the API answer, never in events or logs. The local
lane and a server on the SQLite store keep no checklists, so nothing
changes there.
A checklist also explains WHY its subject was raised — the approval
context (context on the checklist; opschain docs resources/approval):
the requester's kind and stated rationale (the create request's
rationale attribute — optional for a person, mandatory for an agent
principal), the originating agent with its trust tier at creation and
owner, the recommendation the subject implements, the redacted adapter
transcript when one was sealed, the correlation chain's recent hops
in order — the incident or operator request that invoked the agent, each
governed read, the recommendation, the subject — and, for a change that
produced or consumes a kind: image artifact, the image facts
(identifier, digest, build provider, registry, source commit, producing
run; opschain docs image-builds), so a deploy of a built image is
approved on what was built, not on a tag. The context is served to
the checklist's approvers (any line, group membership resolved), its
requester and agent-governance reviewers, read set-based once per inbox
page; opschain approvals show <run-id> prints it and the inbox's WHY
column carries the rationale's first line. An approver who cannot see
why a change was raised is being asked to rubber-stamp it; this is the
platform explaining itself.
The inbox is ONE surface for every held subject kind (never
two parallel approval systems): beside change and workflow subjects it
carries trust_grant checklists — agent trust raises held by the
ceremony, whose approval activates the grant instead of releasing a run.
Trust-raise reviewer verbs are admitted by packs:change-governance OR
packs:agent-governance; with only the agent pack the inbox lists the
trust-raise rows alone.
Rejection finalises the subject as rejected with a mandatory reason and
sweeps its frozen tree aborted. The quorum TTL expiring does the same with
an audited timeout. A completed checklist's validity lapsing re-gates:
every approval row voids and the subject returns to pending_approval.
Release — approved ≠ run-now
Checklist completion attempts release: the maintenance gate re-runs at
start, and a require_window line holds the subject until an open window
admits its declared work (the refusal names the next scheduled window).
Held subjects release automatically on the trigger engine's leader tick
when a window opens, or explicitly via StartApprovedRun. Break-glass
is the only discretionary lever: the change-governance
determination on the subject's target, a mandatory reason, the loud
warn:approvals:break_glass event — and it implies the audited
maintenance override. It is deliberately NOT on the step-up floor
(break-glass is the exemption).
Governance metadata
Each funnel subject carries a governance block — change owner (defaults to
the requester; zero authz powers), category
(standard | normal | emergency), typed external references
({system, record_type, id, url?, relationship}) — mutable through the
whole lifecycle, audited with who/when/before/after (43), never
fingerprinted. require_change_reference checks presence at approval.
The CLI writes the block with opschain approvals set-metadata (manual:
opschain docs cli/approvals-set-metadata).
Submission export
ExportSubmission renders the fingerprint-stamped markdown packet from
authoritative rows: subject identity, fingerprint, governance block,
checklist with approval rows and strict lines flagged, clocks, window
stamp, prior-run evidence (informs, never gates; zero history
shows the first-run-anywhere flag) and the subject's audit slice. Inputs
render only in their masked recorded form — the export path never
surfaces a resolved secret.
Converting the retired settings approvers
The Rails-era node-settings requires_approval_from entries (stored in the
global and per-node settings documents) are retired: this server never
enforced them, so they presented an approval gate that did not exist. The
converge, the node compare and the settings editor no longer serve the key,
and approval policies are the enforced successor.
opschain approval-policies convert-settings-approvers is the operator
conversion (ChangeGovernanceService.ConvertSettingsApprovers): it scans
every stored settings document and creates one policy per entry at the
owning node's path — path pattern <node path>/** (a global entry becomes
/**), the change_filter.actions as action patterns ("all" → *),
the entry's user_names/ldap_groups as named approvers, quorum 1 with
self-approval allowed (the old gate was satisfied by any one named
approver, the change creator included). The run answers a report naming
every entry — converted, already converted (re-runs are idempotent by
shape) or unconvertible (placeholder approvers, created_by filters,
extended action globs, template-owned documents), the last left in place to
recreate by hand. --dry-run reports without writing; a writing run is
audited as api:settings_approvers:converted. The manual page is
cli/approval-policies-convert-settings-approvers.
Converting the step-level wait gates
The step-level requires_approval_from: wait gate in workflow and
composed-action YAML is a different, fully live mechanism: it parks the run
mid-flow until any one named user or group member approves, and it keeps
enforcing exactly as documented. It is nonetheless superseded as the way to
get governed sign-off — governance and orchestration are orthogonal, and
governance-grade approval lives in approval policies on the estate paths,
not in workflow YAML.
opschain approval-policies convert-step-gates is the operator absorption
(ChangeGovernanceService.ConvertStepApprovalGates): it scans the stored
workflow catalog, reports every gate by name (workflow, version, step,
approvers) and creates one policy per distinct approver set at the owning
project's path — the workflow's code as the action pattern, so the policy
holds that workflow's runs for approval before they start; quorum 1 with
self-approval allowed (the step gate is satisfied by any one named
approver, the run's creator included). Only the latest published version
converts; gates on drafts and superseded versions are reported as
superseded, placeholder approvers and archived workflows as
unconvertible. Converting never edits or removes workflow YAML — the
step gate keeps enforcing beside the new policy until the workflow's
authors delete the key at their own pace. --dry-run reports without
writing; a writing run is audited as api:step_approval_gates:converted.
The manual page is cli/approval-policies-convert-step-gates.
Estate usage is visible without the verb: composing a stored version that
carries the gate records one throttled
warn:workflows:deprecated_approval_gate event per version per day, naming
the workflow, version and gate-carrying steps.
Attested steps
Not every change is automatable. A manual step (manual: in an action
file, opschain docs orchestration) states the human part of a change in
advance — a console, a portal, a registrar, a change board, or a command —
inside the run that needs it. The run holds at the step until a human
answers it: opschain runs attest records what was done with typed
evidence (the four kinds below, the strongest present being the answer's
evidence class) and the run continues; opschain runs refuse --reason
fails the step by name and its on_error: applies; an unattested step past
its timeout fails. The answer, its evidence and the attester's principal id
land on the run's chain (audit:runs:attested, audit:runs:refused).
Who may attest is a grant: execute on <run node>/attest, plus execute on
<run node>/attest/<capability> for every capability the step declares,
plus the step's own attesters: (principal ids or groups) when it names
any. As with <node>/breakglass, an execute grant on the node cascades into
<node>/attest and <node>/attest/<capability>; an explicit rule on
<node>/attest (or on one capability's path) narrows who may attest below
the node's own grant holders. An agent, a service account or a step's credential never attests.
Attested steps are base platform — they need none of this pack. A
two-person rule (the approver and the attester differ) is a policy an
estate adopts: an approval policy holds the step itself when the step
names it (below), or holds the run before it starts when it matches the
action, and the step's attesters: names who may then attest; the
platform never imposes one. The answers, verbs, rights and retention are
on opschain docs resources/step_attestation.
Holding a manual step
A manual step may name one approval policy by its name — approval: hosted-privileged-gate beside manual: — so a second person approves the
risky act at the moment the run reaches it, not only the run up front.
There is no implicit matching: a policy never holds a step that does not
name it, so the action file shows every hold it carries. The policy opts in
with subjects: [manual_step] (opschain approval-policies create|update --subjects manual_step) — a policy that lists only manual_step holds no
run — and its path_pattern and metadata predicates must admit the run's
target; its action_patterns are not consulted.
When the run reaches the step it opens a manual_step checklist: a
fresh approval request id (never the run's, so a run with two held steps
carries two requests and its own run-level checklist is untouched), the
step as its subject, the run's target as its target, one line for the
policy (plus one per impacted asset owner when the policy's approvers
carry that kind), the policy's quorum, strict flag, self-approval rule and
clocks, and a fingerprint of the step's rendered title, activity, command
and where — the approval binds to the exact text the operator will
follow. The requester is the run's creator: on a self_approval: false
policy neither the run's creator nor the run's change owner may approve.
The step reads held, its own timeout: does not run, and attestation and
refusal are refused by name while it holds. require_window and
require_change_record are run-creation conditions and are not evaluated
on a step hold; the policy's require_step_up applies at run creation
only, never to the step hold (nobody is creating anything when the run
reaches the step).
The request is decided with the funnel's verbs, by the request id the step
shows (opschain runs show, opschain approvals list):
opschain approvals approve <request-id> (human verbs, read on the run's
target, eligibility on a line), reject --reason and break-glass --reason (the change-governance determination on the target, a loud
warn:approvals:break_glass — a held step has a governed exit at 03:00).
On release the step awaits attestation and its timeout: starts
(audit:runs:hold_released); a rejection fails the step with manual step <path> was rejected under policy <name> by <principal id>: <reason>, and a
quorum TTL expiry fails it the same way — on_error: applies, and a retry
of the run opens a fresh request. A cancelled run finalises its open
request rejected. There is no start, governance block or submission export
for a step's request: the run's own cover the run.
A policy the step cannot use fails the step by name when it is reached —
"manual step
Postures. Approval policies, their requests and the funnel live in
PostgreSQL: in the local lane and on a server on the SQLite store a run
whose step tree carries approval: is refused by name at creation —
"approval policies need the PostgreSQL store" — rather than skipping a
hold the action carries by design. The action file itself is accepted in
every posture (one file serves them all); remove the key to test the
action locally, or run it against a server on PostgreSQL.
Break-glass records
Not every change goes through a run. A break-glass record declares a
change made by hand — a console action, a one-off command, a reboot in an
incident — after the fact, so it is governed rather than invisible:
opschain breakglass record --run <id> --after-step <step> puts it on the
run it rescued, opschain breakglass record --node <path> on the node it
changed, each with a mandatory reason and the act's window. A record is
correlated by its run, a maintenance window or an external change
reference; one nothing correlates is accepted but flagged, its window
bounded at 24 hours. Its evidence takes four kinds, and the record carries
the strongest present as its evidence class:
- reference — an identifier the external system minted (an operation id, a ticket number): the strongest, matchable against the system's own log;
- command — a read-only check whose captured output satisfied its expected text;
- file — a screenshot or an export, stored as an artifact on the
record's node and digest-sealed: weak evidence (presence, not
correctness), bounded by
breakglass.evidence_max_mbandbreakglass.evidence_types; - statement — the recorder's own words, always present.
Every record stays unreconciled until a human closes it with a note
(opschain breakglass close <id> --note …, audited as
security:breakglass:closed naming who and why); an unreconciled record is
never pruned. A record written in the local lane reaches the reviewers
when the home's export is imported on the server (opschain governance activity --local --out <file>, then opschain governance activity import <file> — opschain docs cli/governance-activity-import): it lands once,
unreconciled, as a record of the importing human. Break-glass records are base platform — they need none of
this pack — and the records, verbs, rights and retention are on
opschain docs resources/breakglass_record; routing the
security:breakglass:* events to subscriptions and mandates is the
packs:security-governance entitlement's.
Reconciling a record — or any change — against a target system's own
audit log starts from the coverage query: opschain governance coverage --scope <node> --from <t> lists every run, attested step and break-glass
record that claims the node over the window, each marked reference (it carries an id
the target minted, matchable exactly) or window (attributable by its
window only). Runs become reference when their steps report the target's
ids with opschain step add-reference; OpsChain never writes its own ids
into the target. See opschain docs resources/governed_activity.
Change records
An approved change is rarely one run. A change record is the approved
intent with every piece of work under it — the failed first attempt and its
retry, the four teams' twenty workflows, the by-hand act on the slot — so
"what happened as a result of this change" is one page
(opschain changes show <record>). A record is owned by the organisation
or a project, names its scope (the nodes the change may touch) and moves
through three states only: pending, approved — the only state in which
runs join — and closed with a verdict (completed,
completed_with_incidents, rolled_back, abandoned, cancelled).
While a record is approved — and inside its window, when it declares one —
a run created inside its scope joins it automatically; a scheduled run
outside the window stays off it. A workflow run is tested by its effective
target: the one node all its change steps target (nested workflows and
targets read from its inputs resolved at creation), else its project.
--change <record> names one explicitly, always wins and is never bound by
the window; two approved records holding the same node refuse the implicit
join by name.
Nested runs, triggered runs and retries inherit the record; a run created
without it is attached after the fact with opschain changes link. A
break-glass record takes the change record as its first correlation
(--change). Close is refused by name while a run under the record still
runs. Every move is an audit:change_record:* event naming the principal.
Without this pack (the baseline tier) a holder of the record's
approve grant approves it: opschain changes approve <record>. Run-level
approval policies are unchanged either way: a record's approval never
substitutes for a run's own gate. The record, the join rules, the story
and the rights: opschain docs resources/change_record.
With this pack, a change record is an approval subject beside changes
and workflow runs. An approval policy whose subjects include
change_record holds a record whose scope its path_pattern reaches — a
scope node the pattern covers, or a node/** subtree with a covered node
beneath it (a project-wide record reaches the project's production
policy). Action patterns narrow runs only; metadata predicates evaluate at
each scope pattern's node. Moving such a record to approved
(opschain changes approve, TransitionChangeRecord) does not approve
it: it opens the policy's checklist — one per matched policy, the same
quorum, self-approval exclusion, impacted-owner lines and quorum TTL as a
run's — and the record stays pending, its ledger gaining
audit:change_record:approval_requested. Requesting needs update on the
owner's change_records rule path and a human; a matched
require_step_up policy demands an elevated session at the request. The
request lands in the approvers' inbox (opschain approvals list) as a
change_record row carrying the record's code, title, owner and scope;
opschain changes show reads awaiting approval (checklist <id>) while it
is held. Asking again answers the open request — unless a policy holding
the record has changed since the request was raised (updated, disabled or
deleted, or a policy now holds the record that the request does not name;
the version is each policy's updated_at, read from the store, so an
edit on another server counts at once): then the open request is
withdrawn (reason: the policy changed) and a fresh one raised under the
policy's current version, and the command says so. The open checklist
is never re-resolved in place — its frozen lines are the audit value; a
request whose quorum completed is never replaced.
Withdrawing a request. The requester may withdraw a record's pending
request (opschain approvals withdraw <id> --reason <why>,
WithdrawChecklist): a withdrawal is not a decision, so the
self-approval exclusion does not apply — a sole operator who is the gate's
only approver, with self-approval off, can neither approve nor reject
their own request but can always take it back. The checklist ends
withdrawn (listed by approvals history --status withdrawn, never in
the default decision history), the record stays pending with
audit:change_record:approval_withdrawn written in the same transaction,
and audit:approvals:withdraw records the reason. Only the requester
withdraws, with update on the owner's change_records rule path, as a
human; a quorum-complete or finalised request is refused by name. A held
run's checklist is not withdrawable — a run is cancelled instead
(opschain runs cancel). Not in the local lane or on the SQLite store
(no approval policies there).
The reviewer approves or rejects it with the ordinary verbs
(opschain approvals approve|reject <id>), which for a record also need
update on the owner's change_records_approve rule path (404 on the record
otherwise) and refuse an agent, a service account or a step's credential
by name. The requester and the record's owner principal are excluded
on a self_approval: false line. Completing the quorum approves the
record in the transaction that releases the checklist: its
audit:change_record:approved row names the checklist and the completing
reviewer's principal id. A rejection — or an unanswered quorum TTL —
leaves the record pending with audit:change_record:approval_rejected
on its ledger; moving it to approved again opens a fresh checklist.
Break-glass, start, the governance block and the submission export refuse
a record's checklist by name — a record has no break-glass release; its
runs keep their own gates. A record no policy reaches approves at the
baseline tier exactly as without the pack.
require_change_record: true on a policy refuses, at creation, a run
its path, actions and predicates cover unless the run joins an approved
change record — named with --change, inherited (nested runs, triggered
runs, retries) or joined by scope — whatever subjects the policy holds:
Runs on <target> need an approved change record: the approval policy "<name>" requires one (require_change_record) …. Every creation lineage
crosses it: changes, workflow runs, retries, nested spawns and trigger
firings. The canonical production shape is one policy holding
change_record with require_change_record on
/projects/<p>/environments/prod/**: the CAB approves the change once,
and every run on production must belong to an approved change — without
a second gate on each run. Add a run-holding policy beside it for defence
in depth.
A record linked to an ITSM change (a JSM connection's change mapping
— opschain docs integrations-jsm) is approved by the ITSM and by the
policy that holds it, when one does: both must hold. The ITSM's approval
marks its half and leaves the record pending until the checklist
releases; a checklist that releases first leaves it pending until the
ITSM approves (audit:change_record:approval_awaiting_itsm). Neither
substitutes for the other, and neither replaces a run's own gate. With no
policy reaching a linked record, opschain changes approve is refused by
name — the ITSM approves it.
Postures. Approval policies are PostgreSQL-only: on a server on the
SQLite store the policy surface (and with it the change_record subject
and require_change_record) is refused by name — "approval policies need
the PostgreSQL store" — and in the local lane opschain approval-policies
needs a server. In both, opschain changes approve keeps the baseline
approval.
Grant the organisation's /change_records and /change_records_approve
rule paths as a high-trust pair: a root record may scope any project, and
two overlapping approved root records refuse run creation on their common
nodes in every project until the creator names one — by design.
Entitlement
Everything on this page is the packs:change-governance pack (see
entitlements). The gated surface, exactly:
- Approval policies — reads and writes alike
(
ListApprovalPolicies/GetApprovalPolicyand the create/update/ delete verbs), plus the settings-approvers and step-gate conversions. - Asset owners — the declaration reads and writes
(
ListAssetOwners/GetAssetOwnerand create/update/delete). - The reviewer surfaces — the inbox, checklist reads,
approve/reject, break-glass,
StartApprovedRun, the governance metadata verbs andExportSubmission— gated per held-subject kind:changeandworkflowchecklists require this pack; trust-raise and agent-release checklists are admitted bypacks:agent-governanceon its own, transport-grant checklists bypacks:rpc, and this pack admits every kind (change_recordchecklists only with this pack). The inbox lists exactly the kinds the caller's entitlements admit. - The create funnel itself — policy matching at the create doors
(and
require_change_record) is what the lapse posture below governs; an unentitled estate's creates never enter the funnel. - A change record's approval — a policy holding change records holds the record only with this pack; on lapse a strict match refuses the move to approved by name and a non-strict one degrades loudly to the baseline approval. The change record itself stays base.
- A manual step's hold — a run whose step tree carries a manual step
with
approval:is refused by name at creation without this pack ("stepdeclares approval:, which needs the packs:change-governance entitlement"), so it never starts and holds nothing. A run already in flight when the entitlement lapses meets the lapse posture when it reaches the step: a strict policy fails the step by name; a non-strict one emitswarn:approval_policies:degradedand the step awaits attestation unheld.manual_stepchecklists are admitted only with this pack. The manual step itself stays base.
Each refusal is the typed permission_denied with
ERROR_REASON_PACK_ENTITLEMENT_REQUIRED naming the pack and the tier.
What stays base: creating and running changes and workflows, the
authored step-level requires_approval_from: wait gate, and maintenance
windows (their own maintenance feature, opschain docs maintenance-windows). On lapse the posture is funnel-shaped: strict
policies refuse covered creates with the named pack refusal; non-strict
matches degrade loudly (warn:approval_policies:degraded) and the
create passes ungated — never a silently-dropped hold. A never-entitled
estate has no policies and keeps today's base behaviour; authored
requires_approval_from wait steps stay ungated. Hands-on:
opschain learn governance-approvals and opschain learn governance-asset-owners.