Expand description
SRD-32a — Wrapper composition resolver.
Turns a parsed op template + the wrapper registry + the
session-level default order into a concrete
WrapperPlan: which wrappers to apply, in what order,
with provenance tagging for diagnostics.
Algorithm (4 passes, see SRD-32a §“Algorithm”):
- Trigger fan-out — every wrapper whose
triggers(template)returns true is added withOwnedFieldprovenance. - Transitive closure — close
requires_inneredges, tagging additions withTransitiveFrom. - Constraint validation —
mutually_exclusive_withpairs andrequires_innercycles surface as errors. - Topological order — innermost first, with the
session-level default order breaking ties; then a
forbids_outerpost-scan rejects any ordering that placed a forbidden wrapper outside its inner.
Structs§
- Wrapper
Plan - Resolved wrapper composition for one op template.
- Wrapper
Resolver - Resolves a
WrapperPlanfor a parsed op template.
Enums§
- Resolve
Error - Errors the resolver may surface. Each variant carries enough context for the caller to render an actionable diagnostic without re-walking the registry.
- Wrapper
Activation - How a wrapper came to be in a plan — directly triggered by a field, transitively pulled in by another wrapper, or always-on.
Constants§
- DEFAULT_
ORDER - Default composition order (innermost → outermost). Used by the resolver as a tiebreaker when constraints leave multiple valid orderings.