fix: proto-get case-insensitive keyword lookup
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s

proto-get was using getf which does eq comparison, so :EXPLANATION
from the LLM response didn't match :explanation in the policy gate.
Now iterates the plist and compares uppercased strings.
This commit is contained in:
2026-05-03 20:28:10 -04:00
parent 59fef20630
commit 7dad50910f
2 changed files with 12 additions and 4 deletions

View File

@@ -44,8 +44,12 @@ Returns the value associated with KEY in PLIST by interning a keyword.
;; REPL-VERIFIED: 2026-05-03T13:00:00
#+begin_src lisp
(defun proto-get (plist key)
"Look up KEY in PLIST with keyword normalization."
(getf plist (if (keywordp key) key (intern (string-upcase (string key)) :keyword))))
"Look up KEY in PLIST with case-insensitive keyword normalization."
(let ((key-upcase (string-upcase (string key))))
(loop for (k v) on plist by #'cddr
when (and (keywordp k)
(string-equal (string k) key-upcase))
do (return v))))
#+end_src
** Actuator Registry