Skip to content

Commit 842fa96

Browse files
hyperpolymathclaude
andcommitted
fix(vclt-gate): reject on levels[].status=="fail", not never-emitted "admitted"
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) <noreply@anthropic.com>
1 parent 43feed3 commit 842fa96

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

elixir-orchestration/lib/verisim/query/vclt_gate.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ defmodule VeriSim.Query.VCLTGate do
155155
{:ok, %{"levels" => levels}} when is_list(levels) ->
156156
failed =
157157
levels
158-
|> Enum.reject(fn l -> l["admitted"] == true end)
158+
|> Enum.filter(fn l -> l["status"] == "fail" end)
159159
|> Enum.map(fn l ->
160160
"#{l["name"]} (L#{l["level"]}): #{l["reason"] || "rejected"}"
161161
end)

elixir-orchestration/test/verisim/query/vclt_gate_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ defmodule VeriSim.Query.VCLTGateTest do
5454

5555
File.write!(stub, """
5656
#!/bin/sh
57-
echo '{"certified_level":-1,"levels":[{"level":4,"name":"InjectionProof","admitted":false,"reason":"SQL injection detected"}]}'
57+
echo '{"certified_level":-1,"levels":[{"level":4,"name":"InjectionProof","status":"fail","reason":"SQL injection detected"}]}'
5858
exit 1
5959
""")
6060

0 commit comments

Comments
 (0)