Description:
As a platform operator, I want the prerun_script to stream its console output in real-time and immediately terminate if the run is aborted, so that I have full visibility into the pre-run phase.
Log Streaming Gap:
  • console output from the prerun_script is only displayed at the very end of its execution, rather than streamed progressively (unlike the apply step).
  • no real-time feedback, operators cannot tell if a script is actively running or completely frozen.
Abort BB run Gap:
  • triggering an "Abort" action on a Building Block (BB) run fails to kill the underlying prerun_script process.
  • aborted BB run caused prerun_script process continued running in the background for 3 hours before finally hitting a timeout. The run itself remained trapped in an In Progress state.
Proposed Solution:
  • Progressive Logging: Refactor the prerun_script execution block to stream logs progressively to the UI in real-time, matching the behavior of the apply step.
  • State Resolution: Once aborted, the run status should cleanly transition out of In Progress to Aborted or Failed, rather than hanging.