From bc1179722e102ec7147de6f92a0a6baef18a44fb Mon Sep 17 00:00:00 2001 From: busya Date: Wed, 27 May 2026 10:11:36 +0300 Subject: [PATCH] fix: remove --reload from run.sh (breaks stderr capture), fix reason/reflect level to INFO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - run.sh: removed --reload flag from uvicorn — reload subprocess breaks the 2>&1 pipe and all JSON logs from superset_tools_app are lost. Added comment with alternative for hot-reload. - core/logger.py: reason() and reflect() now use self.info() instead of self.debug() — per molecular CoT protocol these are INFO-level bonds. DEBUG is reserved for high-frequency loops only. --- run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 65f38e0f..d65fa970 100755 --- a/run.sh +++ b/run.sh @@ -205,7 +205,10 @@ start_backend() { uvicorn_env_args=(--env-file .env) fi # Use a subshell to prefix output - python3 -m uvicorn src.app:app --reload --port "$BACKEND_PORT" "${uvicorn_env_args[@]}" 2>&1 | sed "s/^/$(echo -e '\033[0;34m[Backend]\033[0m ') /" & + # NOTE: --reload breaks stderr capture (subprocess child loses the 2>&1 pipe). + # For hot-reload during development, run uvicorn directly instead: + # cd backend && source .venv/bin/activate && uvicorn src.app:app --reload --port 8000 + python3 -m uvicorn src.app:app --port "$BACKEND_PORT" "${uvicorn_env_args[@]}" 2>&1 | sed "s/^/$(echo -e '\033[0;34m[Backend]\033[0m ') /" & BACKEND_PID=$! cd .. }