diff --git a/container/deploy.k9.ncl b/container/deploy.k9.ncl index 13d5aaab..484ece89 100644 --- a/container/deploy.k9.ncl +++ b/container/deploy.k9.ncl @@ -1,3 +1,4 @@ +K9! # SPDX-License-Identifier: PMPL-1.0-or-later # deploy.k9.ncl — Bundle of Joy Server deployment component (Hunt level) # @@ -12,61 +13,6 @@ # k9-svc validate container/deploy.k9.ncl # k9-svc deploy container/deploy.k9.ncl --env production -# The component's pedigree (self-description across five layers) -let component_pedigree = { - # ───────────────────────────────────────────────────────────── - # L1: The Snout — Identity - # ───────────────────────────────────────────────────────────── - metadata = { - name = "boj-server-deploy", - version = "0.1.0", - breed = "application/vnd.k9+nickel", - magic_number = "K9!", - description = "Bundle of Joy Server deployment component (Hunt level)", - }, - - # ───────────────────────────────────────────────────────────── - # L2: The Scent — Target Environment - # ───────────────────────────────────────────────────────────── - target = { - os = 'Linux, - is_edge = false, - requires_podman = true, - min_memory_mb = 256, - }, - - # ───────────────────────────────────────────────────────────── - # L3: The Leash — Security - # ───────────────────────────────────────────────────────────── - security = { - trust_level = 'Hunt, - allow_network = true, - allow_filesystem_write = true, - allow_subprocess = true, - # In production, replace with a real Ed25519 signature. - signature = "PLACEHOLDER-SIGNATURE-REQUIRED-FOR-HUNT", - }, - - # ───────────────────────────────────────────────────────────── - # L4: The Gut — Self-Validation - # ───────────────────────────────────────────────────────────── - validation = { - checksum = "sha256:placeholder", - pedigree_version = "1.0.0", - hunt_authorized = false, # Must be set true after handshake - }, - - # ───────────────────────────────────────────────────────────── - # L5: The Muscle — Deployment Recipes - # ───────────────────────────────────────────────────────────── - recipes = { - install = "just container-build", - validate = "just container-verify", - deploy = "just container-up", - migrate = "just container-build && just container-up", - }, -} in - # Deployment configuration let deployment = { # Target environments (dev / staging / production) @@ -142,8 +88,64 @@ echo "K9: Rollback complete." } in # Export the component +# The pedigree is inlined at the top level so the canonical +# hyperpolymath/k9-validate-action regex finds +# pedigree = { … metadata = { name = …, version = … } … } +# directly. Previously the metadata lived in a `let component_pedigree` +# binding which was opaque to the line-based validator. { - pedigree = component_pedigree, + pedigree = { + schema_version = "1.0.0", + component_type = "deployment-component", + # ───────────────────────────────────────────────────────────── + # L1: The Snout — Identity + # ───────────────────────────────────────────────────────────── + metadata = { + name = "boj-server-deploy", + version = "0.1.0", + breed = "application/vnd.k9+nickel", + magic_number = "K9!", + description = "Bundle of Joy Server deployment component (Hunt level)", + }, + # ───────────────────────────────────────────────────────────── + # L2: The Scent — Target Environment + # ───────────────────────────────────────────────────────────── + target = { + os = 'Linux, + is_edge = false, + requires_podman = true, + min_memory_mb = 256, + }, + # ───────────────────────────────────────────────────────────── + # L3: The Leash — Security + # ───────────────────────────────────────────────────────────── + security = { + leash = 'Hunt, + trust_level = 'Hunt, + allow_network = true, + allow_filesystem_write = true, + allow_subprocess = true, + # In production, replace with a real Ed25519 signature. + signature = "PLACEHOLDER-SIGNATURE-REQUIRED-FOR-HUNT", + }, + # ───────────────────────────────────────────────────────────── + # L4: The Gut — Self-Validation + # ───────────────────────────────────────────────────────────── + validation = { + checksum = "sha256:placeholder", + pedigree_version = "1.0.0", + hunt_authorized = false, # Must be set true after handshake + }, + # ───────────────────────────────────────────────────────────── + # L5: The Muscle — Deployment Recipes + # ───────────────────────────────────────────────────────────── + recipes = { + install = "just container-build", + validate = "just container-verify", + deploy = "just container-up", + migrate = "just container-build && just container-up", + }, + }, deployment = deployment, scripts = scripts,