Skip to content
docsv0.1.0

GovernanceRun

A governance run: the real, observable evidence that a set of gates was executed — who invoked it, what produced it, when, and with what verdicts. It is the observed fact that, compared against a GovernancePlan, gives life to the `outcome` of each GovernanceGate (today always null in the compiled plan).

GovernanceRun::__construct()

public function __construct(string $schemaVersion, string $runId, string $profileHash, string $planHash, Milpa\Governance\InvocationIdentity $invokedBy, Milpa\Governance\ProducerIdentity $producer, string $source, DateTimeImmutable $startedAt, DateTimeImmutable $finishedAt, array $assumptions, array $outcomes):

Parameters

Parameters of __construct()
NameTypeDescription
$schemaVersionstringSchema version of the run
$runIdstringUnique identifier of the run
$profileHashstringIntegrity hash of the profile in effect at the time of the run
$planHashstringIntegrity hash of the plan in effect at the time of the run
$invokedByInvocationIdentityWho invoked the run
$producerProducerIdentityWhat produced the evidence
$sourcestringOrigin of the run (e.g.: "local", "ci")
$startedAt\DateTimeImmutableStart time
$finishedAt\DateTimeImmutableFinish time
$assumptionsarray<string, mixed>Assumptions in effect at the time of the run
$outcomesarray<GateOutcomeRecord>Verdicts of the evaluated gates

GovernanceRun::toArray()

public function toArray(): array

Serializes the run to an array for storage or transmission. Dates are serialized in ISO-8601 (ATOM format); verdicts, via their own `toArray()`.