fix: skill loader preserves test-package in-package forms, un-jail security-dispatcher
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 3s

- skill-package-forms-strip: only strip (in-package :passepartout),
  preserving test-package declarations. This allows embedded test code
  to evaluate in the correct package, fixing 7 previously-unreachable
  test suites (vault, perms, policy, validator, lisp, org, archivist).
- Remove security-dispatcher from skill-topological-sort exclusion:
  dispatcher was never loaded (neither via ASDF nor skill system).
  Test package was previously NIL; now loads properly.

Test results: 146 pass, 16 fail (was 80P 1F).
Remaining failures are pre-existing test code bugs (variable access
across jailed packages, cleanup errors) now exposed by the fix.
This commit is contained in:
2026-05-05 19:16:57 -04:00
parent 717d63d84a
commit ca70a61338
3 changed files with 20 additions and 33 deletions

View File

@@ -199,7 +199,6 @@ Both ~.org~ and ~.lisp~ files are included. For each skill, the ~.org~ file supp
(string= n "core-loop-act")
(string= n "core-loop")
(string= n "core-manifest")
(string= n "security-dispatcher")
(string= n "system-model-router")
(string= n "system-model-explorer")
(string= n "gateway-tui"))))
@@ -271,13 +270,15 @@ The validation step is critical: invalid Lisp in an org block would crash the lo
(error (c) (values nil (format nil "~a" c)))))
(defun skill-package-forms-strip (code-string)
"Removes in-package forms so symbols get defined in skill package."
"Removes (in-package :passepartout) forms only — preserves test-package
declarations so embedded test code evaluates in the correct package."
(let ((lines (uiop:split-string code-string :separator '(#\Newline)))
(result ""))
(dolist (line lines)
(let ((trimmed (string-trim '(#\Space #\Tab) line)))
(unless (uiop:string-prefix-p "(in-package" trimmed)
(setf result (concatenate 'string result line (string #\Newline))))))
(if (uiop:string-prefix-p "(in-package :passepartout)" trimmed)
(setf result (concatenate 'string result (string #\Newline)))
(setf result (concatenate 'string result line (string #\Newline))))))
result))
(defun tangle-target-extract (line)