From 4f61bbea5c841adc682462c1594677ac4b295d5c Mon Sep 17 00:00:00 2001 From: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com> Date: Sun, 14 Jun 2026 15:31:05 +0100 Subject: [PATCH] fix(vclt-gate): reject on levels[].status=="fail", not never-emitted "admitted" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extract_reasons rejected levels where l["admitted"]==true, but the vcl-ut gate producer never emits an "admitted" key — it emits per-level status in {"pass","fail"}. The reject therefore kept every level and mis-listed passing levels as rejection reasons. Switch to Enum.filter(status=="fail") so `failed` holds the genuinely-failing levels, and update the test stub to the real status schema (it had fabricated an "admitted" key, masking the drift across the cross-repo seam). Co-Authored-By: Claude Opus 4.8 (1M context) --- elixir-orchestration/lib/verisim/query/vclt_gate.ex | 2 +- elixir-orchestration/test/verisim/query/vclt_gate_test.exs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/elixir-orchestration/lib/verisim/query/vclt_gate.ex b/elixir-orchestration/lib/verisim/query/vclt_gate.ex index 3a941cf..5f2279e 100644 --- a/elixir-orchestration/lib/verisim/query/vclt_gate.ex +++ b/elixir-orchestration/lib/verisim/query/vclt_gate.ex @@ -155,7 +155,7 @@ defmodule VeriSim.Query.VCLTGate do {:ok, %{"levels" => levels}} when is_list(levels) -> failed = levels - |> Enum.reject(fn l -> l["admitted"] == true end) + |> Enum.filter(fn l -> l["status"] == "fail" end) |> Enum.map(fn l -> "#{l["name"]} (L#{l["level"]}): #{l["reason"] || "rejected"}" end) diff --git a/elixir-orchestration/test/verisim/query/vclt_gate_test.exs b/elixir-orchestration/test/verisim/query/vclt_gate_test.exs index c587643..6de8b4c 100644 --- a/elixir-orchestration/test/verisim/query/vclt_gate_test.exs +++ b/elixir-orchestration/test/verisim/query/vclt_gate_test.exs @@ -54,7 +54,7 @@ defmodule VeriSim.Query.VCLTGateTest do File.write!(stub, """ #!/bin/sh - echo '{"certified_level":-1,"levels":[{"level":4,"name":"InjectionProof","admitted":false,"reason":"SQL injection detected"}]}' + echo '{"certified_level":-1,"levels":[{"level":4,"name":"InjectionProof","status":"fail","reason":"SQL injection detected"}]}' exit 1 """)