salvus.flow.acta.memo.envelope
salvus.flow.acta.memo.envelope salvus flow acta memo envelope Cache-key envelopes.
Keys hash the canonical encoding of kv, task, impl, args,
tenant, and optional salt. Arguments are represented by name and
digest; salt contains the source fingerprint when impl is not explicit.
Functions
build_envelope()
build_envelope()def build_envelope(
task: str,
impl_version: int,
args: Mapping[str, str],
tenant: str = "local",
salt: str | None = None,
) -> dict[str, object]: ...Assemble the key envelope for one task execution.
Parameters
taskstr — Registered task name.impl_versionint — The task’s semantic implementation version.argsMapping[str, str] — Argument names mapped to digests, including effective defaults. Seesession.arguments.key_arguments.tenantstr — Tenant id. Constant"local"today.saltstr | None — Source fingerprint for tasks without an explicitimpl. Omitted whenNone.
Returns dict[str, object] — The envelope as a plain mapping, ready for
envelope_key or for storing verbatim in a manifest.envelope_key()
envelope_key()def envelope_key(envelope: Mapping[str, object]) -> str: ...Compute the cache key for an envelope.
Parameters
envelopeMapping[str, object] — An envelope as returned bybuild_envelope.
Returns str — The content digest of the envelope’s canonical JSON form.