cadrumo.application.aggregation.terminal_origin_audit module

Audit resolved provenance against each binding’s terminal-origin expectation.

The declaration side states where a binding’s value must ultimately come from (effective_terminal_origins()); the resolvers state where it actually came from (terminal_origin). This module is the join, and it is the only thing that makes either half falsifiable: a value that resolves from a derived calculation where a filed casilla was declared is a complete-looking figure reached by a route nobody authorised, and nothing else on the resolution reports it.

Every disagreement becomes a terminal_origin_mismatch diagnostic. Nothing is coerced, suppressed, or zeroed: the value stays on the resolution exactly as the resolver produced it, and the operator is told the route disagrees with the declaration. Only route-owned (filing_grade) families are audited – a deferred kind is already reported by its own reason, a non_runtime kind runs no resolver to produce provenance, and a mesh-only source has no registration to derive an expectation from.

collect_terminal_origin_diagnostics(revision, resolution)[source]

Return one diagnostic per way a resolved binding departs from its expectation.

Audited per binding rather than per provenance node, so a fold over a thousand transactions reports once and the channel stays readable.

Core types: ModeloRevision.

Return type:

tuple[CalculationSourceDiagnostic, ...]

Parameters: