From 458fc935e0fcf307929fd015e44720edf4e4e8cc Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Thu, 14 May 2026 13:00:34 +0100 Subject: [PATCH] fix(validate-k9): drop premature `continue` so pedigree.metadata.name resolves MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pedigree block opener (`pedigree = {`) was matched, `in_pedigree=true` was set, then `continue` skipped the brace-counting block below for *that same line*. Result: the opening `{` on the pedigree-opener line is never added to `pedigree_depth`. When the FIRST nested block closes (e.g. `security = { … },`), `pedigree_depth` drops to 0 and the end-of-pedigree check fires — even though we are still inside the pedigree block. Any field declared in a later sibling block (e.g. `metadata = { name = … }`) is therefore never scanned, and every K9 file that puts `name` under `pedigree.metadata` is flagged `Missing 'name' field`. Removing the `continue` lets the brace counter on lines 156-160 process the pedigree-opener line normally, so depth tracks correctly: * `pedigree = {` → depth 0 → 1 * `security = {` → depth 1 → 2 * `},` (close security) → depth 2 → 1 * `metadata = {` → depth 1 → 2 ← (was already 0, used to exit here) * `name = "…"` → matches name field * `},` (close metadata) → depth 2 → 1 * `},` (close pedigree) → depth 1 → 0, in_pedigree=false Without this fix, `Validate K9 contracts` is red on every estate consumer that uses the standard K9 templates (template-yard.k9.ncl, template-kennel.k9.ncl, template-hunt.k9.ncl, examples/*). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- validate-k9.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/validate-k9.sh b/validate-k9.sh index c81dab2..fa8f32b 100755 --- a/validate-k9.sh +++ b/validate-k9.sh @@ -149,7 +149,6 @@ validate_k9() { has_pedigree=true in_pedigree=true pedigree_depth=0 - continue fi if [[ "$in_pedigree" == "true" ]]; then