solprop.output.scan_artifacts#

Store durable queue results without loading Python objects from files.

Functions

artifact_digest(path)

Hash a complete artifact with bounded memory.

read_artifact(path, identity, *[, digest])

Validate and read a durable point without unpickling executable content.

write_artifact(path, result, identity)

Write and fsync one private artifact before publishing its filename.

solprop.output.scan_artifacts.artifact_digest(path)[source]#

Hash a complete artifact with bounded memory.

Parameters:
pathpathlib.Path

Closed artifact file.

Returns:
str

SHA-256 of the exact file bytes.

solprop.output.scan_artifacts.read_artifact(path, identity, *, digest=None)[source]#

Validate and read a durable point without unpickling executable content.

Parameters:
pathpathlib.Path

Published artifact file.

identitymapping

Required scan, point and optional owner identifiers.

digeststr or None, optional

Expected digest from the durable queue state.

Returns:
PointResult

Validated result with host arrays.

Raises:
OutputError

If the file is from another scan, point or owner, or its digest changed.

solprop.output.scan_artifacts.write_artifact(path, result, identity)[source]#

Write and fsync one private artifact before publishing its filename.

Parameters:
pathpathlib.Path

Unique, unpublished worker-local filename on the shared filesystem.

resultPointResult

Complete successful or failed point result.

identitymapping

Scan digest, point digest and ownership token.

Raises:
OutputError

If the status or successful payload violates its contract.