--- id: CMP-2 family: RT-CMP level: core profiles: [runtime] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/rt-cmp/cmp-2 specification: FlowDrop Workflow Specification 1.0-draft licence: CC BY 4.0 --- # CMP-2 — Compilation always re-enriches node metadata from the live node types *RT-CMP (Part II) · level: core · profiles: runtime · added in 1.0* Stored node metadata is a cache, and an author-editable one. Compilation refreshes it from the node types themselves so a run can never be planned against stale or attacker-supplied metadata. ## The rule > **Normative.** This is the rule. > > 1. Compilation re-enriches every node's metadata from the live node type definitions before planning the run. > > 2. This holds at every entry point into compilation: no caller can compile a workflow whose stored node metadata is taken on trust. > > 3. The re-enriched workflow is normalized before it is compiled. ## What it means Stored node metadata is a cache the author can edit, not a source of truth. Every time a workflow is compiled, its node metadata is thrown away and rebuilt from the node types themselves, so whatever a stored record claims about a node — up to and including which processor runs it — never survives past compilation unless the live node type still agrees with it. ## Example A stored node claims a description that no longer matches its node type: ```json title="What the stored node claims" verdict="stale" { "node_type_id": "live_probe", "description": "Stale description" } ``` ```json title="What compilation records for it" verdict="fresh" { "node_type_id": "live_probe", "description": "Fresh description" } ``` The node type's own description wins; the stored claim never reaches the compiled workflow at all. ## Why Recorded under OPEN-19. ## Related rules - Names: SCH-29 --- Rule identifiers are permanent and are never renumbered. This specification carries no implementation status: each implementation publishes its own standing against these rules. Licensed CC BY 4.0.