artifact_import

Receipt-bound, atomic imports of immutable Puzzletron campaign artifacts.

Functions

import_campaign_artifacts

Validate and physically import selected bundles as one campaign-root transaction.

exception ArtifactImportError

Bases: RuntimeError

Raised when an artifact import cannot prove that publication is safe.

import_campaign_artifacts(source_root, destination_root, receipt_path, *, bundles=None, dry_run=False, target_config_path=None)

Validate and physically import selected bundles as one campaign-root transaction.

The source bytes must exactly match a deterministic version-2 inventory receipt. A new destination is assembled in a sibling temporary directory, validated, made read-only, and renamed atomically. Supplying target_config_path additionally publishes imported semantic completion evidence for executable stages; bypass remains report-only evidence.

Parameters:
  • source_root (str | Path)

  • destination_root (str | Path)

  • receipt_path (str | Path)

  • bundles (Iterable[str] | None)

  • dry_run (bool)

  • target_config_path (str | Path | None)

Return type:

dict[str, Any]