fix: P3 — normalize variable name drift across core modules
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s

- *memory* → *memory-store* (context, perceive tests, defpackage export)
- *skills-registry* → *skill-registry* (context, reason)
- *logs-lock* → *log-lock*, *system-logs* → *log-buffer* (context → defpackage)
- *cognitive-tools* → *cognitive-tool-registry* (act)
- deterministic-verify → cognitive-verify (act → reason)
These were runtime errors — referenced variables that don't exist.
Harmless until called, but would crash if those code paths were hit.
This commit is contained in:
2026-05-03 11:51:27 -04:00
parent b67cd12d88
commit a027e9d984
10 changed files with 31 additions and 31 deletions

View File

@@ -10,7 +10,7 @@
(when tag (unless (search tag (format nil "~a" (getf attrs :TAGS)) :test #'string-equal) (setf match nil)))
(when (and todo-state (not (equal state todo-state))) (setf match nil))
(when match (push obj results))))
*memory*)
*memory-store*)
results))
(defun context-active-projects ()
@@ -28,7 +28,7 @@
(maphash (lambda (name skill)
(declare (ignore name))
(push (list :name (skill-name skill) :priority (skill-priority skill) :dependencies (skill-dependencies skill)) results))
*skills-registry*)
*skill-registry*)
(sort results #'> :key (lambda (x) (getf x :priority)))))
(defun context-skill-source (skill-name)
@@ -53,9 +53,9 @@ or nil if the heading is not found."
(defun context-logs (&optional limit)
"Retrieves the most recent lines from the harness's internal log."
(let ((log-limit (or limit (ignore-errors (parse-integer (uiop:getenv "CONTEXT_LOG_LIMIT"))) 20)))
(bt:with-lock-held (*logs-lock*)
(let ((count (min log-limit (length *system-logs*))))
(subseq *system-logs* 0 count)))))
(bt:with-lock-held (*log-lock*)
(let ((count (min log-limit (length *log-buffer*))))
(subseq *log-buffer* 0 count)))))
(defun context-object-render (obj &key (depth 1) (foveal-id nil) semantic-threshold (foveal-vector nil))
"Recursively renders an org-object and its children to an Org string using a Foveal-Peripheral Hybrid model."
@@ -153,7 +153,7 @@ Privacy-filtered objects (matching bouncer-privacy-tags) are excluded."
(in-suite vision-suite)
(test test-foveal-rendering
(clrhash passepartout::*memory*)
(clrhash passepartout::*memory-store*)
(let* ((ast '(:type :HEADLINE :properties (:ID "proj-root" :TITLE "Project" :TAGS ("project"))
:contents ((:type :HEADLINE :properties (:ID "node-foveal" :TITLE "Foveal Node")
:raw-content "FOVEAL CONTENT" :contents nil)
@@ -166,7 +166,7 @@ Privacy-filtered objects (matching bouncer-privacy-tags) are excluded."
(is (not (search "PERIPHERAL CONTENT" output))))))
(test test-awareness-budget
(clrhash passepartout::*memory*)
(clrhash passepartout::*memory-store*)
(ingest-ast '(:type :HEADLINE :properties (:ID "p1" :TITLE "Project 1" :TAGS ("project")) :contents nil))
(ingest-ast '(:type :HEADLINE :properties (:ID "p2" :TITLE "Project 2" :TAGS ("project")) :contents nil))
(let ((output (context-awareness-assemble)))

View File

@@ -29,7 +29,7 @@
#:lookup-object
#:list-objects-by-type
#:org-id-new
#:*memory*
#:*memory-store*
#:*history-store*
#:org-object
#:make-org-object

View File

@@ -67,7 +67,7 @@
(depth (getf context :depth 0))
(meta (getf context :meta))
(source (getf meta :source))
(tool (gethash (string-downcase (string tool-name)) *cognitive-tools*)))
(tool (gethash (string-downcase (string tool-name)) *cognitive-tool-registry*)))
(if tool
(handler-case
(let* ((clean-args (if (and (listp tool-args) (listp (car tool-args))) (car tool-args) tool-args))
@@ -105,7 +105,7 @@
(feedback nil))
(when approved
(let* ((original-type (getf approved :type))
(verified (deterministic-verify approved signal)))
(verified (cognitive-verify approved signal)))
(if (and (listp verified) (member (getf verified :type) '(:LOG :EVENT)) (not (member original-type '(:LOG :EVENT))))
(progn
(log-message "ACT BLOCKED: Action failed last-mile deterministic check.")

View File

@@ -85,11 +85,11 @@
(in-suite pipeline-perceive-suite)
(test test-loop-gate-perceive
(clrhash passepartout::*memory*)
(clrhash passepartout::*memory-store*)
(let* ((signal (list :type :EVENT :payload (list :sensor :buffer-update :ast (list :type :HEADLINE :properties (list :ID "test-node" :TITLE "Test") :contents nil))))
(result (loop-gate-perceive signal)))
(is (eq :perceived (getf result :status)))
(is (not (null (gethash "test-node" passepartout::*memory*))))))
(is (not (null (gethash "test-node" passepartout::*memory-store*))))))
(test test-depth-limiting
(let ((runaway-signal (list :type :EVENT :depth 11 :payload (list :sensor :heartbeat))))

View File

@@ -75,7 +75,7 @@
(let ((aug-text (ignore-errors (funcall aug-fn context))))
(when (and aug-text (stringp aug-text) (> (length aug-text) 0))
(setf augments (concatenate 'string augments aug-text (string #\Newline))))))))
*skills-registry*)
*skill-registry*)
(when (> (length augments) 0) augments)))
(system-prompt (format nil "IDENTITY: ~a~a~%~%TOOLS:~%~a~%~%CONTEXT:~%~a~%~%LOGS:~%~a~%~a"
assistant-name reflection-feedback tool-belt global-context system-logs
@@ -98,7 +98,7 @@
(declare (ignore name))
(when (skill-deterministic-fn skill)
(push skill skills)))
*skills-registry*)
*skill-registry*)
(setf skills (sort skills #'> :key #'skill-priority))
(dolist (skill skills)
(let ((trigger (skill-trigger-fn skill))
@@ -155,7 +155,7 @@
(in-suite pipeline-reason-suite)
(test test-decide-gate-safety
(clrhash passepartout::*skills-registry*)
(clrhash passepartout::*skill-registry*)
(passepartout::defskill :mock-safety
:priority 50
:trigger (lambda (ctx) (declare (ignore ctx)) t)