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,7 +1,7 @@
(defpackage :org-agent-boot-tests
(:use :cl :fiveam :org-agent)
(defpackage :opencortex-boot-tests
(:use :cl :fiveam :opencortex)
(:export #:boot-suite))
(in-package :org-agent-boot-tests)
(in-package :opencortex-boot-tests)
(def-suite boot-suite :description "Verification of the Micro-Loader.")
(in-suite boot-suite)
@@ -12,7 +12,7 @@
(with-open-file (out tmp-file :direction :output :if-exists :supersede)
(format out ":PROPERTIES:~%:ID: test-id~%:END:~%#+DEPENDS_ON: dep1 dep2~%"))
(unwind-protect
(multiple-value-bind (id deps) (org-agent::parse-skill-metadata tmp-file)
(multiple-value-bind (id deps) (opencortex::parse-skill-metadata tmp-file)
(is (equal "test-id" id))
(is (member "dep1" deps :test #'string=))
(is (member "dep2" deps :test #'string=)))
@@ -20,7 +20,7 @@
(test test-topological-sort-basic
"Verify that skills are ordered by dependency."
(let ((tmp-dir "/tmp/org-agent-boot-test/"))
(let ((tmp-dir "/tmp/opencortex-boot-test/"))
(uiop:ensure-all-directories-exist (list tmp-dir))
;; A depends on B
(with-open-file (out (merge-pathnames "org-skill-a.org" tmp-dir) :direction :output :if-exists :supersede)
@@ -32,7 +32,7 @@
(format out "#+TITLE: Agent~%"))
(unwind-protect
(let ((sorted (org-agent::topological-sort-skills tmp-dir)))
(let ((sorted (opencortex::topological-sort-skills tmp-dir)))
;; B must appear before A
(let ((pos-a (position "org-skill-a" sorted :key #'pathname-name :test #'string-equal))
(pos-b (position "org-skill-b" sorted :key #'pathname-name :test #'string-equal)))
@@ -43,7 +43,7 @@
(test test-topological-sort-circular
"Verify that circular dependencies raise an error."
(let ((tmp-dir "/tmp/org-agent-boot-test-circ/"))
(let ((tmp-dir "/tmp/opencortex-boot-test-circ/"))
(uiop:ensure-all-directories-exist (list tmp-dir))
;; A depends on B, B depends on A
(with-open-file (out (merge-pathnames "org-skill-a.org" tmp-dir) :direction :output :if-exists :supersede)
@@ -52,7 +52,7 @@
(format out "#+DEPENDS_ON: org-skill-a~%"))
(unwind-protect
(signals error (org-agent::topological-sort-skills tmp-dir))
(signals error (opencortex::topological-sort-skills tmp-dir))
(uiop:delete-directory-tree (uiop:ensure-directory-pathname tmp-dir) :validate t))))
(test test-skill-jailing
@@ -62,13 +62,13 @@
(format out "#+begin_src lisp~%(defvar *jailed-var* 42)~%#+end_src"))
(unwind-protect
(progn
(org-agent::load-skill-from-org tmp-skill)
(let ((pkg (find-package :ORG-AGENT.SKILLS.ORG-SKILL-JAIL-TEST)))
(opencortex::load-skill-from-org tmp-skill)
(let ((pkg (find-package :OPENCORTEX.SKILLS.ORG-SKILL-JAIL-TEST)))
(is (not (null pkg)))
(is (= 42 (symbol-value (find-symbol "*JAILED-VAR*" pkg))))))
(uiop:delete-file-if-exists tmp-skill))))
(test test-syntax-validation
"Verify that malformed Lisp is caught by the pre-flight check."
(is (nth-value 0 (org-agent::validate-lisp-syntax "(defun x () t)")))
(is (not (nth-value 0 (org-agent::validate-lisp-syntax "(defun x (")))))
(is (nth-value 0 (opencortex::validate-lisp-syntax "(defun x () t)")))
(is (not (nth-value 0 (opencortex::validate-lisp-syntax "(defun x (")))))