Skip to content

Enhance std_run execution policy#89

Merged
codeforester merged 1 commit into
mainfrom
enhancement/88-20260628-std-run-policy
Jun 29, 2026
Merged

Enhance std_run execution policy#89
codeforester merged 1 commit into
mainfrom
enhancement/88-20260628-std-run-policy

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Summary

  • Add std_run --timeout, --max-attempts, --retry-attempts, and --retry-delay policy options.
  • Keep std_run_with_timeout as a compatibility wrapper over the new timeout policy.
  • Update docs, changelog, and cookbook example to make std_run --timeout the recommended timeout API.
  • Clean up the existing BATS std_function_exists assertion pattern so touched tests pass ShellCheck.

Semantics

  • --timeout N is per attempt and returns status 124 with --no-exit.
  • --max-attempts N means total attempts; default remains 1.
  • --retry-delay N sleeps between failed attempts; default remains 0.
  • --retry-attempts is accepted as an alias, but docs recommend --max-attempts.

Validation

  • RED: bats lib/bash/std/tests/lib_std.bats failed on the new std_run policy tests before implementation.
  • shellcheck --severity=error lib/bash/std/lib_std.sh lib/bash/std/tests/lib_std.bats examples/cookbook-cleanup-temp.sh
  • bats lib/bash/std/tests/lib_std.bats
  • ./tests/validate.sh
  • Verified /Users/rameshhp/work/base has no std_run_with_timeout call sites.

Closes #88

@codeforester codeforester merged commit 6cc8572 into main Jun 29, 2026
2 checks passed
@codeforester codeforester deleted the enhancement/88-20260628-std-run-policy branch June 29, 2026 03:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fold timeout and retry policy into std_run

1 participant