Fix learnings file path in output_stage_learnings() function
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled

Bug: Learnings file was created but disappeared after script exit because
SCRIPT_DIR was undefined in training_lib.sh context.

Fix: Use REPO_ROOT to construct path to training state directory:
- Changed from /.training_state
- To /scripts/training/.training_state

This ensures the learnings file is created in the correct location where
capture_learnings() in master_training_launcher.sh can find it.
This commit is contained in:
aitbc
2026-05-07 16:07:56 +02:00
parent f96a549086
commit d10306f545

View File

@@ -514,7 +514,8 @@ output_stage_learnings() {
IFS='|' read -ra concepts <<< "$4"
fi
local state_dir="${SCRIPT_DIR}/.training_state"
# Use REPO_ROOT to construct path to training state directory
local state_dir="${REPO_ROOT}/scripts/training/.training_state"
local learnings_file="$state_dir/learnings_stage${stage_num}.json"
mkdir -p "$state_dir"