From 5a5cc41eba40c5623e7ca6627e5ce0afe1a95429 Mon Sep 17 00:00:00 2001 From: Viktor Antropov Date: Mon, 2 Nov 2026 19:32:13 +0300 Subject: [PATCH] diag.bat: full status dump - code age, components, processes, ports, live API --- delivery/diag.bat | 61 +++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/delivery/diag.bat b/delivery/diag.bat index 1dede29..d0f4f47 100644 --- a/delivery/diag.bat +++ b/delivery/diag.bat @@ -1,22 +1,41 @@ -@echo off -REM Diagnostic: shows what is installed and starts the service in the foreground -cd /d %~dp0 -echo === 1. venv present? -if exist venv\Scripts\python.exe (echo venv OK) else echo VENV MISSING - run install.bat first -echo === 2. installed packages: -if exist venv\Scripts\python.exe venv\Scripts\python.exe -m pip list 2>nul | findstr /i "fastapi uvicorn httpx docx openpyxl pptx multipart" -echo === 3. app.py / static location: -if exist app.py echo app.py here (delivery) -if exist ..\app.py echo app.py in parent folder -if exist static echo static here (delivery) -if exist ..\static echo static in parent folder -echo === 4. starting service from kit root (watch for errors; window stays open)... -set "SRV=%~dp0" -if not exist "%SRV%static" set "SRV=%~dp0.." -cd /d "%SRV%" -set LT_URL=http://127.0.0.1:8010 -set LLM_BASE_URL=http://127.0.0.1:11434/v1 -set LLM_MODEL=qwen3-4b-instruct -"%~dp0venv\Scripts\python.exe" -m uvicorn app:app --host 127.0.0.1 --port 8011 -echo === service stopped. If there is an error above - send a photo of this window +@echo off +REM Full diagnosis: code version on disk, components, processes, ports, live API checks. +cd /d %~dp0 +title DIAG-dump + +echo === 1. kit root layout (C:\docchecker expected): +dir /b "%~dp0..\.." 2>nul | findstr /i "setup_online exceptions app repo.zip" +echo --- exceptions file(s): +if exist "%~dp0..\..\exceptions.txt" echo C:\docchecker\exceptions.txt PRESENT +if exist "%~dp0exceptions.txt" echo delivery\exceptions.txt PRESENT +if exist "%~dp0..\exceptions.txt" echo parent\exceptions.txt PRESENT + +echo === 2. code version on disk: +findstr /c:"exceptions" "%~dp0..\app.py" >nul 2>nul && echo app.py: NEW (has exceptions) || echo app.py: OLD - code not updated +findstr /c:"dlw" "%~dp0..\static\index.html" >nul 2>nul && echo index.html: NEW (docx + word list buttons) || echo index.html: OLD - html report only + +echo === 3. delivery components: +if exist "%~dp0OllamaSetup.exe" echo OllamaSetup.exe: PRESENT || echo OllamaSetup.exe: MISSING +if exist "%~dp0jre17\jre\bin\java.exe" echo jre17: PRESENT || echo jre17: MISSING +if exist "%~dp0languagetool\languagetool-server.jar" echo languagetool: PRESENT || echo languagetool: MISSING +if exist "%~dp0venv\Scripts\python.exe" echo venv: PRESENT || echo venv: MISSING +if exist "%~dp0..\app.py" echo parent app.py: PRESENT || echo parent app.py: MISSING + +echo === 4. running processes (java / python / ollama): +tasklist 2>nul | findstr /i "java.exe python.exe ollama.exe" + +echo === 5. listening ports 8010/8011: +netstat -ano 2>nul | findstr ":8010 :8011" | findstr "LISTENING" + +echo === 6. live checks: +curl -s --max-time 8 http://127.0.0.1:8011/api/health +echo. +curl -s --max-time 8 -o nul -w "LT 8010: HTTP %%{http_code}" http://127.0.0.1:8010/v2/languages +echo. +curl -s --max-time 8 -o nul -w "LLM 11434: HTTP %%{http_code}" http://127.0.0.1:11434/api/tags +echo. +ollama list 2>nul + +echo ============================================================ +echo Send a photo of this whole window. pause \ No newline at end of file