fix(setup): Verbose error reporting, strict tangling, and full path logging for brain.log
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 28s
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 28s
This commit is contained in:
@@ -30,7 +30,7 @@ setup_system() {
|
|||||||
echo -e "${BLUE}=== OpenCortex: Initializing System ===${NC}"
|
echo -e "${BLUE}=== OpenCortex: Initializing System ===${NC}"
|
||||||
echo -e "${YELLOW}--- Installing System Dependencies ---${NC}"
|
echo -e "${YELLOW}--- Installing System Dependencies ---${NC}"
|
||||||
if command_exists apt-get; then
|
if command_exists apt-get; then
|
||||||
sudo apt-get update && sudo apt-get install -y sbcl emacs-nox rlwrap netcat-openbsd curl git socat libssl-dev libncurses5-dev
|
sudo apt-get update && sudo apt-get install -y sbcl emacs-nox rlwrap netcat-openbsd curl git socat libssl-dev libncurses5-dev libffi-dev zlib1g-dev libsqlite3-dev
|
||||||
fi
|
fi
|
||||||
if [ ! -d "$HOME/quicklisp" ]; then
|
if [ ! -d "$HOME/quicklisp" ]; then
|
||||||
curl -O https://beta.quicklisp.org/quicklisp.lisp
|
curl -O https://beta.quicklisp.org/quicklisp.lisp
|
||||||
@@ -118,8 +118,11 @@ setup_system() {
|
|||||||
echo -e "\n${GREEN}✓ Brain is alive and responsive on port $PORT.${NC}"
|
echo -e "\n${GREEN}✓ Brain is alive and responsive on port $PORT.${NC}"
|
||||||
echo -e "${GREEN}✓ Setup complete. You can now run 'opencortex tui'.${NC}"
|
echo -e "${GREEN}✓ Setup complete. You can now run 'opencortex tui'.${NC}"
|
||||||
else
|
else
|
||||||
echo -e "\n${RED}✗ Brain failed to wake up. Error Log from brain.log:${NC}"
|
echo -e "\n${RED}✗ Brain failed to wake up.${NC}"
|
||||||
|
echo -e "${YELLOW}Full Log Path: $(realpath "$SCRIPT_DIR/brain.log")${NC}"
|
||||||
|
echo -e "${YELLOW}--- LOG START ---${NC}"
|
||||||
cat "$SCRIPT_DIR/brain.log"
|
cat "$SCRIPT_DIR/brain.log"
|
||||||
|
echo -e "${YELLOW}--- LOG END ---${NC}"
|
||||||
# Kill the background process if it exists
|
# Kill the background process if it exists
|
||||||
pkill -f "sbcl.*opencortex" || true
|
pkill -f "sbcl.*opencortex" || true
|
||||||
exit 1
|
exit 1
|
||||||
@@ -142,9 +145,10 @@ if [[ "$1" == "--boot" ]]; then
|
|||||||
fi
|
fi
|
||||||
exec sbcl --non-interactive \
|
exec sbcl --non-interactive \
|
||||||
--eval "(load (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname)))" \
|
--eval "(load (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname)))" \
|
||||||
--eval "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (format t \"~a~%\" c) (uiop:quit 1)))" \
|
--eval "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (format *error-output* \"FATAL LISP ERROR: ~a~%\" c) (uiop:print-backtrace :stream *error-output*) (uiop:quit 1)))" \
|
||||||
--eval "(push (truename \"$SCRIPT_DIR/\") asdf:*central-registry*)" \
|
--eval "(push (truename \"$SCRIPT_DIR/\") asdf:*central-registry*)" \
|
||||||
--eval "(ql:quickload :opencortex :silent t)" \
|
--eval "(format t \"--- Quickloading OpenCortex ---~%\")" \
|
||||||
|
--eval "(ql:quickload :opencortex)" \
|
||||||
--eval "(opencortex:main)"
|
--eval "(opencortex:main)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ setup_system() {
|
|||||||
echo -e "${BLUE}=== OpenCortex: Initializing System ===${NC}"
|
echo -e "${BLUE}=== OpenCortex: Initializing System ===${NC}"
|
||||||
echo -e "${YELLOW}--- Installing System Dependencies ---${NC}"
|
echo -e "${YELLOW}--- Installing System Dependencies ---${NC}"
|
||||||
if command_exists apt-get; then
|
if command_exists apt-get; then
|
||||||
sudo apt-get update && sudo apt-get install -y sbcl emacs-nox rlwrap netcat-openbsd curl git socat libssl-dev libncurses5-dev
|
sudo apt-get update && sudo apt-get install -y sbcl emacs-nox rlwrap netcat-openbsd curl git socat libssl-dev libncurses5-dev libffi-dev zlib1g-dev libsqlite3-dev
|
||||||
fi
|
fi
|
||||||
if [ ! -d "$HOME/quicklisp" ]; then
|
if [ ! -d "$HOME/quicklisp" ]; then
|
||||||
curl -O https://beta.quicklisp.org/quicklisp.lisp
|
curl -O https://beta.quicklisp.org/quicklisp.lisp
|
||||||
@@ -109,8 +109,11 @@ setup_system() {
|
|||||||
echo -e "\n${GREEN}✓ Brain is alive and responsive on port $PORT.${NC}"
|
echo -e "\n${GREEN}✓ Brain is alive and responsive on port $PORT.${NC}"
|
||||||
echo -e "${GREEN}✓ Setup complete. You can now run 'opencortex tui'.${NC}"
|
echo -e "${GREEN}✓ Setup complete. You can now run 'opencortex tui'.${NC}"
|
||||||
else
|
else
|
||||||
echo -e "\n${RED}✗ Brain failed to wake up. Error Log from brain.log:${NC}"
|
echo -e "\n${RED}✗ Brain failed to wake up.${NC}"
|
||||||
|
echo -e "${YELLOW}Full Log Path: $(realpath "$SCRIPT_DIR/brain.log")${NC}"
|
||||||
|
echo -e "${YELLOW}--- LOG START ---${NC}"
|
||||||
cat "$SCRIPT_DIR/brain.log"
|
cat "$SCRIPT_DIR/brain.log"
|
||||||
|
echo -e "${YELLOW}--- LOG END ---${NC}"
|
||||||
# Kill the background process if it exists
|
# Kill the background process if it exists
|
||||||
pkill -f "sbcl.*opencortex" || true
|
pkill -f "sbcl.*opencortex" || true
|
||||||
exit 1
|
exit 1
|
||||||
@@ -133,9 +136,10 @@ if [[ "$1" == "--boot" ]]; then
|
|||||||
fi
|
fi
|
||||||
exec sbcl --non-interactive \
|
exec sbcl --non-interactive \
|
||||||
--eval "(load (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname)))" \
|
--eval "(load (merge-pathnames \"quicklisp/setup.lisp\" (user-homedir-pathname)))" \
|
||||||
--eval "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (format t \"~a~%\" c) (uiop:quit 1)))" \
|
--eval "(setf *debugger-hook* (lambda (c h) (declare (ignore h)) (format *error-output* \"FATAL LISP ERROR: ~a~%\" c) (uiop:print-backtrace :stream *error-output*) (uiop:quit 1)))" \
|
||||||
--eval "(push (truename \"$SCRIPT_DIR/\") asdf:*central-registry*)" \
|
--eval "(push (truename \"$SCRIPT_DIR/\") asdf:*central-registry*)" \
|
||||||
--eval "(ql:quickload :opencortex :silent t)" \
|
--eval "(format t \"--- Quickloading OpenCortex ---~%\")" \
|
||||||
|
--eval "(ql:quickload :opencortex)" \
|
||||||
--eval "(opencortex:main)"
|
--eval "(opencortex:main)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user