REFAC: Global rename of org-agent to opencortex

This commit is contained in:
2026-04-14 12:10:11 -04:00
parent b58b780a44
commit 849c078c37
95 changed files with 662 additions and 642 deletions

View File

@@ -1,6 +1,6 @@
(defpackage :org-agent-pipeline-tests
(:use :cl :fiveam :org-agent))
(in-package :org-agent-pipeline-tests)
(defpackage :opencortex-pipeline-tests
(:use :cl :fiveam :opencortex))
(in-package :opencortex-pipeline-tests)
(def-suite pipeline-suite
:description "Verification of the Reactive Signal Pipeline.")
@@ -8,8 +8,8 @@
(defun setup-mock-skills ()
"Register mock skills for testing."
(clrhash org-agent::*skills-registry*)
(org-agent::defskill :mock-refactor
(clrhash opencortex::*skills-registry*)
(opencortex::defskill :mock-refactor
:priority 100
:trigger (lambda (ctx) (eq (getf (getf ctx :payload) :command) :organize-subtree))
:probabilistic (lambda (ctx) "Mock probabilistic prompt")
@@ -18,7 +18,7 @@
:payload (:action :refactor-subtree
:target-id nil
:properties (("ID" . "node-123"))))))
(org-agent::defskill :mock-safety
(opencortex::defskill :mock-safety
:priority 50
:trigger (lambda (ctx) t) ; always triggers
:probabilistic (lambda (ctx) "Mock probabilistic")
@@ -26,11 +26,11 @@
(test test-perceive-gate
"Perceive gate should update the object store and normalize signal."
(clrhash org-agent::*memory*)
(clrhash opencortex::*memory*)
(let* ((signal (list :type :EVENT :payload (list :sensor :buffer-update :ast (list :type :HEADLINE :properties (list :ID "test-node" :TITLE "Test") :contents nil))))
(result (perceive-gate signal)))
(is (eq :perceived (getf result :status)))
(is (not (null (gethash "test-node" org-agent::*memory*))))))
(is (not (null (gethash "test-node" opencortex::*memory*))))))
(test test-decide-gate-safety
"Decide gate should block unsafe LLM proposals."
@@ -46,7 +46,7 @@
(test test-pipeline-flow-flat
"Verify that process-signal correctly executes a signal through gates."
(setup-mock-skills)
(clrhash org-agent::*memory*)
(clrhash opencortex::*memory*)
(let ((signal (list :type :EVENT :payload (list :sensor :buffer-update))))
(process-signal signal)
(pass "Pipeline completed execution.")))
@@ -61,7 +61,7 @@
(setf (uiop:getenv "LLM_ENDPOINT") "http://mock")
(setf (uiop:getenv "MEMEX_USER") "Amr")
(is (not (null (uiop:getenv "LLM_ENDPOINT"))))
(is (stringp (org-agent::get-env "MEMEX_USER"))))
(is (stringp (opencortex::get-env "MEMEX_USER"))))
(test test-path-resolution
"Verify that context-resolve-path expands environment variables."
@@ -72,13 +72,13 @@
(test test-skill-dependencies
"Verify that resolve-skill-dependencies correctly flattens the graph."
(setup-mock-skills)
(org-agent::defskill :mock-dependent
(opencortex::defskill :mock-dependent
:priority 10
:dependencies (list "mock-safety")
:trigger (lambda (ctx) nil)
:probabilistic nil
:deterministic nil)
(let ((deps (org-agent::resolve-skill-dependencies "mock-dependent")))
(let ((deps (opencortex::resolve-skill-dependencies "mock-dependent")))
(is (member "mock-safety" deps :test #'string-equal))
(is (member "mock-dependent" deps :test #'string-equal))))
@@ -90,7 +90,7 @@
(test test-global-awareness-assembly
"Verify that context-assemble-global-awareness reports active projects."
(clrhash org-agent::*memory*)
(clrhash opencortex::*memory*)
(ingest-ast (list :type :HEADLINE :properties (list :ID "proj-1" :TITLE "Project Alpha" :TAGS "project") :contents nil))
(let ((awareness (context-assemble-global-awareness)))
(is (search "Project Alpha" awareness))
@@ -98,13 +98,13 @@
(test test-micro-rollback
"Verify that a pipeline crash triggers an automatic Memory rollback."
(clrhash org-agent::*memory*)
(clrhash org-agent::*history-store*)
(setf org-agent::*object-store-snapshots* nil)
(clrhash opencortex::*memory*)
(clrhash opencortex::*history-store*)
(setf opencortex::*object-store-snapshots* nil)
;; State A
(ingest-ast (list :type :HEADLINE :properties (list :ID "node-1" :TITLE "State A") :contents nil))
(setup-mock-skills)
(org-agent::defskill :crashing-skill
(opencortex::defskill :crashing-skill
:priority 200
:trigger (lambda (ctx) t)
:probabilistic (lambda (ctx) (list :type :REQUEST :payload (list :action :eval :code "(error \"BOOM\")")))