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

# Function: collectIssues()

```ts
function collectIssues(
  view: RawPlanView,
  inputs: FreezeInputs,
): Promise<PlanIssue[]>;
```

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

Run every submit check over a folded plan view.

The checks are grouped into three families:

**Topology** — exactly one `entry` with no incoming edges; every other node reachable from it;
acyclicity over every handle (a diamond fan-in is not a cycle); every `join` a diamond (its fork
is its immediate dominator, more than one fork→join route, no reconvergence, no nested join);
edge ids valid and unique; node ids valid; handle applicability per source kind; a `select`
must carry a `default` edge.

**References and dataflow** — a `NodeRef` naming a missing node or an undeclared field; a
`first`/`last` selection resolved across a `join`; an omitted `branchId` where more than one path
reaches the referenced node; taint (a tainted reference may reach a `reason` prompt but not a
`call` node's args, with declassification only via a `call` node's `declassifies`); staged
values outside the encodable subset and cyclic values inside it.

**Per-node shape** — a `call` naming a tool outside the allowlist, with `replaySafe`/
`onIndeterminate` unset, or the retry-unsafe-repeat contradiction; a `branch`/`select` with no
wired evaluator cell (and `load()`/`validate()` on every wired cell); a `transform` naming a
step absent from the source class's effective method set, with args failing the descriptor's
schema, or whose source tool's return class is undeclared; a `Media`/`Uint8Array`-returning tool
feeding a field-declaring node; an unedited scaffold placeholder; an unreachable `call` node.

This function never throws on a well-typed-but-invalid plan. A malformed definition surfaces as
an issue rather than a crash, and every evaluator interaction is wrapped so a failing cell
reports an issue instead of propagating.

## Parameters

| Parameter | Type                                                     | Description                                              |
| --------- | -------------------------------------------------------- | -------------------------------------------------------- |
| `view`    | [`RawPlanView`](../../types/interfaces/RawPlanView.md)   | The folded plan content to validate.                     |
| `inputs`  | [`FreezeInputs`](../../types/interfaces/FreezeInputs.md) | The injected tier-C allowlist and wired predicate cells. |

## Returns

`Promise`<[`PlanIssue`](../../types/interfaces/PlanIssue.md)\[]>

Every issue the graph raises, blocking and advisory.
