Summary
Enhance std_run so it remains the single blessed command runner for simple execution, timeout-only execution, retry-only execution, and timeout+retry execution.
Desired API
std_run [--no-exit] [--quiet] [--timeout N] [--max-attempts N] [--retry-delay N] [--] command [args...]
Semantics
- Existing
std_run command ... behavior remains unchanged.
--timeout N applies a per-attempt timeout and returns/preserves status 124 on timeout.
--max-attempts N is total attempts, defaulting to 1.
--retry-delay N sleeps between failed attempts, defaulting to 0 seconds.
- Retry is opt-in only when
--max-attempts is greater than 1.
- Dry-run mode logs the execution policy and never runs or loops.
-- ends std_run option parsing so command arguments can begin with option-looking tokens.
- Keep
std_run_with_timeout as a compatibility wrapper, but deprecate it in docs after verifying Base does not use it.
Validation
- Add BATS coverage for timeout-only, retry-only, timeout+retry, invalid option values, dry-run output, and compatibility wrapper behavior.
- Verify the Base repo has no
std_run_with_timeout call sites before documenting deprecation.
- Run the full validation suite.
Summary
Enhance
std_runso it remains the single blessed command runner for simple execution, timeout-only execution, retry-only execution, and timeout+retry execution.Desired API
std_run [--no-exit] [--quiet] [--timeout N] [--max-attempts N] [--retry-delay N] [--] command [args...]Semantics
std_run command ...behavior remains unchanged.--timeout Napplies a per-attempt timeout and returns/preserves status 124 on timeout.--max-attempts Nis total attempts, defaulting to 1.--retry-delay Nsleeps between failed attempts, defaulting to 0 seconds.--max-attemptsis greater than 1.--endsstd_runoption parsing so command arguments can begin with option-looking tokens.std_run_with_timeoutas a compatibility wrapper, but deprecate it in docs after verifying Base does not use it.Validation
std_run_with_timeoutcall sites before documenting deprecation.