From 9f49ac0afb20ce05ee917a8c707c31563a18649c Mon Sep 17 00:00:00 2001 From: Shea Stewart Date: Tue, 20 Jan 2026 17:46:46 -0500 Subject: [PATCH 1/2] add timeout to tool-builder/generics --- codebundles/generics-editor/runbook.robot | 8 +++++++- codebundles/generics-editor/sli.robot | 10 ++++++++-- codebundles/tool-builder/runbook.robot | 8 +++++++- codebundles/tool-builder/sli.robot | 8 +++++++- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/codebundles/generics-editor/runbook.robot b/codebundles/generics-editor/runbook.robot index d33cf6d..d011383 100644 --- a/codebundles/generics-editor/runbook.robot +++ b/codebundles/generics-editor/runbook.robot @@ -53,6 +53,7 @@ ${TASK_TITLE} ... cmd=${command} ... env=${raw_env_vars} ... &{secret_kwargs} + ... timeout_seconds=${TIMEOUT_SECONDS} ${history}= RW.CLI.Pop Shell History @@ -100,7 +101,12 @@ Suite Initialization ... description=A useful task title. This is useful for helping find this generic task with RunWhen Assistants. ... pattern=\w* ... example="Run a bash command" - + ${TIMEOUT_SECONDS}= RW.Core.Import User Variable TIMEOUT_SECONDS + ... type=string + ... description=The amount of seconds before the command is killed. + ... pattern=\w* + ... example=300 + ... default=300 # env vars management ${env_vars_json}= RW.Core.Import User Variable CONFIG_ENV_MAP ... type=string diff --git a/codebundles/generics-editor/sli.robot b/codebundles/generics-editor/sli.robot index ba71348..02089e9 100644 --- a/codebundles/generics-editor/sli.robot +++ b/codebundles/generics-editor/sli.robot @@ -53,7 +53,8 @@ ${TASK_TITLE} ... cmd=${command} ... env=${raw_env_vars} ... &{secret_kwargs} - + ... timeout_seconds=${TIMEOUT_SECONDS} + ${metric_file}= Set Variable ${raw_env_vars["CODEBUNDLE_TEMP_DIR"]}/metric_data.json ${metric}= Evaluate json.load(open(r'''${metric_file}''')) if os.path.exists(r'''${metric_file}''') and os.path.getsize(r'''${metric_file}''') > 0 else 0 modules=json,os @@ -77,7 +78,12 @@ Suite Initialization ... description=A useful task title. This is useful for helping find this generic task with RunWhen Assistants. ... pattern=\w* ... example="Run a bash command" - + ${TIMEOUT_SECONDS}= RW.Core.Import User Variable TIMEOUT_SECONDS + ... type=string + ... description=The amount of seconds before the command is killed. + ... pattern=\w* + ... example=300 + ... default=300 # env vars management ${env_vars_json}= RW.Core.Import User Variable CONFIG_ENV_MAP ... type=string diff --git a/codebundles/tool-builder/runbook.robot b/codebundles/tool-builder/runbook.robot index 9a62e13..98ff642 100644 --- a/codebundles/tool-builder/runbook.robot +++ b/codebundles/tool-builder/runbook.robot @@ -53,6 +53,7 @@ ${TASK_TITLE} ... cmd=${command} ... env=${raw_env_vars} ... &{secret_kwargs} + ... timeout_seconds=${TIMEOUT_SECONDS} ${history}= RW.CLI.Pop Shell History @@ -100,7 +101,12 @@ Suite Initialization ... description=A useful task title. This is useful for helping find this generic task with RunWhen Assistants. ... pattern=\w* ... example="Run a bash command" - + ${TIMEOUT_SECONDS}= RW.Core.Import User Variable TIMEOUT_SECONDS + ... type=string + ... description=The amount of seconds before the command is killed. + ... pattern=\w* + ... example=300 + ... default=300 # env vars management ${env_vars_json}= RW.Core.Import User Variable CONFIG_ENV_MAP ... type=string diff --git a/codebundles/tool-builder/sli.robot b/codebundles/tool-builder/sli.robot index b56d30b..84a6f38 100644 --- a/codebundles/tool-builder/sli.robot +++ b/codebundles/tool-builder/sli.robot @@ -53,6 +53,7 @@ ${TASK_TITLE} ... cmd=${command} ... env=${raw_env_vars} ... &{secret_kwargs} + ... timeout_seconds=${TIMEOUT_SECONDS} ${metric_file}= Set Variable ${raw_env_vars["CODEBUNDLE_TEMP_DIR"]}/metric_data.json ${metric}= Evaluate json.load(open(r'''${metric_file}''')) if os.path.exists(r'''${metric_file}''') and os.path.getsize(r'''${metric_file}''') > 0 else 0 modules=json,os @@ -77,7 +78,12 @@ Suite Initialization ... description=A useful task title. This is useful for helping find this generic task with RunWhen Assistants. ... pattern=\w* ... example="Run a bash command" - + ${TIMEOUT_SECONDS}= RW.Core.Import User Variable TIMEOUT_SECONDS + ... type=string + ... description=The amount of seconds before the command is killed. + ... pattern=\w* + ... example=300 + ... default=300 # env vars management ${env_vars_json}= RW.Core.Import User Variable CONFIG_ENV_MAP ... type=string From cfea4874ea510d4dd8811217d8b115ad14efc94d Mon Sep 17 00:00:00 2001 From: Shea Stewart Date: Tue, 20 Jan 2026 17:52:37 -0500 Subject: [PATCH 2/2] add set var --- codebundles/generics-editor/runbook.robot | 3 ++- codebundles/generics-editor/sli.robot | 3 ++- codebundles/tool-builder/runbook.robot | 3 ++- codebundles/tool-builder/sli.robot | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/codebundles/generics-editor/runbook.robot b/codebundles/generics-editor/runbook.robot index d011383..48388f5 100644 --- a/codebundles/generics-editor/runbook.robot +++ b/codebundles/generics-editor/runbook.robot @@ -144,4 +144,5 @@ Suite Initialization Set Suite Variable ${INTERPRETER} ${INTERPRETER} Set Suite Variable ${GEN_CMD} ${GEN_CMD} Set Suite Variable ${raw_env_vars} ${raw_env_vars} - Set Suite Variable ${secret_objs} ${secret_objs} \ No newline at end of file + Set Suite Variable ${secret_objs} ${secret_objs} + Set Suite Variable ${TIMEOUT_SECONDS} diff --git a/codebundles/generics-editor/sli.robot b/codebundles/generics-editor/sli.robot index 02089e9..eb3d595 100644 --- a/codebundles/generics-editor/sli.robot +++ b/codebundles/generics-editor/sli.robot @@ -120,4 +120,5 @@ Suite Initialization Set Suite Variable ${INTERPRETER} ${INTERPRETER} Set Suite Variable ${GEN_CMD} ${GEN_CMD} Set Suite Variable ${raw_env_vars} ${raw_env_vars} - Set Suite Variable ${secret_objs} ${secret_objs} \ No newline at end of file + Set Suite Variable ${secret_objs} ${secret_objs} + Set Suite Variable ${TIMEOUT_SECONDS} diff --git a/codebundles/tool-builder/runbook.robot b/codebundles/tool-builder/runbook.robot index 98ff642..b6df8a2 100644 --- a/codebundles/tool-builder/runbook.robot +++ b/codebundles/tool-builder/runbook.robot @@ -144,4 +144,5 @@ Suite Initialization Set Suite Variable ${INTERPRETER} ${INTERPRETER} Set Suite Variable ${GEN_CMD} ${GEN_CMD} Set Suite Variable ${raw_env_vars} ${raw_env_vars} - Set Suite Variable ${secret_objs} ${secret_objs} \ No newline at end of file + Set Suite Variable ${secret_objs} ${secret_objs} + Set Suite Variable ${TIMEOUT_SECONDS} diff --git a/codebundles/tool-builder/sli.robot b/codebundles/tool-builder/sli.robot index 84a6f38..25ba223 100644 --- a/codebundles/tool-builder/sli.robot +++ b/codebundles/tool-builder/sli.robot @@ -120,4 +120,5 @@ Suite Initialization Set Suite Variable ${INTERPRETER} ${INTERPRETER} Set Suite Variable ${GEN_CMD} ${GEN_CMD} Set Suite Variable ${raw_env_vars} ${raw_env_vars} - Set Suite Variable ${secret_objs} ${secret_objs} \ No newline at end of file + Set Suite Variable ${secret_objs} ${secret_objs} + Set Suite Variable ${TIMEOUT_SECONDS}