fix(protocol): Force uppercase normalization for message types in validator
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s
This commit is contained in:
@@ -53,7 +53,7 @@ Decouple protocol parsing (framing/unframing) from semantic validation.
|
|||||||
(unless (listp msg)
|
(unless (listp msg)
|
||||||
(error "Communication Protocol Schema Error: Message must be a property list (got ~s)" (type-of msg)))
|
(error "Communication Protocol Schema Error: Message must be a property list (got ~s)" (type-of msg)))
|
||||||
|
|
||||||
(let ((type (proto-get msg :type)))
|
(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))
|
(unless (member type '(:REQUEST :EVENT :RESPONSE :LOG :STATUS))
|
||||||
(error "Communication Protocol Schema Error: Invalid message type '~a'" type))
|
(error "Communication Protocol Schema Error: Invalid message type '~a'" type))
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
(unless (listp msg)
|
(unless (listp msg)
|
||||||
(error "Communication Protocol Schema Error: Message must be a property list (got ~s)" (type-of msg)))
|
(error "Communication Protocol Schema Error: Message must be a property list (got ~s)" (type-of msg)))
|
||||||
|
|
||||||
(let ((type (proto-get msg :type)))
|
(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))
|
(unless (member type '(:REQUEST :EVENT :RESPONSE :LOG :STATUS))
|
||||||
(error "Communication Protocol Schema Error: Invalid message type '~a'" type))
|
(error "Communication Protocol Schema Error: Invalid message type '~a'" type))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user