fix: correct setf form in perceive gate HITL handler
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
(setf (getf signal :approved t)) → (setf (getf signal :approved) t) Caught during system compilation. This is exactly the class of bug that the REPL-first discipline would have caught instantly.
This commit is contained in:
@@ -205,21 +205,20 @@ For approval-required actions, creates a Flight Plan instead of executing."
|
||||
(source (getf meta :source))
|
||||
(feedback nil))
|
||||
;; HITL: if the approved action requires human approval,
|
||||
;; create a Flight Plan and notify the user via their client.
|
||||
;; create a Flight Plan (Emacs) and HITL entry (all gateways).
|
||||
(when (and approved
|
||||
(eq (getf approved :level) :approval-required))
|
||||
(let* ((payload (getf approved :payload))
|
||||
(blocked-action (getf payload :action)))
|
||||
(log-message "ACT: Action requires approval — creating Flight Plan")
|
||||
(blocked-action (getf payload :action))
|
||||
(hitl (hitl-create blocked-action)))
|
||||
(log-message "ACT: Action requires approval — creating Flight Plan + HITL (~a)" (getf hitl :token))
|
||||
(dispatcher-flight-plan-create blocked-action)
|
||||
(setf (getf signal :status) :suspended)
|
||||
;; Dispatch HITL notification to the user's client via the source actuator
|
||||
(action-dispatch (list :target source
|
||||
:payload (list :text
|
||||
"HITL: Action requires your approval. Check Flight Plan and set TODO to APPROVED."))
|
||||
:payload (list :text (getf hitl :message)))
|
||||
signal)
|
||||
(setf approved nil) ;; Don't execute the original action
|
||||
(setf feedback nil))) ;; Don't loop back — wait for human
|
||||
(setf approved nil)
|
||||
(setf feedback nil)))
|
||||
(when approved
|
||||
(let* ((original-type (getf approved :type))
|
||||
(verified (cognitive-verify approved signal)))
|
||||
|
||||
Reference in New Issue
Block a user