Skip to content
YosoiDocs

ArchivedContractOutcome

yosoi.runtime_contracts.ArchivedContractOutcome

class ArchivedContractOutcome:

Inspect a portable Contract outcome without a live Rust handle.

Parsing verifies the archive structure; it does not re-execute extraction or prove business success. The original JSON is retained unchanged.

Attributes: view: Immutable status-tagged DTO parsed from the supplied archive JSON.

Source: python/yosoi/runtime_contracts.py:405

Members below are declared on this class. Inherited Pydantic methods and generated constructor signatures are not expanded.

def __init__(self, value: str) -> None:

Parse a portable archive and seal its typed view.

Args: value: Archive JSON emitted by Rust or a retained portable artifact.

Raises: ValueError: JSON is malformed or does not match an archive outcome variant.

Source: python/yosoi/runtime_contracts.py:417

@property
def status(self) -> str:

Return the wire status; it does not alone prove business success.

Source: python/yosoi/runtime_contracts.py:442

@property
def document_id(self) -> str | None:

Return the source document identity when this status carries one.

Source: python/yosoi/runtime_contracts.py:447

@property
def completeness(self) -> IncompleteEvidence | None:

Return incomplete-evidence details for an indeterminate result, else None.

Source: python/yosoi/runtime_contracts.py:452

@property
def reason_code(self) -> str | None:

Return the indeterminate reason code, or None for other statuses.

Source: python/yosoi/runtime_contracts.py:457

@property
def failure(self) -> Failure | ArchivedExtractionFailure | ArchivedValidationFailure | None:

Return the typed phase failure, or None when this status has no failure.

Source: python/yosoi/runtime_contracts.py:462

@property
def records(self) -> tuple[ArchivedValidatedContractRecord, ...]:

Return accepted records for evaluated results, otherwise an empty tuple.

Source: python/yosoi/runtime_contracts.py:469

@property
def issues(self) -> tuple[ArchivedContractRecordIssue, ...]:

Return evaluated candidate issues, or an empty tuple otherwise.

Source: python/yosoi/runtime_contracts.py:474

@property
def extraction_diagnostics(self) -> tuple[ExtractionDiagnostic, ...]:

Return evaluated extraction diagnostics, otherwise an empty tuple.

Source: python/yosoi/runtime_contracts.py:479

def to_json(self) -> str:

Return the original archive JSON unchanged.

Source: python/yosoi/runtime_contracts.py:487

def model_dump(self) -> dict[str, Any]:

Decode the original wire into a new dictionary.

Source: python/yosoi/runtime_contracts.py:491

def model_dump_json(self) -> str:

Return the original archive JSON unchanged.

Source: python/yosoi/runtime_contracts.py:495