judgevet.domain.media_audit

Status: draft.

judgevet.domain.media_audit

Immutable caller-declared media provenance without input content.

Source: https://github.com/Alberto-Codes/judgevet/issues/203#issuecomment-5851443210.

Examples:

from judgevet.domain.media_audit import MediaProvenance

value = MediaProvenance((), {}, "a" * 64, "b" * 64)
assert value.provider_identity is None
See Also

MediaProvenance dataclass

Snapshot fingerprints and opaque caller-declared revision identifiers.

Attributes:

Name Type Description
attachments Sequence[tuple[str, str]]

Ordered immutable ID/digest pairs.

by_question Mapping[str, Sequence[str]]

Immutable ordered associations.

evidence_fingerprint str

Keyed digest of the entire evidence snapshot.

request_fingerprint str

Keyed digest of normalized question definitions.

prompt_revision str | None

Caller-declared opaque prompt revision.

provider_identity str | None

Caller-declared provider identity.

preprocessing_revision str | None

Caller-declared preprocessing revision.

Examples:

value = MediaProvenance((), {}, "a" * 64, "b" * 64)
assert value.attachments == ()

__post_init__()

Validate fields and detach all collection aliases.

Raises:

Type Description
ValueError

A digest, attachment or association is malformed.

TypeError

Revision metadata is neither a string nor None.