---
url: >-
  https://adk.nht.io/api/batteries/orchestration/approval/functions/approvePlan.md
---

# Function: approvePlan()

```ts
function approvePlan(
  store: PlanStore,
  planId: string,
  record: ApprovalRecord,
): Promise<TransitionResult>;
```

Defined in: [src/batteries/orchestration/approval.ts:145](https://github.com/NHTIO/ADK/blob/v1.20260906.0/src/src/batteries/orchestration/approval.ts#L145)

Approves a frozen `reviewable` plan and moves it to `executable`.

The frozen content is rebuilt by folding the store's op log, the reachable authority set is
recomputed, and it is asserted SET-EQUAL to `record.authoritySet`. Only then is the store's
`transition` called, passing the recomputed digest as `expectedDigest` so the store refuses a
stale commit, and the decision as the approval payload.

A set mismatch means the operator approved a different authority set than the plan actually
carries, so the request is refused BEFORE the store is touched. The refusal is a
`TransitionResult`-shaped failure returned rather than thrown: since `TransitionResult` has no
free-form reason, the failure is reported as a `digest_mismatch` (an authority-set inequality is
by definition a different content digest), carrying the actual digest and the assumed
`reviewable` state so a caller that lost can read what happened.

## Parameters

| Parameter | Type                                                                                                  | Description                                                                                                               |
| --------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `store`   | [`PlanStore`](../../../../@nhtio/adk/batteries/orchestration/interfaces/PlanStore.md)                 | The plan store holding the frozen plan.                                                                                   |
| `planId`  | `string`                                                                                              | Identity of the plan to approve.                                                                                          |
| `record`  | [`ApprovalRecord`](../../../../@nhtio/adk/batteries/orchestration/types/interfaces/ApprovalRecord.md) | The operator's decision, whose `authoritySet` must match the plan's recomputed reachable set exactly (order-insensitive). |

## Returns

`Promise`<[`TransitionResult`](../../../../@nhtio/adk/batteries/orchestration/type-aliases/TransitionResult.md)>

The store's transition result, or a `digest_mismatch`-shaped refusal when the recomputed
set does not match.
