Skip to content

PQA031 — Parent reference names a device type that does not exist

A parents: entry names a type_id this adapter does not declare.

The parents: block states where a device type may sit in the tree. Each key is a type_id of the same adapter, and the framework enforces the containment rule it expresses: a Reader declared under Module cannot be created under a Panel.

- type_id: Reader
  parents:
    Modul:            # the type is Module
      max_siblings: 2
      required: true

Why the build refuses this

An unknown name makes the rule unenforceable, silently. The entry does not fail — it simply matches no type, so the containment it was meant to express is never checked. Placement the model forbids is then accepted at runtime, and the tree the operator builds is not the tree the adapter assumes.

required: true becomes a promise nobody keeps. A parent that cannot be resolved cannot be required.

How to fix it

Spell the parent as the type_id it is declared with, case included. The lookup is case-insensitive on comparison, but a name that matches nothing at all — a typo, a renamed type, a type from a different adapter — has no type behind it.

If the parent genuinely no longer exists, the child's placement rule has to be restated against a type that does.

What is not reported

A type with no parents: block. That declares a root-capable type, which is a valid shape.

If you disagree with a report

Do not suppress it. A wrong report is a bug in the check — report it with the YAML that triggered it.