---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/orchestration/validation/functions/freezePlan.md
---

# Function: freezePlan()

```ts
function freezePlan(
  store: PlanStore,
  planId: string,
  inputs: FreezeInputs,
): Promise<{
  issues: PlanIssue[];
  ok: boolean;
}>;
```

Defined in: [src/batteries/orchestration/validation.ts:962](https://github.com/NHTIO/ADK/blob/v1.20260906.0/src/src/batteries/orchestration/validation.ts#L962)

Freeze a plan: fold the log, validate, and commit the `editable → reviewable` transition.

The op log is folded into a `RawPlanView`, the fold's own issues are carried over (minus the
fold's advisory `duplicate_edge_id`, which [collectIssues](collectIssues.md) reports as a blocking check),
and [collectIssues](collectIssues.md) runs over the folded graph. Only when no issue is `blocking` is the
store's `transition` called, passing the folded digest as `expectedDigest`.

The digest is what makes the commit safe rather than racy: content is validated at digest D and
the store commits only if the plan is still at D, so a concurrent edit invalidates the
transition instead of slipping past an already-passed check. If the transition is rejected
(the digest moved or the state is not `editable`), a `transition_rejected` blocking issue is
appended and the freeze reports failure.

## Parameters

| Parameter | Type                                                     | Description                                                    |
| --------- | -------------------------------------------------------- | -------------------------------------------------------------- |
| `store`   | [`PlanStore`](../../interfaces/PlanStore.md)             | The plan store holding the plan.                               |
| `planId`  | `string`                                                 | Identity of the plan to freeze.                                |
| `inputs`  | [`FreezeInputs`](../../types/interfaces/FreezeInputs.md) | The fully-resolved tier-C allowlist and wired predicate cells. |

## Returns

`Promise`<{
`issues`: [`PlanIssue`](../../types/interfaces/PlanIssue.md)\[];
`ok`: `boolean`;
}>

Whether the freeze succeeded, and every issue the plan raised.
