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.
Methods
Section titled “Methods”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
status
Section titled “status”@property
def status(self) -> str:
Return the wire status; it does not alone prove business success.
Source: python/yosoi/runtime_contracts.py:442
document_id
Section titled “document_id”@property
def document_id(self) -> str | None:
Return the source document identity when this status carries one.
Source: python/yosoi/runtime_contracts.py:447
completeness
Section titled “completeness”@property
def completeness(self) -> IncompleteEvidence | None:
Return incomplete-evidence details for an indeterminate result, else None.
Source: python/yosoi/runtime_contracts.py:452
reason_code
Section titled “reason_code”@property
def reason_code(self) -> str | None:
Return the indeterminate reason code, or None for other statuses.
Source: python/yosoi/runtime_contracts.py:457
failure
Section titled “failure”@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
records
Section titled “records”@property
def records(self) -> tuple[ArchivedValidatedContractRecord, ...]:
Return accepted records for evaluated results, otherwise an empty tuple.
Source: python/yosoi/runtime_contracts.py:469
issues
Section titled “issues”@property
def issues(self) -> tuple[ArchivedContractRecordIssue, ...]:
Return evaluated candidate issues, or an empty tuple otherwise.
Source: python/yosoi/runtime_contracts.py:474
extraction_diagnostics
Section titled “extraction_diagnostics”@property
def extraction_diagnostics(self) -> tuple[ExtractionDiagnostic, ...]:
Return evaluated extraction diagnostics, otherwise an empty tuple.
Source: python/yosoi/runtime_contracts.py:479
to_json
Section titled “to_json”def to_json(self) -> str:
Return the original archive JSON unchanged.
Source: python/yosoi/runtime_contracts.py:487
model_dump
Section titled “model_dump”def model_dump(self) -> dict[str, Any]:
Decode the original wire into a new dictionary.
Source: python/yosoi/runtime_contracts.py:491
model_dump_json
Section titled “model_dump_json”def model_dump_json(self) -> str:
Return the original archive JSON unchanged.