Mondaic

salvus.flow.acta.store.descriptor

salvus.flow.acta.store.descriptor salvus flow acta store descriptor

Typed artifact descriptors referencing raw payload blobs.

A reserved prefix distinguishes descriptors from legacy raw objects. Payloads are not interpreted recursively.

Functions

descriptor_bytes()

def descriptor_bytes(descriptor: ArtifactDescriptor) -> bytes: ...

Encode a descriptor deterministically with its reserved prefix.

Parameters
  • descriptor ArtifactDescriptor — Metadata to store.
Returns bytes

read_descriptor()

def read_descriptor(
    store: ContentStoreBase, digest: str
) -> ArtifactDescriptor | None: ...

Read metadata, or return None for a legacy raw object.

Malformed descriptors raise ValueError. Stored metadata never triggers module imports.

Parameters
  • store ContentStoreBase — Store holding the descriptor.
  • digest str — Descriptor or legacy raw-object digest.
Returns ArtifactDescriptor | None

referenced_digests()

def referenced_digests(
    store: ContentStoreBase, roots: Iterable[str]
) -> set[str]: ...

Expand artifact roots to include their raw payloads.

Retain missing roots without adding dependencies. Propagate other read errors. Raw payloads have no dependencies.

Parameters
  • store ContentStoreBase — Store to inspect.
  • roots Iterable[str] — Descriptor or legacy raw-object digests.
Returns set[str]

Classes

ArtifactDescriptor

class ArtifactDescriptor(builtins.object):
    def __init__(
        self,
        payload: str,
        type_id: str,
        format_id: str,
        format_version: int = 1,
        schema_version: int = 1,
    ) -> None: ...

Describe the reader and payload of one stored value.

Parameters
  • payload str — Digest of the raw serialized bytes.
  • type_id str — Stable logical type identifier.
  • format_id str — Stable serialization format identifier.
  • format_version int — Version of the serialized payload format.
  • schema_version int — Version of this descriptor structure.