Part V — The Modern Experience Layer · Chapter 33 · Lesson 1 of 2
Signed packages, SBOMs and provenance
v2.1.0 moved PeaLang from "the release pipeline has good intentions" to "the release pipeline emits verifiable evidence". The functions live in guides/pealang/supply_chain.py and are exposed through the analysis namespace, right next to the packaging tooling from Chapter 11.
Package metadata and signing
let meta = PackageMetadata({
"name": "pricing-rules",
"version": "1.4.0",
"dependencies": ["std.collections", "std.json"]
})
let sig = sign_payload(payload_bytes)
let ok = verify_signature(payload_bytes, sig)
PackageMetadata is the structured manifest record — name, version, dependencies, hashes, policy. sign_payload produces a hex signature over the raw bytes; verify_signature checks it. Sign source trees, wheels and PEAC artifacts exactly the same way — one primitive, one verifier, no per-artifact special cases, which is precisely what makes it auditable.
Resolving dependencies
let plan = resolve_dependencies(index, {
"pricing-rules": "^1.4",
"logging-config": "~2.0"
})
resolve_dependencies computes a consistent resolution from an index — deterministic, explainable, and reproducible: the same inputs yield the same plan on every machine. SupplyChainIndex is the index itself: publish versions, resolve ranges, search capabilities, and scan before install. If you have ever burned an afternoon to "works on my machine", this is the layer where that stops being an acceptable answer.
Checksums and SBOMs
let sums = artifact_checksums("dist/pkg.whl", "dist/pkg-1.4.0.tar.gz")
write_checksums(sums, "dist/SHA256SUMS")
let sbom = generate_sbom("pricing-rules", "1.4.0", ["std.collections", "std.json"])
let inv = dependency_inventory(sbom)
sha256_file hashes one file; artifact_checksums and write_checksums produce the release manifest; generate_sbom builds a component inventory — name, version, license-relevant metadata — in a standard shape; dependency_inventory flattens it into review-friendly rows for auditors. verify_wheel and verify_source_archive check an artifact against an expected hash; wire these into installation flows, not just release verification. An SBOM nobody verifies is a PDF with ambition.
Provenance and reproducibility
let prov = build_provenance({
"builder": "ci",
"source": "git+https://github.com/PeaBox-Lab/PeaLang@<commit-sha>",
"materials": ["pyproject.toml", "spec/"]
})
let meta = reproducible_build_metadata(prov)
let ok = migration_check(prov)
build_provenance records who built what, from which source, with what materials — the attestation your downstream consumers need. reproducible_build_metadata captures the knobs that make byte-identical output: pinned interpreters, lockfiles, normalized timestamps, locale-free builds. migration_check validates that an upgrade path won't silently break consumers before you ship it — the difference between a migration guide and a compatibility guarantee.
Release gates
let checklist = release_checklist({
"signing": true, "sbom": true, "provenance": true,
"conformance": "500+", "differential": "pass", "rollback": true
})
let ready = readiness_assessment(checklist)
release_checklist encodes the gate set — signing, SBOM, provenance, conformance, differential tests, rollback plan. readiness_assessment scores the checklist and tells you explicitly what blocks the release. containerfile(...) generates a Containerfile for reproducible images; ci_matrix(platform, matrix) produces the cross-platform CI plan from platform rows. Both remove the "we meant to do that but ran out of week" step from release engineering.
How this composes with Chapter 24
Chapter 24 taught the discipline: manifests, hashes, SBOMs, RC validation, rollback. v2.1.0 implements that discipline as callable functions. If you already build releases with external tooling, keep it if it emits the same evidence; the goal is not uniformity, it is verifiable output. What should stop being acceptable by now: releases whose only evidence is a green CI badge.
Guided practice
- Generate an SBOM for one of your services; diff two consecutive builds and confirm only the version line moved.
- Sign a PEAC artifact, then flip one byte and watch
verify_signaturefail — do this once, deliberately, so you trust the mechanism. - Add
verify_wheelto the installation instructions for anyone embedding PeaLang; most installs verify nothing today. - Run
readiness_assessmenton your last release and file whatever blocks it — or don't, and find out in an incident review.