# When a check fails (/docs/gate-failures)



Pleach's runtime names the rule you broke. This page maps what you
see to what it means and the fix, so an agent, or a human, can go from
the error to the change.

For what Pleach's own CI checks, see
[Release checks](/docs/audit-gates).

## You added a graph node [#you-added-a-graph-node]

| What you see                                                                                                                  | What it means → fix                                                                                                                                                                  |
| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Registration refuses the node: `registers new node "<name>" without declaring subscribes or writes — refusing to register it` | The node has no channel declaration. Declare `metadata: { subscribes: [...], writes: [...] }`. Empty arrays are valid. See [the new-node checklist](/docs/nodes#new-node-checklist). |
| `plugin node "<name>" declares stage "<stage>" but that name is a CORE node`                                                  | Your node shadows a core node at a different stage. Rename your node.                                                                                                                |
| `unknown node "<name>"` from `validateNodeStageForAudit`                                                                      | The node has no stage. Declare `stageId` on the node's metadata. See [Extending Pleach](/docs/extending).                                                                            |

A node can't reach across the lattice directly. Write a state field
that the next stage's nodes subscribe to. See
[the lattice rule](/docs/graph#the-lattice-rule). Recovery and
post-synthesis shaping belong in a
[post-turn stream filter](/docs/plugins/stream-observers), not a graph
node: `synthesize` is a singleton stage.

## You added an event type [#you-added-an-event-type]

| What you see                                    | What it means → fix                                                                                                                                                                                                             |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| A new event type's payload is stored as written | List its free-text payload paths in `scrubbableFields` on the event definition, and pass the same plugins to the writer. See [Declaring scrubbable fields](/docs/scrubbers#declaring-scrubbable-fields-on-a-plugin-event-type). |

## You want a new audit field [#you-want-a-new-audit-field]

The `AuditableCall` columns are locked. Don't add one. Use the
`pluginPayloads` slot instead: see
[the locked row](/docs/extending#the-locked-row-and-the-slot-that-isnt).

## Your plugin won't register [#your-plugin-wont-register]

| What you see            | What it means → fix                                                                                                                                |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `PluginValidationError` | The plugin's shape is wrong, or a factory threw when constructed. The error's report names the hook. See [Plugin contract](/docs/plugin-contract). |

## Your scenario battery fails [#your-scenario-battery-fails]

`npx @pleach/core dev --plugin … --scenarios … --assert …` exits non-zero on
a failed expectation and prints a per-scenario report. See the
[CLI reference](/docs/cli).

## Reading the loop [#reading-the-loop]

The error is the correction signal. An agent extending the runtime
runs the check, reads the named fact (a stage or a channel declaration),
applies it, and re-runs. That loop is the point of
[agent-driven self-extension](/docs/extending#agent-driven-self-extension).

## Where to go next [#where-to-go-next]

<Cards>
  <Card title="Extending Pleach" href="/docs/extending" description="Each extension point, with its interface and registration call." />

  <Card title="Release checks" href="/docs/audit-gates" description="What Pleach's CI checks, organized by subsystem." />

  <Card title="How the audit contract is checked" href="/docs/ci-enforcement" description="The same checks, indexed by the auditability and replayability promise each one backs." />
</Cards>
