Skip to content

Guarantee public APIs under caller-selected Bash options - #242

Merged
codeforester merged 1 commit into
mainfrom
bug/216-20260802-caller-option-contract
Aug 2, 2026
Merged

Guarantee public APIs under caller-selected Bash options#242
codeforester merged 1 commit into
mainfrom
bug/216-20260802-caller-option-contract

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

Closes #216

Summary

  • define and document the Bash 4.2+ caller-runtime contract across all eight errexit/nounset/pipefail combinations
  • make every public module safe to source and exercise under caller-selected options without leaking changes to shell state
  • validate arity before required positional expansion and make Bash 4.2 empty-array handling nounset-safe
  • reject aliases and reserved internal names for caller-owned sources/results before locals or mutation
  • preserve caller IFS, cwd, traps, option state, and transient cleanup ownership across file, Git, GitHub, argument, list, string, and std APIs
  • run the standalone contract matrix in the existing digest-pinned, networkless Bash 4.2.53 CI container

Validation

  • ./tests/validate.sh (383 BATS tests, smokes, examples, and all 8 option modes)
  • ./tests/lint-warnings.sh
  • focused std/arg/list/string/Git/GitHub suites
  • adversarial readonly/dynamic-scope collision review
  • git diff --check

Exact Bash 4.2.53 execution is intentionally delegated to this PR's pinned compatibility job.

@codeforester
codeforester merged commit cd7ee03 into main Aug 2, 2026
5 checks passed
@codeforester
codeforester deleted the bug/216-20260802-caller-option-contract branch August 2, 2026 23:02
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.

Guarantee public APIs under caller-selected Bash options

1 participant