parse_execution_receipt (receipt)

lean-ctx · packages/python-lean-ctx/lean_ctx/receipt.py · python · Apache-2.0
dev-tools, pos, tag:schema-validation, tag:evidence-parsing, tag:integrity-check

Parses and validates a sealed Runtime response into a frozen ExecutionReceipt evidence view, enforcing schema, coverage, and integrity constraints.

# Source: https://github.com/yvgude/lean-ctx | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
def parse_execution_receipt(
    payload: object,
    *,
    verify_url: Optional[str] = None,
    proxy: object = None,
) -> ExecutionReceipt:
    """Parse the sealed Runtime response into the frozen Python evidence view."""
    if not isinstance(payload, Mapping):
        raise LeanCtxError("malformed Runtime receipt response")
    source = _receipt_source(payload)
    canonical_json, canonical_object = _canonical_payload(source)
    for key, value in canonical_object.items():
        source.setdefault(key, value)

    schema_version = source.get("schema_version")
    integration_depth = 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key