Skip to main content

validate_proposal_against_host_state

Function validate_proposal_against_host_state 

Source
pub fn validate_proposal_against_host_state(
    canonical: &CanonicalProposal,
    manifest: &ApplicationBundleManifest,
    registry: &CapabilityRegistry,
) -> Result<Vec<ResolvedProposalNode>, ProposalCrossValidationFailure>
Expand description

Cross-checks a structurally valid proposal against the loaded application manifest and capability registry (spec 109 FR-004, FR-011):

  • every node’s capability must be declared in the manifest (never an undeclared capability, matching the existing “declared set is the only permitted set” pattern used for manifest connector bindings), and its exact pinned artifact_digest must match the registry’s record;
  • every mapping’s source/target JSON-schema fragments must be structurally compatible;
  • every mapping’s field-level data classification must be explicitly declared and accepted (fail closed: an undeclared classification is never treated as safe), and must not flow into a capability whose egress policy denies all connectors when the classification is above Public.

§Errors

Returns ProposalCrossValidationFailure on any undeclared capability, digest mismatch, incompatible mapping schema, or disallowed data flow.