fix(chaos): force absolute-relative tangle paths in harness

This commit is contained in:
2026-04-28 18:00:49 -04:00
parent 75cc9e3629
commit d15225a453
13 changed files with 54 additions and 54 deletions

View File

@@ -23,26 +23,26 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi
* Phase B: Protocol (Success Criteria)
** Package Context
#+begin_src lisp :tangle (expand-file-name "doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
#+begin_src lisp :tangle (expand-file-name "harness/doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
(defpackage :opencortex-doctor-tests
(:use :cl :fiveam :opencortex)
(:export #:doctor-suite))
#+end_src
#+begin_src lisp :tangle (expand-file-name "doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
#+begin_src lisp :tangle (expand-file-name "harness/doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
(in-package :opencortex-doctor-tests)
#+end_src
#+begin_src lisp :tangle (expand-file-name "doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
#+begin_src lisp :tangle (expand-file-name "harness/doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
(def-suite doctor-suite :description "Verification of the System Doctor diagnostic logic")
#+end_src
#+begin_src lisp :tangle (expand-file-name "doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
#+begin_src lisp :tangle (expand-file-name "harness/doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
(in-suite doctor-suite)
#+end_src
** Dependency Tests
#+begin_src lisp :tangle (expand-file-name "doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
#+begin_src lisp :tangle (expand-file-name "harness/doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
(test test-dependency-check-fail
"Verify that missing binaries are correctly identified as failures."
(let ((opencortex::*doctor-required-binaries* '("non-existent-binary-123")))
@@ -50,7 +50,7 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi
#+end_src
** Environment Tests
#+begin_src lisp :tangle (expand-file-name "doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
#+begin_src lisp :tangle (expand-file-name "harness/doctor-tests.lisp" (concat (concat (or (getenv "INSTALL_DIR") ".") "/harness") "/tests"))
(test test-env-validation-fail
"Verify that an invalid MEMEX_DIR triggers a critical failure."
(let ((old-m (getenv "MEMEX_DIR"))
@@ -66,18 +66,18 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi
* Phase C: Implementation (Build)
** Package Context
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/harness/doctor.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (expand-file-name "harness/doctor.lisp" (expand-file-name "harness/"))
(in-package :opencortex)
#+end_src
** Global Configuration
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/harness/doctor.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (expand-file-name "harness/doctor.lisp" (expand-file-name "harness/"))
(defvar *doctor-required-binaries* '("sbcl" "emacs" "git" "socat" "nc")
"List of external binaries required for full system operation.")
#+end_src
** Dependency Verification
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/harness/doctor.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (expand-file-name "harness/doctor.lisp" (expand-file-name "harness/"))
(defun doctor-check-dependencies ()
"Verifies that required external binaries are available in the PATH via a shell probe."
(let ((all-ok t))
@@ -95,7 +95,7 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi
#+end_src
** Environment & XDG Validation
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/harness/doctor.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (expand-file-name "harness/doctor.lisp" (expand-file-name "harness/"))
(defun doctor-check-env ()
"Validates XDG directories and environment configuration against the POSIX standard."
(harness-log "DOCTOR: Checking XDG environment...")
@@ -124,7 +124,7 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi
#+end_src
** LLM Connectivity
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/harness/doctor.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (expand-file-name "harness/doctor.lisp" (expand-file-name "harness/"))
(defun doctor-check-llm ()
"Tests connectivity to primary LLM providers. Non-critical fallback allowed."
(harness-log "DOCTOR: Checking LLM connectivity...")
@@ -139,7 +139,7 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi
#+end_src
** Orchestration
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/harness/doctor.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (expand-file-name "harness/doctor.lisp" (expand-file-name "harness/"))
(defun doctor-run-all ()
"Executes the full diagnostic suite and returns T if system is healthy."
(harness-log "==================================================")
@@ -159,7 +159,7 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi
#+end_src
** CLI Entry Point
#+begin_src lisp :tangle (concat (getenv "INSTALL_DIR") "/harness/doctor.lisp" (expand-file-name ""))
#+begin_src lisp :tangle (expand-file-name "harness/doctor.lisp" (expand-file-name "harness/"))
(defun doctor-main ()
"Entry point for the 'doctor' CLI command."
(if (doctor-run-all)