Skip to content

ump_spec.models.infra

module ump-spec

Infrastructure records: lineage edges (§6), log entries and proofs (§18), CloudEvents (§19), jobs (Temporal stand-in) and run records (§13).

class

class LineageEdge(StrictModel)

Fields

NameTypeDefaultDescription
from_idstrUpstream (source) artifact id.
to_idstrDownstream artifact id.
link_typeLinkType
prov_relationstr | NoneNone
rolestr | NoneNone
created_atdatetime | NoneNone
Methods and properties (1)

with_prov method

def with_prov(self) -> LineageEdge

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 27

class

class LogEntry(StrictModel)

Spec §18 log entry: the record appended under a domain tag. The leaf is SHA-256(0x00 || domain_tag || 0x0A || JCS(log_entry)); the record itself is bound by content_hash.

Fields

NameTypeDefaultDescription
record_idstrId of the sealed record (approval, decision, override, …).
kindstrKind of the sealed record.
content_hashstrsha256 of the RFC 8785 bytes of the complete stored record, governance members included (differs from the §6 artifact content hash).
key_versionstrVersion of the key that signed the record.
signed_atdatetimeInstant the record was sealed (RFC 3339, UTC, Z, milliseconds).
subject_refstr | NoneNoneHMAC-SHA-256(k_subject, person_ref), only when the record relates to a person (§18 Erasure).

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 42

class

class CheckpointSignature(StrictModel)

Fields

NameTypeDefaultDescription
namestr
key_idstr
signaturestrbase64 Ed25519 signature over the checkpoint body.

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 59

class

class TimestampToken(StrictModel)

RFC 3161 time-stamp token held beside a checkpoint, never a cosignature (spec §18). The POC signs with a local key standing in for a TSA (tsa: poc-standin); a real token is a CMS SignedData blob.

Fields

NameTypeDefaultDescription
tsastr'poc-standin'Which TSA issued the token; poc-standin is the local key.
namestrTSA key name.
key_idstrKey hash of the TSA key, as for a signed-note signer.
gen_timedatetimegenTime: the checkpoint’s time.
message_imprintstrhex SHA-256 over the checkpoint’s signed-note bytes as first published by the log (body, blank line and the log’s own signature lines), before any cosignature.
noncestr
cert_reqboolTrue
signaturestrbase64 Ed25519 signature over the canonical token fields (stand-in).

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 65

class

class Checkpoint(StrictModel)

C2SP tlog-checkpoint: the signed body is origin, decimal tree size and base64 root hash only. Its time is the genTime of the RFC 3161 token held beside it (tsa_token), never a line in the body.

Fields

NameTypeDefaultDescription
originstr'ump.poc/log'
sizeint
root_hashstrhex
timestampdatetimegenTime of tsa_token once stamped; not part of the signed body.
signatureslist[CheckpointSignature]list()
tsa_tokenTimestampToken | NoneNone

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 82

class

class InclusionProof(StrictModel)

Fields

NameTypeDefaultDescription
leaf_indexint
tree_sizeint
leaf_hashstr
audit_pathlist[str]
root_hashstr

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 94

class

class ConsistencyProof(StrictModel)

Fields

NameTypeDefaultDescription
first_sizeint
second_sizeint
first_rootstr
second_rootstr
prooflist[str]

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 102

class

class CloudEvent(StrictModel)

CloudEvents 1.0.2 structured JSON with UMP extension attributes. IDs and states only.

Vendor extension attributes (x<prefix><name>, spec §21) are kept on round trip; their values are strings, integers or booleans. Any other unknown attribute is refused.

Fields

NameTypeDefaultDescription
specversionLiteral['1.0']'1.0'
idstr
sourcestr
typestr
timedatetime | NoneNone
subjectstr | NoneNone
datacontenttypestr | None'application/json'
artifactidstr | NoneNone
artifactversionint | NoneNone
artifactseqint | NoneNone§19: strictly increasing per artifact, whatever the event type.
scopestr | NoneNone
datadict[str, Any] | NoneNone

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 115

class

class JobStep(StrictModel)

Fields

NameTypeDefaultDescription
namestr
statusLiteral['pending', 'running', 'succeeded', 'failed', 'skipped']'pending'
started_atdatetime | NoneNone
ended_atdatetime | NoneNone
detailstr''
datadict[str, Any] | NoneNoneOptional structured progress for UIs (e2e runner: key, title, plain_summary, status, facts, links, ids, technical_log).

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 151

class

class Job(StrictModel)

Spec §19 job: state, steps and, once terminal, result or problem (RFC 9457).

Fields

NameTypeDefaultDescription
idstr
kindstr
stateJobState'queued'
stepslist[JobStep]list()
progressfloat0.0
paramsdict[str, Any]dict()
resultAnyNone
problemProblem | NoneNone
principalstr | NoneNoneWho submitted the job. Job routes show and cancel it only for this principal, a service, an ops role or a caller scoped to client_id.
client_idstr | NoneNoneThe client the job works on, when it has one. A job with no client is visible only to its submitter, services and ops roles.
created_atdatetime | NoneNone
updated_atdatetime | NoneNone

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 168

class

class RunRecord(StrictModel)

Fields

NameTypeDefaultDescription
idstr | NoneNone
toolstre.g. ‘adapter:redacted-engine/fit’ or ‘newton:actor/draft_decision’.
enginestr | NoneNone
engine_versionstr | NoneNone
code_commitstr | NoneNone
lockfile_hashstr | NoneNone
image_digeststr | NoneNone
dataset_hasheslist[str]list()
seedslist[int]list()
principalstr | NoneNone
inputs_digeststr | NoneNone
outputs_digeststr | NoneNone
audit_levelLiteral[1, 2, 3, 4]2
started_atdatetime | NoneNone
ended_atdatetime | NoneNone
artifact_idslist[str]list()
statusLiteral['succeeded', 'failed', 'refused']'succeeded'
session_idstr | NoneNoneAgent or UI session the call belonged to (Newton reader/actor sessions).

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 187

function

def run_audit_level(rec: RunRecord, deterministic_given_seed: bool) -> int

§13: a level 3 or 4 claim needs a lockfile, an image digest, the code commit and the dataset hashes; without any of them the run is capped at level 2. Level 4 also needs seeds and a deterministic engine.

Source: packages/ump-spec/src/ump_spec/models/infra.py, line 209

NameTypeValueDescription
LinkTypeLiteral['derived_from', 'calibrated_by', 'designed_from', 'scored_against', '...
PROV_RELATIONdict[str, str]{'derived_from': 'wasDerivedFrom', 'calibrated_by': 'wasInfluencedBy', 'desig...
DomainTagLiteral['ump/decision/v1', 'ump/gate/v1', 'ump/run/v1', 'ump/approval/v1', 'u...
EVENT_EXTENSION_PATTERN'^x[a-z0-9]+$'§21: a vendor event attribute is x + registered prefix + name, [a-z0-9] only (CloudEvents 1.0.2).
JobStateLiteral['queued', 'running', 'succeeded', 'failed', 'cancelled']Spec §19 job states; terminal states (succeeded, failed, cancelled) never change.
JobStatusJobStateDeprecated Python alias of JobState (the wire member is state).