Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
forge_descriptor_audit.hpp
Go to the documentation of this file.
1#pragma once
2
3// The descriptor lifecycle check.
4//
5// A descriptor that drifts from its DSP is worse than no descriptor: it reads
6// as authoritative while naming a parameter that moved or vanished. This audit
7// joins each descriptor against the node it annotates and fails closed in both
8// directions — a newly baked parameter with no descriptor is as much a failure
9// as a descriptor for a parameter that was removed.
10//
11// Everything here is structural. It needs no per-family knowledge, so a new
12// catalog pack is covered the moment it is indexed.
13
16
17#include <algorithm>
18#include <string>
19#include <vector>
20
21namespace pulp::host {
22
47
54
56
63std::vector<ForgeAuditFinding>
65 const std::vector<CustomNodeBakedParam>& baked,
66 std::string_view realization_mode = {});
67
72std::vector<ForgeAuditFinding>
73audit_forge_catalog_membership(const std::vector<ForgeNodeDescriptor>& descriptors,
74 const std::vector<std::string_view>& expected_node_keys);
75
78
79} // namespace pulp::host
Bounded event contracts shared by host ingress and graph-authored nodes.
Definition anticipation_eligibility.hpp:9
std::vector< ForgeAuditFinding > audit_forge_descriptor(const ForgeNodeDescriptor &descriptor, const std::vector< CustomNodeBakedParam > &baked, std::string_view realization_mode={})
Audit one descriptor against the node it describes.
ForgeAuditFault
Definition forge_descriptor_audit.hpp:23
@ duplicate_axis
two axes or two values on one axis share a stable key
Definition forge_descriptor_audit.hpp:30
@ unexpected_catalog_node
an export node is absent from the canonical registry
Definition forge_descriptor_audit.hpp:25
@ unexpected_axis_setting
a realization selects an axis the node does not declare
Definition forge_descriptor_audit.hpp:33
@ missing_realization
a declared realization was not constructed for export
Definition forge_descriptor_audit.hpp:26
@ choice_out_of_range
a named state's value is outside the baked range
Definition forge_descriptor_audit.hpp:42
@ duplicate_choice
named states share a stable token or display label
Definition forge_descriptor_audit.hpp:40
@ unknown_realization
a realization_mode naming no declared realization
Definition forge_descriptor_audit.hpp:43
@ missing_axis_setting
a realization does not select every declared axis
Definition forge_descriptor_audit.hpp:32
@ unknown_axis_value
a realization selects an undeclared value for an axis
Definition forge_descriptor_audit.hpp:34
@ unexpected_realization
a constructed realization is absent from the descriptor
Definition forge_descriptor_audit.hpp:27
@ no_realizations
a node with no concrete realization to build
Definition forge_descriptor_audit.hpp:45
@ choices_on_continuous
named states on a continuous sweep
Definition forge_descriptor_audit.hpp:41
@ undescribed_param
the node bakes a parameter no descriptor names
Definition forge_descriptor_audit.hpp:35
@ duplicate_key
two descriptors share a stable key
Definition forge_descriptor_audit.hpp:37
@ missing_choices
stepped, but no named states
Definition forge_descriptor_audit.hpp:39
@ mismatched_type_id
a constructed node disagrees with its declared type id
Definition forge_descriptor_audit.hpp:28
@ missing_catalog_node
an indexed semantic node is absent from the export
Definition forge_descriptor_audit.hpp:24
@ duplicate_type_id
two concrete realizations register the same type id
Definition forge_descriptor_audit.hpp:29
@ duplicate_id
two descriptors name the same parameter
Definition forge_descriptor_audit.hpp:38
@ stale_descriptor
a descriptor names a parameter the node no longer bakes
Definition forge_descriptor_audit.hpp:36
@ empty_field
key, label or description left blank
Definition forge_descriptor_audit.hpp:44
@ duplicate_realization
two realizations share a stable mode
Definition forge_descriptor_audit.hpp:31
std::vector< ForgeAuditFinding > audit_forge_catalog_membership(const std::vector< ForgeNodeDescriptor > &descriptors, const std::vector< std::string_view > &expected_node_keys)
Prove that a projected export contains exactly the expected semantic nodes, each once.
std::string describe_forge_audit_finding(const ForgeAuditFinding &finding)
Human-readable one-line rendering, for a test failure or a CLI report.
const char * forge_audit_fault_name(ForgeAuditFault fault)
Definition forge_descriptor_audit.hpp:48
std::string detail
Definition forge_descriptor_audit.hpp:52
std::string node
node descriptor key
Definition forge_descriptor_audit.hpp:50
ForgeAuditFault fault
Definition forge_descriptor_audit.hpp:49
std::string subject
param key, id, or mode — whatever identifies it
Definition forge_descriptor_audit.hpp:51
Definition forge_param_descriptor.hpp:127