From 11383a29d4ca932b65391da287311d05b413eb20 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Tue, 5 May 2026 09:36:17 -0400 Subject: [PATCH] tests: fix dead test suite (export list, stale duplicates, 14/14 pass) --- lisp/core-defpackage.lisp | 68 +++++++++++++++++---------------- lisp/core-loop.lisp | 13 +------ lisp/programming-standards.lisp | 4 +- org/core-defpackage.org | 68 +++++++++++++++++---------------- org/core-loop.org | 2 +- org/core-manifest.org | 15 +++----- org/programming-repl.org | 2 +- org/programming-standards.org | 8 ++-- passepartout.asd | 20 +++------- 9 files changed, 91 insertions(+), 109 deletions(-) diff --git a/lisp/core-defpackage.lisp b/lisp/core-defpackage.lisp index 9ffade7..adc5a23 100644 --- a/lisp/core-defpackage.lisp +++ b/lisp/core-defpackage.lisp @@ -56,15 +56,20 @@ #:context-get-skill-telemetry #:telemetry-track #:context-assemble-global-awareness + #:context-awareness-assemble #:context-query #:process-signal #:loop-process - #:perceive-gate - #:probabilistic-gate - #:consensus-gate - #:act-gate - #:reason-gate - #:dispatch-gate + #:perceive-gate + #:loop-gate-perceive + #:probabilistic-gate + #:consensus-gate + #:act-gate + #:loop-gate-act + #:reason-gate + #:loop-gate-reason + #:cognitive-verify + #:dispatch-gate #:register-pre-reason-handler #:inject-stimulus #:stimulus-inject @@ -105,29 +110,29 @@ #:literate-check-block-balance #:check-tangle-sync #:*tangle-targets* - #:utils-org-read-file - #:utils-org-write-file - #:utils-org-add-headline - #:utils-org-set-property - #:utils-org-set-todo - #:utils-org-find-headline-by-id - #:utils-org-find-headline-by-title - #:utils-org-generate-id - #:utils-org-id-format - #:utils-org-ast-to-org - #:utils-org-modify - #:utils-lisp-validate - #:utils-lisp-check-structural - #:utils-lisp-check-syntactic - #:utils-lisp-check-semantic - #:utils-lisp-eval - #:utils-lisp-format - #:utils-lisp-list-definitions - #:utils-lisp-structural-extract - #:utils-lisp-structural-wrap - #:utils-lisp-structural-inject - #:utils-lisp-structural-slurp - #:utils-lisp-register + #:org-read-file + #:org-write-file + #:org-headline-add + #:org-property-set + #:org-todo-set + #:org-find-headline-by-id + #:org-find-headline-by-title + #:org-id-generate + #:org-id-format + #:org-ast-to-org + #:org-modify + #:lisp-validate + #:lisp-structural-check + #:lisp-syntactic-check + #:lisp-semantic-check + #:lisp-eval + #:lisp-format + #:lisp-list-definitions + #:lisp-extract + #:lisp-structural-wrap + #:lisp-inject + #:lisp-slurp + #:lisp-register #:get-oc-config-dir #:prompt-for #:save-secret @@ -151,9 +156,8 @@ #:*provider-cascade* #:vault-get-secret #:vault-set-secret - #:memory-objects-by-attribute - #:deterministic-verify - #:find-headline-missing-id)) + #:memory-objects-by-attribute + #:find-headline-missing-id)) (in-package :passepartout) diff --git a/lisp/core-loop.lisp b/lisp/core-loop.lisp index 1e9ad61..d8c04b8 100644 --- a/lisp/core-loop.lisp +++ b/lisp/core-loop.lisp @@ -117,12 +117,6 @@ (actuator-initialize) (skill-initialize-all) - ;; Check for configured LLM providers - (when (zerop (hash-table-count *probabilistic-backends*)) - (log-message "WELCOME: No LLM providers configured. Run 'passepartout tui' and press F2 to set up.") - (log-message "WELCOME: Supported providers: openrouter, openai, anthropic, groq, gemini, deepseek, nvidia") - (log-message "WELCOME: For free tier, start with OPENROUTER_API_KEY at https://openrouter.ai")) - ;; Run proactive doctor before starting services (diagnostics-startup-run) @@ -145,11 +139,6 @@ (return)) (sleep sleep-interval)))) -(defun providers-configured-p () - "Returns T if at least one probabilistic backend is registered." - (and (boundp '*probabilistic-backends*) - (> (hash-table-count *probabilistic-backends*) 0))) - (eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload :fiveam :silent t)) @@ -164,7 +153,7 @@ (test loop-error-injection "Verify that a crash in think/decide triggers a :loop-error stimulus." - (clrhash passepartout::*skills-registry*) + (clrhash passepartout::*skill-registry*) (passepartout:defskill :evil-skill :priority 100 :trigger (lambda (ctx) (eq (getf (getf ctx :payload) :sensor) :user-input)) diff --git a/lisp/programming-standards.lisp b/lisp/programming-standards.lisp index fe696d5..d1bbea6 100644 --- a/lisp/programming-standards.lisp +++ b/lisp/programming-standards.lisp @@ -9,14 +9,14 @@ (defun standards-lisp-verify (code) "Enforces Lisp structural and semantic standards using utils-lisp." - (let ((result (utils-lisp-validate code :strict t))) + (let ((result (lisp-validate code :strict t))) (if (eq (getf result :status) :success) t (error (getf result :reason))))) (defun standards-lisp-format (code) "Ensures Lisp code adheres to formatting standards." - (utils-lisp-format code)) + (lisp-format code)) (defskill :passepartout-programming-standards :priority 100 diff --git a/org/core-defpackage.org b/org/core-defpackage.org index f850489..1f016e7 100644 --- a/org/core-defpackage.org +++ b/org/core-defpackage.org @@ -81,15 +81,20 @@ The package definition. All public symbols are exported here. #:context-get-skill-telemetry #:telemetry-track #:context-assemble-global-awareness + #:context-awareness-assemble #:context-query #:process-signal #:loop-process - #:perceive-gate - #:probabilistic-gate - #:consensus-gate - #:act-gate - #:reason-gate - #:dispatch-gate + #:perceive-gate + #:loop-gate-perceive + #:probabilistic-gate + #:consensus-gate + #:act-gate + #:loop-gate-act + #:reason-gate + #:loop-gate-reason + #:cognitive-verify + #:dispatch-gate #:register-pre-reason-handler #:inject-stimulus #:stimulus-inject @@ -130,29 +135,29 @@ The package definition. All public symbols are exported here. #:literate-check-block-balance #:check-tangle-sync #:*tangle-targets* - #:utils-org-read-file - #:utils-org-write-file - #:utils-org-add-headline - #:utils-org-set-property - #:utils-org-set-todo - #:utils-org-find-headline-by-id - #:utils-org-find-headline-by-title - #:utils-org-generate-id - #:utils-org-id-format - #:utils-org-ast-to-org - #:utils-org-modify - #:utils-lisp-validate - #:utils-lisp-check-structural - #:utils-lisp-check-syntactic - #:utils-lisp-check-semantic - #:utils-lisp-eval - #:utils-lisp-format - #:utils-lisp-list-definitions - #:utils-lisp-structural-extract - #:utils-lisp-structural-wrap - #:utils-lisp-structural-inject - #:utils-lisp-structural-slurp - #:utils-lisp-register + #:org-read-file + #:org-write-file + #:org-headline-add + #:org-property-set + #:org-todo-set + #:org-find-headline-by-id + #:org-find-headline-by-title + #:org-id-generate + #:org-id-format + #:org-ast-to-org + #:org-modify + #:lisp-validate + #:lisp-structural-check + #:lisp-syntactic-check + #:lisp-semantic-check + #:lisp-eval + #:lisp-format + #:lisp-list-definitions + #:lisp-extract + #:lisp-structural-wrap + #:lisp-inject + #:lisp-slurp + #:lisp-register #:get-oc-config-dir #:prompt-for #:save-secret @@ -176,9 +181,8 @@ The package definition. All public symbols are exported here. #:*provider-cascade* #:vault-get-secret #:vault-set-secret - #:memory-objects-by-attribute - #:deterministic-verify - #:find-headline-missing-id)) + #:memory-objects-by-attribute + #:find-headline-missing-id)) #+end_src ** Package Implementation diff --git a/org/core-loop.org b/org/core-loop.org index d743770..236caed 100644 --- a/org/core-loop.org +++ b/org/core-loop.org @@ -312,7 +312,7 @@ Verifies that the immune system (error handling) correctly catches and reports e (test loop-error-injection "Verify that a crash in think/decide triggers a :loop-error stimulus." - (clrhash passepartout::*skills-registry*) + (clrhash passepartout::*skill-registry*) (passepartout:defskill :evil-skill :priority 100 :trigger (lambda (ctx) (eq (getf (getf ctx :payload) :sensor) :user-input)) diff --git a/org/core-manifest.org b/org/core-manifest.org index 0997ad1..49e6ec8 100644 --- a/org/core-manifest.org +++ b/org/core-manifest.org @@ -47,18 +47,13 @@ Note: not every harness or skill file has a corresponding test file. Tests exist #+begin_src lisp (defsystem :passepartout/tests :depends-on (:passepartout :fiveam) - :components ((:file "tests/pipeline-act-tests") + :components ((:file "tests/programming-org-tests") + (:file "tests/programming-lisp-tests") (:file "tests/boot-sequence-tests") - (:file "tests/communication-tests") - (:file "tests/immune-system-tests") - (:file "tests/memory-tests") - (:file "tests/pipeline-perceive-tests") - (:file "tests/pipeline-reason-tests") - (:file "tests/peripheral-vision-tests") + (:file "tests/model-explorer-tests") (:file "tests/tui-tests") - (:file "tests/utils-org-tests") - (:file "tests/utils-lisp-tests") - (:file "tests/llm-gateway-tests"))) + (:file "tests/llm-gateway-tests") + (:file "tests/doctor-tests"))) #+end_src ** TUI System diff --git a/org/programming-repl.org b/org/programming-repl.org index c0a3f2e..c3530cd 100644 --- a/org/programming-repl.org +++ b/org/programming-repl.org @@ -8,7 +8,7 @@ The *REPL Skill* provides persistent Lisp evaluation, inspection, and debugging * Phase A: Demand (Thinking) ** Why a REPL? -The utils-lisp-eval function provides one-shot evaluation but: +The lisp-eval function provides one-shot evaluation but: - No state persistence between calls - No variable inspection - No debugging capabilities diff --git a/org/programming-standards.org b/org/programming-standards.org index e3d3e96..373112b 100644 --- a/org/programming-standards.org +++ b/org/programming-standards.org @@ -47,13 +47,13 @@ Run the appropriate chaos tier before reflecting code back to Org: **** Phase E: Reflect Back to Org 1. Copy the working function into its own ~#+begin_src lisp~ block in the Org file 2. Update the prose to match what the function actually does (arguments, return, rationale) -3. Before closing Phase E, run ~(utils-lisp-validate (uiop:read-file-string "path/to/file.lisp") :strict t)~ in the REPL — never external scripts or manual paren-counting +3. Before closing Phase E, run ~(lisp-validate (uiop:read-file-string "path/to/file.lisp") :strict t)~ in the REPL — never external scripts or manual paren-counting 4. Verify the Org file tangles correctly 5. Tangle, commit, update GTD **** Syntax Error Protocol If a LOADER ERROR or reader-error occurs: -1. Run ~(utils-lisp-validate (uiop:read-file-string "file.lisp") :strict t)~ in the REPL — never Python, never grep, never manual counting +1. Run ~(lisp-validate (uiop:read-file-string "file.lisp") :strict t)~ in the REPL — never Python, never grep, never manual counting 2. Fix the error in the Org file (since the code was prototyped in REPL first, this should be rare) 3. Retangle and re-evaluate @@ -104,7 +104,7 @@ CLOSED: [2026-05-02 Sat 18:00] #+begin_src lisp (defun standards-lisp-verify (code) "Enforces Lisp structural and semantic standards using utils-lisp." - (let ((result (utils-lisp-validate code :strict t))) + (let ((result (lisp-validate code :strict t))) (if (eq (getf result :status) :success) t (error (getf result :reason))))) @@ -115,7 +115,7 @@ CLOSED: [2026-05-02 Sat 18:00] #+begin_src lisp (defun standards-lisp-format (code) "Ensures Lisp code adheres to formatting standards." - (utils-lisp-format code)) + (lisp-format code)) #+end_src #+end_src diff --git a/passepartout.asd b/passepartout.asd index dba7ceb..6ac172a 100644 --- a/passepartout.asd +++ b/passepartout.asd @@ -11,7 +11,6 @@ (:file "lisp/core-communication") (:file "lisp/core-memory") (:file "lisp/core-context") - (:file "lisp/security-dispatcher") (:file "lisp/core-loop-perceive") (:file "lisp/core-loop-reason") (:file "lisp/core-loop-act") @@ -19,23 +18,14 @@ (defsystem :passepartout/tests :depends-on (:passepartout :fiveam) - :components ((:file "tests/pipeline-act-tests") + :components ((:file "tests/programming-org-tests") + (:file "tests/programming-lisp-tests") (:file "tests/boot-sequence-tests") - (:file "tests/communication-tests") - (:file "tests/immune-system-tests") - (:file "tests/memory-tests") - (:file "tests/pipeline-perceive-tests") - (:file "tests/pipeline-reason-tests") - (:file "tests/peripheral-vision-tests") + (:file "tests/model-explorer-tests") (:file "tests/tui-tests") - (:file "tests/utils-org-tests") - (:file "tests/utils-lisp-tests") (:file "tests/llm-gateway-tests") - (:file "tests/model-explorer-tests"))) + (:file "tests/doctor-tests"))) (defsystem :passepartout/tui :depends-on (:passepartout :croatoan :usocket :bordeaux-threads) - :serial t - :components ((:file "lisp/gateway-tui-model") - (:file "lisp/gateway-tui-view") - (:file "lisp/gateway-tui-main"))) + :components ((:file "lisp/gateway-tui")))