Skip to main content

violations

Function violations 

Source
pub fn violations(
    artifacts: &[Artifact],
    schemas: &GeneratedSchemas,
) -> Vec<Violation>
Expand description

Every way a plan can be wrong, checked before a byte is written.

Three properties, and they are the whole of the enforcement rule project.generated-artifacts-are-typed@1:

  1. Every artifact carries a provenance header in the form its encoding allows — members in JSON, a comment banner in YAML and text, an HTML comment in Markdown — except the provider bootstraps, which stamp themselves with the policy hash they were rendered from and are checked by majordomus update instead.
  2. Every structured artifact parses, and a document that declares a schema satisfies the contract published for it under share/schemas/generated/.
  3. The manifest is the plan: exactly the artifacts of the plan, each with the encoding, contract, size and hash it actually has.