Bundle compilation, signing, and publication¶
A bundle becomes enforceable through five steps, in order. Each one can refuse, and a bundle that has not completed all five cannot affect a run.
The five steps¶
flowchart LR
AU["Author<br/>bundle document"]
SA["Signing authority<br/>for the target level"]
subgraph CP["CONTROL PLANE"]
direction TB
LC{{"1 lint, 2 compile<br/>canonical form"}}
CAT[("3 and 4 Catalog<br/>signed, content-addressed,<br/>immutable")]
AG[("5 Attachment graph<br/>level, bundle@version")]
LC --> CAT
CAT --> AG
end
AU --> LC
LC -->|"compiled form"| SA
SA -->|"signature"| CAT
The signing authority sits outside the control plane's decision and signs the compiled form, so what the catalog holds is exactly what was signed. A bundle reaches a run only through the attachment graph, and only after it is in the catalog.
| Step | Produces | Refuses when |
|---|---|---|
| Lint | A validated document | The schema fails, a condition does not parse, an effect's arguments do not match, or a reference does not resolve |
| Compile | The canonical form, with shorthand expanded and extensions flattened | The document does not reduce to the closed rule shape |
| Sign | A signature by an authority | The signer is not authoritative for the level being targeted |
| Publish | An immutable, content-addressed version in the catalog | Lint did not pass |
| Attach | An entry in the attachment graph | The level or version does not resolve |
Lint blocks publication¶
A bundle that does not reduce to the canonical form cannot enter the system. That is the guarantee behind everything downstream: the kernel can always enforce what it is handed, because nothing unenforceable was ever admitted.
Rules the kernel cannot mechanically enforce are blocked at this step rather than accepted and ignored at run time.
Compilation flattens, it does not interpret¶
Compilation expands authoring shorthand and flattens extends: chains into one
document in the closed rule shape. What is stored is the expanded form, so what
is signed is what will be enforced.
Nothing is interpreted later. A bundle's meaning is fixed at compile time, which is why a run's policy can be resolved at build time and shipped with the recipe. See The CP recipe.
Signing authority follows the level¶
Higher attachment levels require correspondingly authoritative signing roles. A bundle destined for the tenant level cannot be signed by an authority that only governs a project.
The signature is over the compiled form, so a bundle cannot be signed in one shape and published in another.
Publication is immutable and content-addressed¶
A published bundle version does not change. An edit produces a new version, and attachments pin versions explicitly.
Auto-tracking a moving version is opt-in per attachment and never the default, so a bundle republished upstream does not silently change what is enforced somewhere else.
Attachment is a separate act¶
Publishing puts a bundle in the catalog; attaching puts it in force. The two are separate so that a bundle can be published, reviewed and previewed before anything is governed by it. See Attachment resolution across the hierarchy.
What a published bundle carries into a decision¶
Every policy decision records the bundle and the version that contributed the rule, alongside the attachment level it attached at. An auditor reading a decision can therefore trace it to a specific published artifact rather than to a policy state that has since moved on.