Expand description
Component integrity + recursion/path validation.
Ports integrity_checker.py. Operates on raw &serde_json::Value (not
ComponentModel) so it can run on incoming message payloads before they are
parsed into the internal model.
v0.9-flat ONLY. Python’s v0.8 structured-component shape
({"component": {"Type": {...}}}) and its arbitrary-nested componentId
recursion (extract_pointers) are intentionally omitted: ComponentModel
already rejects the v0.8 shape, so the validator stays consistent with the
existing parser. In v0.9-flat, a componentId only ever appears inside a
children Template object.
Constants§
- MAX_
FUNC_ CALL_ DEPTH - Maximum nesting depth of function-call (
{call, args}) chains (mirrors PythonMAX_FUNC_CALL_DEPTH). - MAX_
GLOBAL_ DEPTH - Maximum nesting depth of the whole JSON tree (mirrors Python
MAX_GLOBAL_DEPTH). Guards against pathological payloads.
Functions§
- get_
component_ references - Extract every
(ref_id, field_name)pair from a single v0.9-flat component object. - validate_
component_ integrity - Validate component integrity: duplicate ids, missing root, dangling
references. Collects ALL errors (does not short-circuit), returning a
ValidationReport. - validate_
recursion_ and_ paths - Validate recursion depth and
pathsyntax across an arbitrary JSON value.