From f8b5f2580e730a8affbccec8b5bde9b96b1f9fc2 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Thu, 5 Mar 2026 23:03:02 +0000 Subject: executor: persist log paths at execution create time, not just at end Add LogPather interface; ClaudeRunner implements it via ExecLogDir(). Pool pre-populates stdout_path/stderr_path/artifact_dir on the execution record before CreateExecution, so paths are in the DB from the moment a task starts running. ClaudeRunner.Run() skips path assignment when already set by the pool. Also update scripts/debug-execution to derive paths from the known convention (/executions//) as a fallback for historical records that predate this change. Co-Authored-By: Claude Sonnet 4.6 --- scripts/debug-execution | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'scripts/debug-execution') diff --git a/scripts/debug-execution b/scripts/debug-execution index eba5c0a..87540b7 100755 --- a/scripts/debug-execution +++ b/scripts/debug-execution @@ -6,6 +6,7 @@ set -euo pipefail DB="/site/doot.terst.org/data/claudomator.db" +DATA_DIR="/site/doot.terst.org/data" PREFIX="${1:?Usage: $0 }" if [[ ! -f "$DB" ]]; then @@ -52,14 +53,17 @@ if [[ -n "$TASK_ROW" ]]; then echo " Working dir: ${WORKING_DIR:-(not set)}" fi +# Resolve log paths: use DB value if set, otherwise derive from known convention. +EXEC_LOG_DIR="${DATA_DIR}/executions/${EXEC_ID}" +: "${STDOUT_PATH:=${EXEC_LOG_DIR}/stdout.log}" +: "${STDERR_PATH:=${EXEC_LOG_DIR}/stderr.log}" + # Logs print_log() { local label="$1" path="$2" echo "" echo "=== $label ===" - if [[ -z "$path" ]]; then - echo " (path not recorded)" - elif [[ ! -f "$path" ]]; then + if [[ ! -f "$path" ]]; then echo " (file not found: $path)" elif [[ ! -s "$path" ]]; then echo " (empty)" -- cgit v1.2.3