From adc87a92e47b49095bdc917d52a6fed36bfcdacf Mon Sep 17 00:00:00 2001 From: "shangguanxuan.sgx" Date: Wed, 15 Jul 2026 18:31:44 +0800 Subject: [PATCH] ci(schema): support jq 1.8 policy evaluation --- scripts/policy/check-schema-catalog.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/policy/check-schema-catalog.sh b/scripts/policy/check-schema-catalog.sh index 6c1dd185..920dd8f2 100755 --- a/scripts/policy/check-schema-catalog.sh +++ b/scripts/policy/check-schema-catalog.sh @@ -196,6 +196,10 @@ fi binding_count="$(jq '[.bindings[] | length] | add' internal/cli/schema_parameter_bindings.json)" if ! jq -e --slurpfile bindings internal/cli/schema_parameter_bindings.json ' . as $catalog | + ([$bindings[0].bindings | to_entries[] | + .key as $tool | .value | to_entries[] | + {tool: $tool, flag: .key, property: .value} + ]) as $expected | $bindings[0].version == 3 and $bindings[0].baseline.manifest == "schema-parameter-bindings-v3" and ($bindings[0].baseline.sha256 | test("^sha256:[0-9a-f]{64}$")) and @@ -218,10 +222,6 @@ if ! jq -e --slurpfile bindings internal/cli/schema_parameter_bindings.json ' all(($bindings[0].mapping_exclusions // {} | to_entries)[]; (.key | length) > 0 and (.value | length) > 0 ) and - ([$bindings[0].bindings | to_entries[] | - .key as $tool | .value | to_entries[] | - {tool: $tool, flag: .key, property: .value} - ]) as $expected | all($expected[]; . as $binding | $catalog.tools[$binding.tool].parameters[$binding.flag].property == $binding.property