Skip to content

Make stdlib initialization explicit (#222) - #250

Merged
codeforester merged 1 commit into
mainfrom
enhancement/222-20260804-passive-sourcing-explicit-init
Aug 4, 2026
Merged

Make stdlib initialization explicit (#222)#250
codeforester merged 1 commit into
mainfrom
enhancement/222-20260804-passive-sourcing-explicit-init

Conversation

@codeforester

Copy link
Copy Markdown
Collaborator

What changed

  • Make lib_std.sh sourcing passive: no positional-argument rewriting, runtime logging/color initialization, traps, exports, or caller-owned runtime globals.
  • Add idempotent base_bash_libs_init with explicit source context and caller-owned filtered-argument output.
  • Move launcher initialization into bin/base-bash and update library documentation, examples, and companion-library tests.
  • Add source-guard and explicit-initialization coverage, including caller shell-state preservation and repeated-init diagnostics.

Why

Sourcing a reusable Bash library should be safe and composable. Runtime configuration now happens at an explicit lifecycle boundary, making direct use, embedding, and composition predictable while preserving wrapper flag behavior in the launcher.

Validation

  • ./tests/validate.sh
  • 475 BATS tests passed
  • Bash 4.2-compatible logging/release smoke checks passed
  • All eight Bash option-contract modes passed
  • Examples and ShellCheck error profile passed

Fixes #222

@codeforester
codeforester merged commit 180dac1 into main Aug 4, 2026
5 checks passed
@codeforester
codeforester deleted the enhancement/222-20260804-passive-sourcing-explicit-init branch August 4, 2026 19:47
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.

Make library sourcing passive and initialization explicit

1 participant