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

@@ -18,7 +18,7 @@ The key architectural choice: **actuators are not privileged**. The same dispatc
** Why Dispatch-Action Verifies Again?
The Reason stage already ran every proposed action through the deterministic engine. So why does ~loop-gate-act~ call ~deterministic-verify~ again?
The Reason stage already ran every proposed action through the deterministic engine. So why does ~loop-gate-act~ call ~cognitive-verify~ again?
Because a skill's deterministic gate runs during Reason, but between Reason and Act, the action might have been transformed by the pipeline (metadata added, format normalized). The last-mile verification catches any transformation that might have introduced an unsafe property. It's the same philosophy as "trust but verify" — the second check is cheap and catches a class of bugs that would otherwise be silent data corruption.
@@ -135,7 +135,7 @@ The tool's return value is packed into a ~:tool-output~ event and fed back into
(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))
@@ -189,7 +189,7 @@ After dispatch, the gate captures any feedback produced by the actuation (tool o
(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.")