export-runner: classify a completed-but-empty backtest as a data hole, not a failure
The first full production run aborted on Copper 2017-04: a month with no data *inside* the symbol's range. cTrader does not emit the clean "No historical data" message for an in-range hole; it runs the backtest to its `}` summary but with a degenerate empty result and no EXPORT_SUCCESS. run_one misread that as a transient failure and hard-aborted after retries. Reaching the `}` summary means the backtest completed cleanly, so the absence of an export marker is an empty month (rc 3, skipped), not a transient failure. A genuine transient failure never reaches `}`, which is what distinguishes the two.
This commit is contained in:
@@ -109,9 +109,11 @@ run_one() {
|
||||
docker rm -f "$C_NAME" >/dev/null 2>&1
|
||||
CURRENT_CONTAINER=""
|
||||
|
||||
if (( saw_success )); then return 0
|
||||
elif (( saw_empty )); then return 3
|
||||
else return 2 # saw_error, no terminator (timeout/stream died), or `}` without a verdict
|
||||
if (( saw_success )); then return 0 # DATA_FOUND / EXPORT_SUCCESS
|
||||
elif (( saw_error )); then return 2 # bot raised an exception (e.g. write failure) -> retry/abort
|
||||
elif (( saw_empty )); then return 3 # console: "No historical data for the specified period"
|
||||
elif (( saw_term )); then return 3 # backtest reached its `}` summary but exported nothing -> data hole / empty month
|
||||
else return 2 # no terminator: timeout / crash / dead stream -> transient failure
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user