fix(reviewer-runtime): cover timeout and exit semantics
This commit is contained in:
@@ -5,6 +5,8 @@ DEFAULT_POLL_SECONDS=10
|
||||
DEFAULT_SOFT_TIMEOUT_SECONDS=600
|
||||
DEFAULT_STALL_WARNING_SECONDS=300
|
||||
DEFAULT_HARD_TIMEOUT_SECONDS=1800
|
||||
EXIT_COMPLETED_EMPTY_OUTPUT=80
|
||||
EXIT_NEEDS_OPERATOR_DECISION=81
|
||||
|
||||
COMMAND_FILE=""
|
||||
STDOUT_FILE=""
|
||||
@@ -271,7 +273,7 @@ main() {
|
||||
append_status error needs-operator-decision "hard timeout reached; terminating reviewer child for operator intervention"
|
||||
kill_child_process_group
|
||||
trap - EXIT
|
||||
exit 12
|
||||
exit "$EXIT_NEEDS_OPERATOR_DECISION"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -293,7 +295,7 @@ main() {
|
||||
fi
|
||||
|
||||
append_status error completed-empty-output "reviewer exited successfully with empty stdout"
|
||||
exit 10
|
||||
exit "$EXIT_COMPLETED_EMPTY_OUTPUT"
|
||||
fi
|
||||
|
||||
append_status error failed "reviewer exited with code $child_exit_code"
|
||||
|
||||
Reference in New Issue
Block a user