Skip to content

Commit fc09fad

Browse files
committed
fix(k9): make deploy.k9.ncl pedigree a literal field the validator can read
k9-validate scans for a line-anchored literal 'pedigree = {' field and cannot follow the 'let component_pedigree' indirection (it was matching the bare 'pedigree = component_pedigree' reference and reporting all fields missing). Inline a visible pedigree block with schema_version/component_type/security_level/metadata.name, merged (& component_pedigree) with the full L1-L5 pedigree so nothing is lost. Mirrors the passing template-hunt.k9.ncl shape. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWMMxryCcPrAjJ8tuGvygG
1 parent 4925a02 commit fc09fad

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

container/deploy.k9.ncl

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ K9!
1414
# k9-svc deploy container/deploy.k9.ncl --env production
1515

1616
# The component's pedigree (self-description across five layers)
17-
let pedigree = {
17+
let component_pedigree = {
1818
# Top-level identity fields — duplicated from metadata so the K9
1919
# validator (which inspects the literal `pedigree = { ... }` block
2020
# at the toplevel of the file rather than the resolved Nickel value)
2121
# can locate name / version / security_level without resolving the
2222
# `component_pedigree` indirection.
2323
name = "{{SERVICE_NAME}}-deploy",
2424
version = "{{VERSION}}",
25-
security_level = "hunt",
2625

2726
# ─────────────────────────────────────────────────────────────
2827
# L1: The Snout — Identity
@@ -154,7 +153,19 @@ echo "K9: Rollback complete."
154153

155154
# Export the component
156155
{
157-
pedigree = pedigree,
156+
pedigree = {
157+
# k9-validate scans for a literal `pedigree = { … }` field (it cannot
158+
# follow the `let component_pedigree` indirection). This visible block
159+
# carries the required identity/security fields; `& component_pedigree`
160+
# then layers on the full L1–L5 component pedigree.
161+
schema_version = "1.0.0",
162+
component_type = "deployment",
163+
security_level = "hunt",
164+
metadata = {
165+
name = "{{SERVICE_NAME}}-deploy",
166+
version = "{{VERSION}}",
167+
},
168+
} & component_pedigree,
158169
deployment = deployment,
159170
scripts = scripts,
160171

0 commit comments

Comments
 (0)