You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Train position: 8 of 26
Phase: P1 — Passive, stable runtime and API
Problem
Sourcing lib_std.sh currently filters caller arguments, resets positional parameters, exports logging controls, and creates or unsets generic state. That makes a reusable library behave like an application bootstrap and creates surprising integration failures.
Acceptance criteria
Make sourcing define public symbols, immutable package metadata, and collision-safe load guards without consuming or rewriting $@.
Do not install traps, export runtime controls, change shell state, or create, unset, or overwrite caller-owned generic variables at source time.
Introduce an explicit, idempotent initialization API that accepts argv and configuration as inputs and returns filtered application arguments without hidden positional mutation.
Move wrapper flags, logging and color initialization, and application lifecycle setup into the launcher or explicit initialization.
Make repeated sourcing, repeated initialization, and loading compatible or incompatible versions deterministic and diagnosable.
Provide a tested one-time v1.4.0-to-v2 migration path and prove the legacy source-time mutations are absent; do not retain them behind a compatibility mode.
Implemented by PR #250 (merged 2026-08-04). Local validation passed all 475 BATS tests, Bash 4.2 compatibility smoke checks, all eight Bash option-contract modes, examples, and ShellCheck error-profile validation. Hosted Ubuntu and macOS checks also passed.
Parent: #214
Train position: 8 of 26
Phase: P1 — Passive, stable runtime and API
Problem
Sourcing
lib_std.shcurrently filters caller arguments, resets positional parameters, exports logging controls, and creates or unsets generic state. That makes a reusable library behave like an application bootstrap and creates surprising integration failures.Acceptance criteria
$@.Dependencies
Completion
Implemented by PR #250 (merged 2026-08-04). Local validation passed all 475 BATS tests, Bash 4.2 compatibility smoke checks, all eight Bash option-contract modes, examples, and ShellCheck error-profile validation. Hosted Ubuntu and macOS checks also passed.