Hi Stephen,
I tested the behavior. When the script is executed by the job executor then the retries of the job are not decreased and no error is reported. You can find the error message only in the server log.
The behavior is different from scripts which throw an exception because an AssertionError is an error and not an exception. In common case, errors should not catch by a program. Also, the Java Script Api says that an ScriptException in thrown when an error occurs.
So, I recommend using a custom function instead of assert and throws an exception (e.g., llegalArgumentException).
However, I created an issue for that.
Best regards,
Philipp