Mark every compiled calc slot's target property in the domain schema with
x-calc (+ readOnly: true), so renderers can tell computed fields apart
and stripXCalcProperties removes overlay values before persist.
Pure and idempotent — returns a new schema, the input is not mutated.
Ordering caveat: annotation changes the schema's content fingerprint.
Always compile (and validate sidecars) against the raw schema; use the
annotated schema only for rendering and the persist boundary.
CalcProfileCompileError fingerprint-mismatch when the profile was
compiled for a different schema, dangling-scope when a slot scope does
not resolve to a property node (cannot happen for a profile compiled
against this schema).
Mark every compiled calc slot's target property in the domain schema with
x-calc(+readOnly: true), so renderers can tell computed fields apart andstripXCalcPropertiesremoves overlay values before persist.Pure and idempotent — returns a new schema, the input is not mutated.
Ordering caveat: annotation changes the schema's content fingerprint. Always compile (and validate sidecars) against the raw schema; use the annotated schema only for rendering and the persist boundary.