From 9ae5d03f14f57f837255c720eb09b3ed753cdfa5 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Sun, 19 Apr 2026 19:56:30 -0400 Subject: [PATCH] debug(protocol): Log rejected messages in validator --- skills/org-skill-protocol-validator.org | 2 +- src/communication-validator.lisp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/org-skill-protocol-validator.org b/skills/org-skill-protocol-validator.org index a3a227c..0bd7010 100644 --- a/skills/org-skill-protocol-validator.org +++ b/skills/org-skill-protocol-validator.org @@ -55,7 +55,7 @@ Decouple protocol parsing (framing/unframing) from semantic validation. (let ((type (let ((raw (proto-get msg :type))) (if (keywordp raw) (intern (string-upcase (string raw)) :keyword) raw)))) (unless (member type '(:REQUEST :EVENT :RESPONSE :LOG :STATUS)) - (error "Communication Protocol Schema Error: Invalid message type '~a'" type)) + (progn (harness-log "REJECTED MSG: ~s" msg) (error "Communication Protocol Schema Error: Invalid message type '~a'" type))) (case type (:REQUEST diff --git a/src/communication-validator.lisp b/src/communication-validator.lisp index ef8831b..329df45 100644 --- a/src/communication-validator.lisp +++ b/src/communication-validator.lisp @@ -7,7 +7,7 @@ (let ((type (let ((raw (proto-get msg :type))) (if (keywordp raw) (intern (string-upcase (string raw)) :keyword) raw)))) (unless (member type '(:REQUEST :EVENT :RESPONSE :LOG :STATUS)) - (error "Communication Protocol Schema Error: Invalid message type '~a'" type)) + (progn (harness-log "REJECTED MSG: ~s" msg) (error "Communication Protocol Schema Error: Invalid message type '~a'" type))) (case type (:REQUEST