Forge.Manifest (Forge v0.1.1)

View Source

Pipeline manifest for reproducibility and lineage tracking.

Captures the complete configuration of a pipeline run, including:

  • Source, stage, and measurement configurations
  • Git SHA for code versioning
  • Secrets used (names only, never values)
  • Deterministic hashing for drift detection

Example

manifest = Forge.Manifest.from_pipeline(pipeline, git_sha: "abc123")

# Hash for comparison
hash = Forge.Manifest.hash(manifest)

# Check equivalence
Forge.Manifest.equivalent?(manifest1, manifest2)

Summary

Functions

Check if two manifests are equivalent.

Generate manifest from pipeline config.

Hash the manifest for comparison.

Types

t()

@type t() :: %Forge.Manifest{
  created_at: DateTime.t(),
  git_sha: String.t() | nil,
  measurement_configs: [map()],
  pipeline_name: atom(),
  secrets_hash: String.t(),
  secrets_used: [String.t()],
  source_config_hash: String.t(),
  stage_configs: [map()]
}

Functions

equivalent?(m1, m2)

Check if two manifests are equivalent.

Manifests are considered equivalent if their hashes match, meaning the pipeline configuration is identical.

from_pipeline(pipeline, opts \\ [])

Generate manifest from pipeline config.

Options

  • :git_sha - Git commit SHA (default: attempts to detect from git)
  • :secrets - List of secret names used (default: [])

Examples

pipeline = %{
  name: :my_pipeline,
  source_module: MySource,
  source_opts: [batch_size: 100],
  stages: [{MyStage, [param: "value"]}],
  measurements: [{MyMeasurement, []}]
}

manifest = Forge.Manifest.from_pipeline(pipeline)

hash(manifest)

Hash the manifest for comparison.

Produces a deterministic SHA256 hash of the manifest contents.