DocShell.Generate.Cohort (DocShell v0.5.0)

Copy Markdown View Source

Binds an ordered set of loaded collections to one site profile.

The digest covers portable collection descriptors, their content digests and the profile. Local artifact directories, generation identifiers and build time never enter it, so rebuilding the same source cohort produces the same identity. Collection loading and source authenticity remain separate caller responsibilities; a cohort only identifies admitted portable content.

Summary

Types

t()

A validated source cohort and its canonical SHA-256 identity.

Functions

Validates loaded collections and computes their portable cohort digest.

Returns the canonical, path-free payload used to identify a cohort.

Types

t()

@type t() :: %DocShell.Generate.Cohort{
  collections: [DocShell.Generate.Collection.loaded()],
  digest: String.t(),
  profile: String.t()
}

A validated source cohort and its canonical SHA-256 identity.

Functions

new(collections, profile)

@spec new([DocShell.Generate.Collection.loaded()], String.t()) ::
  {:ok, t()} | {:error, term()}

Validates loaded collections and computes their portable cohort digest.

payload(collections, profile)

@spec payload([DocShell.Generate.Collection.loaded()], String.t()) :: map()

Returns the canonical, path-free payload used to identify a cohort.